Fix W29EE011 probing.
Signed-off-by: Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net
Index: flashrom-probe_w29ee011_fix/w29ee011.c =================================================================== --- flashrom-probe_w29ee011_fix/w29ee011.c (Revision 1390) +++ flashrom-probe_w29ee011_fix/w29ee011.c (Arbeitskopie) @@ -22,16 +22,19 @@ #include "flash.h" #include "chipdrivers.h"
+/* According to the Winbond W29EE011, W29EE012, W29C010M, W29C011A + * datasheets this is the only valid probe function for those chips. + */ int probe_w29ee011(struct flashchip *flash) { chipaddr bios = flash->virtual_memory; uint8_t id1, id2;
- if (!chip_to_probe || strcmp(chip_to_probe, "W29EE011")) { - msg_cdbg("Probing disabled for Winbond W29EE011 because " + if (!chip_to_probe || strcmp(chip_to_probe, flash->name)) { + msg_cdbg("Probing disabled for Winbond W29EE* because " "the probing sequence puts the AMIC A49LF040A in " - "a funky state. Use 'flashrom -c W29EE011' if you " - "have a board with this chip.\n"); + "a funky state. Use 'flashrom -c %s' if you " + "have a board with this chip.\n", flash->name); return 0; }
Index: flashrom-probe_w29ee011_fix/flashchips.c =================================================================== --- flashrom-probe_w29ee011_fix/flashchips.c (Revision 1390) +++ flashrom-probe_w29ee011_fix/flashchips.c (Arbeitskopie) @@ -8323,7 +8323,7 @@
{ .vendor = "Winbond", - .name = "W29C010(M)/W29C011A/W29EE011/W29EE012", + .name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old", .bustype = CHIP_BUSTYPE_PARALLEL, .manufacture_id = WINBOND_ID, .model_id = WINBOND_W29C010,
On Tue, 26 Jul 2011 04:06:15 +0200 Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
msg_cdbg("Probing disabled for Winbond W29EE* because "
the comment above the function and the chip's .name indicate that this will be shown for "W29EE011, W29EE012, W29C010M, W29C011A", hence it should be "Probing disabled for some Winbond W29* chips because " or just use the actual chip name dynamically like you do for the -c parameter?
.name = "W29C010(M)/W29C011A/W29EE011/W29EE012-old",
why -old? what about the -non-old version?
rest looks ok although i can't test it... Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Am 26.07.2011 13:03 schrieb Stefan Tauner:
Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Thanks for the review! I added some minor cosmetic changes as discussed and committed in r1391.
Regards, Carl-Daniel