Skip to contentSkip to conversation

TRAB: Flash Am29LV320DB confusion

U-Boot-Users triloksoni 3 participants 4 messages Jan 25, 2005 – Jan 26, 2005

lore
Share & tools
lore

triloksoni

author
#0 lore raw

Hi All,

I was just going through the "flash.c" code of TRAB board. Which is having AM29LV320D (2M x 16bit) flash chip. We are also going to use the same chip for our new board in 16bit mode.

Confusion is in flash_init(...) code. As per the sector architecture mentioned in
the datasheet : Eight 8 Kbytes sector and Sixty Three 64Kbytes sectors. Then why this code has
mentioned remaining sector size as 128Kbytes :

board/trab/flash.c:
--------------snip-------------------------

                        switch (info->flash_id & FLASH_TYPEMASK) {
                        case (FLASH_AM320B & FLASH_TYPEMASK):
                        case (FLASH_MXLV320B & FLASH_TYPEMASK):
                                /* Boot sector type: 8 x 8 + N x 128 kB */
                               /* Why N x 128 kB?? It should be N x 64 
kB. */
                                flashbase += (j < 8) ? 0x4000 : 0x20000;
                                break;

--------------snip-------------------------

Am I missing something ???

---Trilok Soni

#1 lore raw

Dear Trilok,

Quoted 4 lines · in message <[email protected]> you wrote:

the datasheet : Eight 8 Kbytes sector and Sixty Three 64Kbytes sectors. Then why this code has
mentioned remaining sector size as 128Kbytes :

There are 2 flash chips in parallel to have a 2 x 16 = 32 bit wide bus, and 2 x 64 KiB = 128 KiB.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Roses are red
Violets are blue
Some poems rhyme
#2 lore raw

Btw.: Will an AM29LV320D work with the cfi_flash generic driver? Does anybody know that?

Best regards,

Peter Asemann

#3 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

Btw.: Will an AM29LV320D work with the cfi_flash generic driver? Does anybody know that?

Yes. Yes.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are some things worth dying for.
	-- Kirk, "Errand of Mercy", stardate 3201.7