@@ -4871,7 +4871,7 @@ const struct flashchip flashchips[] = {
.page_size = 8192,
.feature_bits = FEATURE_ADDR_SHIFTED,
.tested = TEST_OK_PREW,
- .probe = probe_en29lv640b,
+ .probe = probe_jedec,
.probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
.block_erasers =
{
@@ -4893,6 +4893,36 @@ const struct flashchip flashchips[] = {
{
.vendor = "Eon",
+ .name = "EN29LV640T",
+ .bustype = BUS_PARALLEL,
+ .manufacture_id = EON_ID,
+ .model_id = EON_EN29LV640T,
+ .total_size = 8192,
+ .page_size = 8192,
+ .feature_bits = FEATURE_ADDR_SHIFTED,
+ .tested = TEST_UNTESTED,
+ .probe = probe_jedec,
+ .probe_timing = TIMING_ZERO, /* Datasheet has no timing info specified */
+ .block_erasers =
+ {
+ {
+ .eraseblocks = {
+ {64 * 1024, 127},
+ {8 * 1024, 8},
+ },
+ .block_erase = erase_block_jedec,
+ }, {
+ .eraseblocks = { {8 * 1024 * 1024, 1} },
+ .block_erase = erase_chip_block_jedec,
+ },
+ },
+ .write = write_en29lv640b,
+ .read = read_memmapped,
+ .voltage = {2700, 3600},
+ },
+
+ {
+ .vendor = "Eon",
.name = "EN29GL064(A)B",
.bustype = BUS_PARALLEL,
.manufacture_id = EON_ID,
@@ -295,6 +295,7 @@
#define EON_EN29LV010 0x7F6E
#define EON_EN29LV040A 0x7F4F /* EN29LV040(A) */
#define EON_EN29LV640B 0xCB
+#define EON_EN29LV640T 0xC9
#define EON_EN29F002T 0x7F92 /* Same as EN29F002A */
#define EON_EN29F002B 0x7F97 /* Same as EN29F002AN */
#define EON_EN29GL064HL 0x7E0C01 /* Uniform Sectors, WP protects Top OR Bottom sector */
@@ -237,12 +237,12 @@ static int probe_jedec_common(struct flashctx *flash, unsigned int mask)
/* Check if it is a continuation ID, this should be a while loop. */
if (id1 == 0x7F) {
largeid1 <<= 8;
- id1 = chip_readb(flash, bios + 0x100);
+ id1 = chip_readb(flash, bios + (0x100 << shifted));
largeid1 |= id1;
}
if (id2 == 0x7F) {
largeid2 <<= 8;
- id2 = chip_readb(flash, bios + 0x101);
+ id2 = chip_readb(flash, bios + (0x101 << shifted));
largeid2 |= id2;
}
We forgot to shift the addresses for continuation bytes in r1840. Also, probe_en29lv640b() can easily be replaced with refined probe_jedec(). Furthermore, add EN29LV640T which is the top boot sector-variant of EN29LV640B. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> --- Rudolf, if you still have access to the bifferboard, I'd very welcome testing this patch on it. This would verify the change we did in r1840 (+ its fix in this patch) + the refactoring as well. I might look into the write function later too, but currently probing functions are my main focus. flashchips.c | 32 +++++++++++++++++++++++++++++++- flashchips.h | 1 + jedec.c | 4 ++-- 3 files changed, 34 insertions(+), 3 deletions(-)