Join PREPARE_PROBE/_POST_PROBE steps

Now that all the probing procedures handle flash mapping by them-
selves, there's nothing to be prepared before probing anymore. We
will, however, map the flash after probing for later register ac-
cess (e.g. printlock()).

Change-Id: I23833aaba9402858ab14b8835b747b0c27b2278b
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/447
diff --git a/flashprog.c b/flashprog.c
index 13e3695..81fd163 100644
--- a/flashprog.c
+++ b/flashprog.c
@@ -751,9 +751,6 @@
 				goto free_chip;
 		}
 
-		if (flash->chip->prepare_access && flash->chip->prepare_access(flash, PREPARE_PROBE))
-			goto free_chip;
-
 		/* We handle a forced match like a real match, we just avoid probing. Note that probe_flash()
 		 * is only called with force=1 after normal probing failed.
 		 */
diff --git a/include/flash.h b/include/flash.h
index aca1b77..9bae9e3 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -239,7 +239,6 @@
 struct wp_bits;
 
 enum preparation_steps {
-	PREPARE_PROBE,
 	PREPARE_POST_PROBE,
 	PREPARE_FULL,
 };
diff --git a/memory_bus.c b/memory_bus.c
index 2a94630..fafe385 100644
--- a/memory_bus.c
+++ b/memory_bus.c
@@ -65,9 +65,6 @@
 {
 	const struct par_master *const par = flash->mst.par;
 
-	if (prep == PREPARE_POST_PROBE)
-		return 0;
-
 	/* Init pointers to the fail-safe state to distinguish them later from legit values. */
 	flash->virtual_memory = (chipaddr)ERROR_PTR;
 	flash->virtual_registers = (chipaddr)ERROR_PTR;
@@ -87,9 +84,6 @@
 {
 	const struct par_master *const par = flash->mst.par;
 
-	if (prep == PREPARE_POST_PROBE)
-		return 0;
-
 	if (prepare_memory_access(flash, prep))
 		return 1;