If someone wants to perform a forced read of a chip via mmap, we should allow that even if the host doesn't support the bus this chip needs. Example: flashrom -p dummy:bus=spi -V -c Am29F016D -f -r foo.rom This won't work right now because -f won't override probe skipping. So far the only use of this bus override is for the internal programmer, and as such I wonder whether we should make the bus override conditional on the internal programmer. It's pointless for other programmers anyway.
Comments welcome.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-force_chip_incompatible_bus/flashrom.c =================================================================== --- flashrom-force_chip_incompatible_bus/flashrom.c (Revision 1079) +++ flashrom-force_chip_incompatible_bus/flashrom.c (Arbeitskopie) @@ -1007,7 +1007,7 @@ continue; } buses_common = buses_supported & flash->bustype; - if (!buses_common) { + if (!buses_common && !force) { tmp = flashbuses_to_text(buses_supported); msg_gdbg("skipped."); msg_gspew(" Host bus type %s ", tmp);