Add code for the unlocking (erasing/writing) of Winbond W39V040FB chips, enabling erasing/writing this type of chip.
Signed-off-by: Idwer Vollering vidwer@gmail.com
Index: w39.c =================================================================== --- w39.c (revision 1246) +++ w39.c (working copy) @@ -244,6 +244,16 @@ return -1; }
+int unlock_w39v040fb(struct flashchip *flash) +{ + if (unlock_w39_fwh(flash)) + return -1; + if (printlock_w39_common(flash, 0x7fff2)) + return -1; + + return 0; +} + int unlock_w39v080fa(struct flashchip *flash) { if (unlock_w39_fwh(flash)) Index: flashchips.c =================================================================== --- flashchips.c (revision 1246) +++ flashchips.c (working copy) @@ -7694,7 +7694,7 @@ .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, .tested = TEST_OK_PRE, .probe = probe_jedec, - .probe_timing = 10, + .probe_timing = 10, .block_erasers = { { @@ -7706,6 +7706,7 @@ } }, .printlock = printlock_w39v040fb, + .unlock = unlock_w39v040fb, .write = write_jedec_1, .read = read_memmapped, }, Index: chipdrivers.h =================================================================== --- chipdrivers.h (revision 1246) +++ chipdrivers.h (working copy) @@ -119,6 +119,7 @@ int printlock_w39v080a(struct flashchip *flash); int printlock_w39v080fa(struct flashchip *flash); int printlock_w39v080fa_dual(struct flashchip *flash); +int unlock_w39v040fb(struct flashchip *flash); int unlock_w39v080fa(struct flashchip *flash);
/* w29ee011.c */
Am Montag, den 06.12.2010, 18:37 +0100 schrieb Idwer Vollering:
Signed-off-by: Idwer Vollering vidwer@gmail.com
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de after skimming over the datasheet.
.probe_timing = 10,
.probe_timing = 10,
You seem to have a space-only change in this line. Is that intended?
Regards, Michael Karcher
2010/12/26 Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
Am Montag, den 06.12.2010, 18:37 +0100 schrieb Idwer Vollering:
Signed-off-by: Idwer Vollering vidwer@gmail.com
Resending as requested, updated to HEAD too.
Signed-off-by: Idwer Vollering vidwer@gmail.com
--- Index: w39.c =================================================================== --- w39.c (revision 1247) +++ w39.c (working copy) @@ -244,6 +244,16 @@ return -1; }
+int unlock_w39v040fb(struct flashchip *flash) +{ + if (unlock_w39_fwh(flash)) + return -1; + if (printlock_w39_common(flash, 0x7fff2)) + return -1; + + return 0; +} + int unlock_w39v080fa(struct flashchip *flash) { if (unlock_w39_fwh(flash)) Index: flashchips.c =================================================================== --- flashchips.c (revision 1247) +++ flashchips.c (working copy) @@ -7706,6 +7706,7 @@ } }, .printlock = printlock_w39v040fb, + .unlock = unlock_w39v040fb, .write = write_jedec_1, .read = read_memmapped, }, Index: chipdrivers.h =================================================================== --- chipdrivers.h (revision 1247) +++ chipdrivers.h (working copy) @@ -119,6 +119,7 @@ int printlock_w39v080a(struct flashchip *flash); int printlock_w39v080fa(struct flashchip *flash); int printlock_w39v080fa_dual(struct flashchip *flash); +int unlock_w39v040fb(struct flashchip *flash); int unlock_w39v080fa(struct flashchip *flash);
/* w29ee011.c */
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de after skimming over the datasheet.
.probe_timing = 10,
.probe_timing = 10,
You seem to have a space-only change in this line. Is that intended?
Regards, Michael Karcher
Am Sonntag, den 26.12.2010, 23:59 +0100 schrieb Idwer Vollering:
Resending as requested, updated to HEAD too.
Thanks for that!
Signed-off-by: Idwer Vollering vidwer@gmail.com
Acked-by: Michael Karcher flashrom@mkarcher.dialup.fu-berlin.de
This is r1248, thanks for adding this feature!
Regards, Michael Karcher