Use new probing path for chips w/o IDs
We used to have a probe_noop() that simply assumed a chip is there
but wasn't called by default. Instead we can handle this case spe-
cifically in the new probing path.
Change-Id: I633c55f8de3a36c4de96f79fd938f58aa39b5bf9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/426
diff --git a/flashprog.c b/flashprog.c
index cf697fb..6eb450e 100644
--- a/flashprog.c
+++ b/flashprog.c
@@ -612,11 +612,6 @@
return ret;
}
-int probe_noop(struct flashctx *flash)
-{
- return 1;
-}
-
static int init_default_layout(struct flashctx *flash)
{
/* Fill default layout covering the whole chip. */
@@ -673,8 +668,11 @@
};
if (chip_to_probe) {
- /* If we are looking for a particular chip,
- limit the probing functions to its type. */
+ /* We are looking for a particular chip.
+ If it can't be probed, assume it's there... */
+ if (chip->id.type == ID_NONE)
+ return true;
+ /* ...otherwise, limit the probing functions to its type. */
probe_bus(mst, chip->id.type);
} else {
probe_bus(mst, 0);