[flashrom] [PATCH] Convert chips to block erasers: SyncMOS and TI
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Tue Jan 19 08:28:33 CET 2010
On 14.01.2010 08:45, Sean Nelson wrote:
> Convert chips to block_erasers:
> SyncMOS S29C31004T
> SyncMOS S29C51001T
> SyncMOS S29C51002T
> SyncMOS S29C51004T
> TI TMS29F002RT
> TI TMS29F002RB
>
> Signed-off-by: Sean Nelson <audiohacked at gmail.com>
>
> diff --git a/flashchips.c b/flashchips.c
> index 8e90d2a..2103874 100644
> --- a/flashchips.c
> +++ b/flashchips.c
> @@ -4415,15 +4415,28 @@ struct flashchip flashchips[] = {
> .manufacture_id = SYNCMOS_ID,
> .model_id = S29C31004T,
> .total_size = 512,
> .page_size = 128,
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
> - .erase = erase_chip_jedec,
> + .erase = NULL,
> + .block_erasers =
> + {
> + {
> + .eraseblocks = {
> + {1 * 1024, 496},
> + {16 * 1024, 1},
My data sheet says the layout is uniform 1k sectors. The boot block is
just about locking, not eraseblock size.
> + },
> + .block_erase = erase_sector_jedec,
> + }, {
> + .eraseblocks = { {512 * 1024, 1} },
> + .block_erase = erase_chip_block_jedec,
> + },
> + },
> .write = write_49f002,
> .read = read_memmapped,
> },
>
> {
> .vendor = "SyncMOS",
> .name = "S29C51001T",
> @@ -4431,31 +4444,57 @@ struct flashchip flashchips[] = {
> .manufacture_id = SYNCMOS_ID,
> .model_id = S29C51001T,
> .total_size = 128,
> .page_size = 128,
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
> - .erase = erase_chip_jedec,
> + .erase = NULL,
> + .block_erasers =
> + {
> + {
> + .eraseblocks = {
> + {512, 240},
> + {8 * 1024, 1},
Uniform 512 byte sectors. Boot block is just about locking.
> + },
> + .block_erase = erase_sector_jedec,
> + }, {
> + .eraseblocks = { {128 * 1024, 1} },
> + .block_erase = erase_chip_block_jedec,
> + },
> + },
> .write = write_49f002,
> .read = read_memmapped,
> },
>
> {
> .vendor = "SyncMOS",
> .name = "S29C51002T",
> .bustype = CHIP_BUSTYPE_PARALLEL,
> .manufacture_id = SYNCMOS_ID,
> .model_id = S29C51002T,
> .total_size = 256,
> .page_size = 128,
> - .tested = TEST_OK_PREW,
> + .tested = TEST_OK_PRW,
> .probe = probe_jedec,
> .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
> - .erase = erase_chip_jedec,
> + .erase = NULL,
> + .block_erasers =
> + {
> + {
> + .eraseblocks = {
> + {512, 480},
> + {16 * 1024, 1},
512 x 512. See above.
> + },
> + .block_erase = erase_sector_jedec,
> + }, {
> + .eraseblocks = { {256 * 1024, 1} },
> + .block_erase = erase_chip_block_jedec,
> + },
> + },
> .write = write_49f002,
> .read = read_memmapped,
> },
>
> {
> .vendor = "SyncMOS",
> .name = "S29C51004T",
> @@ -4463,15 +4502,28 @@ struct flashchip flashchips[] = {
> .manufacture_id = SYNCMOS_ID,
> .model_id = S29C51004T,
> .total_size = 512,
> .page_size = 128,
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> .probe_timing = TIMING_ZERO,
> - .erase = erase_chip_jedec,
> + .erase = NULL,
> + .block_erasers =
> + {
> + {
> + .eraseblocks = {
> + {1 * 1024, 496},
> + {16 * 1024, 1},
Uniform sectors again.
> + },
> + .block_erase = erase_sector_jedec,
> + }, {
> + .eraseblocks = { {512 * 1024, 1} },
> + .block_erase = erase_chip_block_jedec,
> + },
> + },
> .write = write_49f002,
> .read = read_memmapped,
> },
>
> {
> .vendor = "TI",
> .name = "TMS29F002RB",
> @@ -4480,14 +4532,29 @@ struct flashchip flashchips[] = {
> .model_id = TI_TMS29F002RB,
> .total_size = 256,
> .page_size = 16384, /* Non-uniform sectors */
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
> .erase = NULL,
> + .block_erasers =
> + {
> + {
> + .eraseblocks = {
> + {16 * 1024, 1},
> + {8 * 1024, 2},
> + {32 * 1024, 1},
> + {64 * 1024, 3},
> + },
> + .block_erase = erase_sector_jedec,
> + }, {
> + .eraseblocks = { {256 * 1024, 1} },
> + .block_erase = erase_chip_block_jedec,
> + },
> + },
> .write = NULL,
> .read = read_memmapped,
> },
>
> {
> .vendor = "TI",
> .name = "TMS29F002RT",
> @@ -4496,14 +4563,29 @@ struct flashchip flashchips[] = {
> .model_id = TI_TMS29F002RT,
> .total_size = 256,
> .page_size = 16384, /* Non-uniform sectors */
> .tested = TEST_UNTESTED,
> .probe = probe_jedec,
> .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
> .erase = NULL,
> + .block_erasers =
> + {
> + {
> + .eraseblocks = {
> + {64 * 1024, 3},
> + {32 * 1024, 1},
> + {8 * 1024, 2},
> + {16 * 1024, 1},
> + },
> + .block_erase = erase_sector_jedec,
> + }, {
> + .eraseblocks = { {256 * 1024, 1} },
> + .block_erase = erase_chip_block_jedec,
> + },
> + },
> .write = NULL,
> .read = read_memmapped,
> },
>
> {
> .vendor = "Winbond",
> .name = "W25x10",
Looks good otherwise.
Regards,
Carl-Daniel
--
Developer quote of the year:
"We are juggling too many chainsaws and flaming arrows and tigers."
More information about the flashrom
mailing list