Also, slightly refine the definition of AT49LH002. TODO: unlocking is mandatory because the chips are write-protected by default.
Signed-off-by: Stefan Tauner stefan.tauner@alumni.tuwien.ac.at --- flashchips.c | 42 +++++++++++++++++++++++++++++++++++++++--- flashchips.h | 2 ++ 2 files changed, 41 insertions(+), 3 deletions(-)
diff --git a/flashchips.c b/flashchips.c index 0c3bb68..c658288 100644 --- a/flashchips.c +++ b/flashchips.c @@ -3049,7 +3049,7 @@ const struct flashchip flashchips[] = { .model_id = ATMEL_AT49LH002, .total_size = 256, .page_size = 0, /* unused */ - .feature_bits = FEATURE_REGISTERMAP, /* TODO: LPC OK too? */ + .feature_bits = FEATURE_REGISTERMAP, .tested = TEST_UNTESTED, .probe = probe_82802ab, /* TODO: 0xff cmd not documented? */ .probe_timing = TIMING_FIXME, @@ -3062,16 +3062,52 @@ const struct flashchip flashchips[] = { {8 * 1024, 2}, {16 * 1024, 1}, }, - .block_erase = erase_block_82802ab, + .block_erase = NULL, /* TODO: Implement. */ }, { .eraseblocks = { {64 * 1024, 4}, }, + .block_erase = erase_block_82802ab, + }, + }, + .printlock = NULL, /* TODO */ + .unlock = NULL, /* TODO: something like unlock_82802ab() but working on the sector eraser blocks. */ + .write = write_82802ab, + .read = read_memmapped, + .voltage = {3000, 3600}, + }, + + { + .vendor = "Atmel", + .name = "AT49LH004", + .bustype = BUS_LPC | BUS_FWH, /* A/A Mux */ + .manufacture_id = ATMEL_ID, + .model_id = ATMEL_AT49LH004, + .total_size = 512, + .page_size = 0, /* unused */ + .feature_bits = FEATURE_REGISTERMAP, + .tested = TEST_UNTESTED, + .probe = probe_82802ab, /* TODO: 0xff cmd not documented? */ + .probe_timing = TIMING_FIXME, + .block_erasers = + { + { + .eraseblocks = { + {64 * 1024, 7}, + {32 * 1024, 1}, + {8 * 1024, 2}, + {16 * 1024, 1}, + }, + .block_erase = erase_block_82802ab, + }, { + .eraseblocks = { + {64 * 1024, 8}, + }, .block_erase = NULL, /* TODO: Implement. */ }, }, .printlock = NULL, /* TODO */ - .unlock = NULL, /* unlock_82802ab() not correct(?) */ + .unlock = NULL, /* TODO: something like unlock_82802ab() but working on the sector eraser blocks. */ .write = write_82802ab, .read = read_memmapped, .voltage = {3000, 3600}, diff --git a/flashchips.h b/flashchips.h index fb17981..798323f 100644 --- a/flashchips.h +++ b/flashchips.h @@ -190,6 +190,8 @@ #define ATMEL_AT49BV512 0x03 #define ATMEL_AT49F002N 0x07 /* for AT49F002(N) */ #define ATMEL_AT49LH002 0xE9 +#define ATMEL_AT49LH00B4 0xED +#define ATMEL_AT49LH004 0xEE #define ATMEL_AT49F002NT 0x08 /* for AT49F002(N)T */ #define ATMEL_AT49F010 0x17 /* Same as AT49HF010 */ #define ATMEL_AT49F020 0x0B