diff options
author | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-10-13 21:49:30 +0000 |
---|---|---|
committer | Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> | 2010-10-13 21:49:30 +0000 |
commit | 79e6757d269b91ee759bd569df7093225f4f3715 (patch) | |
tree | d77c280e33ab45e549d2b7493eab7bf50da57d53 /flashchips.c | |
parent | 184b95f449e4c314964b63c3170da216267d3b5e (diff) | |
download | ast2050-flashrom-79e6757d269b91ee759bd569df7093225f4f3715.zip ast2050-flashrom-79e6757d269b91ee759bd569df7093225f4f3715.tar.gz |
Refactor remaining write wrappers
Kill duplicated code.
Annotate write functions with their chunk size.
Mark Fujitsu MBM29F400BC and ST M29F400BB as untested because their
write code no longer uses a broken layout.
Corresponding to flashrom svn r1210.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com>
Tested-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Tested-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Sean Nelson <audiohacked@gmail.com>
Diffstat (limited to 'flashchips.c')
-rw-r--r-- | flashchips.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/flashchips.c b/flashchips.c index d1e4a99..715c054 100644 --- a/flashchips.c +++ b/flashchips.c @@ -2995,7 +2995,7 @@ struct flashchip flashchips[] = { .total_size = 512, .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_EITHER_RESET, - .tested = TEST_BAD_WRITE, /* Implicit eraseblock layout in write_m29f400bt is broken. */ + .tested = TEST_UNTESTED, .probe = probe_m29f400bt, .probe_timing = TIMING_IGNORED, /* routine don't use probe_timing (m29f400bt.c) */ .block_erasers = @@ -3013,7 +3013,7 @@ struct flashchip flashchips[] = { .block_erase = block_erase_chip_m29f400bt, }, }, - .write = NULL, + .write = write_m29f400bt, .read = read_memmapped, }, @@ -5107,6 +5107,7 @@ struct flashchip flashchips[] = { .block_erase = erase_chip_28sf040, } }, + .unlock = unprotect_28sf040, .write = write_28sf040, .read = read_memmapped, }, @@ -5564,7 +5565,7 @@ struct flashchip flashchips[] = { } }, .unlock = unlock_49lfxxxc, - .write = write_49lfxxxc, + .write = write_82802ab, .read = read_memmapped, }, @@ -5627,7 +5628,7 @@ struct flashchip flashchips[] = { } }, .unlock = unlock_49lfxxxc, - .write = write_49lfxxxc, + .write = write_82802ab, .read = read_memmapped, }, @@ -5659,7 +5660,7 @@ struct flashchip flashchips[] = { } }, .unlock = unlock_49lfxxxc, - .write = write_49lfxxxc, + .write = write_82802ab, .read = read_memmapped, }, @@ -5837,7 +5838,7 @@ struct flashchip flashchips[] = { } }, .unlock = unlock_49lfxxxc, - .write = write_49lfxxxc, + .write = write_82802ab, .read = read_memmapped, }, @@ -6315,7 +6316,7 @@ struct flashchip flashchips[] = { .total_size = 512, .page_size = 64 * 1024, .feature_bits = FEATURE_ADDR_SHIFTED | FEATURE_EITHER_RESET, - .tested = TEST_BAD_WRITE, /* Implicit eraseblock layout in write_m29f400bt is broken. */ + .tested = TEST_UNTESTED, .probe = probe_m29f400bt, .probe_timing = TIMING_IGNORED, /* routine doesn't use probe_timing (m29f400bt.c) */ .block_erasers = @@ -6333,7 +6334,7 @@ struct flashchip flashchips[] = { .block_erase = block_erase_chip_m29f400bt, } }, - .write = NULL, + .write = write_m29f400bt, .read = read_memmapped, }, { |