1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

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>
This commit is contained in:
Carl-Daniel Hailfinger
2010-10-13 21:49:30 +00:00
parent 184b95f449
commit 79e6757d26
7 changed files with 90 additions and 69 deletions

View File

@ -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,
},
{