[flashrom] [PATCH] Allow bus override with forced read

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Jul 14 11:53:03 CEST 2010


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 at 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);


-- 
http://www.hailfinger.org/





More information about the flashrom mailing list