Hi
Following patch adds the en29lv640b which needs special command sequences in 8 bit mode. Also, 8 bit programming needs actually 16bit double byte program.
The chip is found on bifferboard.
Please check the patch and let me know.
Signed-off-by: Rudolf Marek r.marek@assembler.cz
Thanks Rudolf
Ping?
Thanks Rudolf
Ping2?
I wait for this before doing some announce of BifferBoard support in coreboot.
Thanks Rudolf
On Sat, Apr 07, 2012 at 03:04:56PM +0200, Rudolf Marek wrote:
Ping2?
Thanks, committed in r1521 with a few minor cosmetic changes.
I also changed the voltage range to 2.7V-3.6V as per datasheet, I assume the 4.5V-5.5V was a copy-paste left-over?
What about erase_en29lv640b()? That's not used externally, and should probably be made static?
Cheers, Uwe.
Thanks, committed in r1521 with a few minor cosmetic changes.
Thanks!
I also changed the voltage range to 2.7V-3.6V as per datasheet, I assume the 4.5V-5.5V was a copy-paste left-over?
Yes this is possible.
What about erase_en29lv640b()? That's not used externally, and should probably be made static?
True. Perhaps this can be changed by someone with commit rights ;)
Thanks again, I guess now it is time to announce the support for bifferboard with coreboot.
Thanks Rudolf
On Sun, 15 Apr 2012 00:52:19 +0200 Uwe Hermann uwe@hermann-uwe.de wrote:
What about erase_en29lv640b()? That's not used externally, and should probably be made static?
it *is* used in flashchips.c for the respective chip of course...
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(-)
diff --git a/flashchips.c b/flashchips.c index 74b58ba..80fe1f5 100644 --- a/flashchips.c +++ b/flashchips.c @@ -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, diff --git a/flashchips.h b/flashchips.h index f0fbf4b..b2418bb 100644 --- a/flashchips.h +++ b/flashchips.h @@ -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 */ diff --git a/jedec.c b/jedec.c index 358b850..dce110d 100644 --- a/jedec.c +++ b/jedec.c @@ -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; }