[U-Boot-Users] problem with S29GL128N flash using cfi driver

nicky geerts nicky.geerts.news at gmail.com
Tue Jun 26 08:29:54 CEST 2007


Dear all,

I'm using a PPC405EP board, containing a 64MB SDRAM and 16MB flash
memory.  The flash memory is a S29GL128N chip, with a 16 bit
interface.
Up until today I have been using u-boot version 1.1.0 with the custom
flash driver for AMD flashes.

However, with an upcoming change to strataflash, it seemed logical to
switch to the cfi flash driver, which would support both.

Now, I have the 1.2.0 version, but the SW doesn't seem to be able to
put the flash chip in CFI request mode.  When I execute the same
commands manually, I do see the "RQY".

In the below output, the data read from the flash is actually the
flash contents (erased flash), and not the CFI information I was
expecting.

I did see in the code that info->reset_cmd in function
flash_detect_cfi is used uninitialised, so that might be a bug, but
when I use CMD0 manually it works as well, so that couldn't explain
the failure.

I would expect the third command to work (write 0x0098 to address offset 0xAA).

I'm at a loss here, did I overlook something in the configuration?

Nicky Geerts



defines in the config header:
#define CFG_FLASH_BASE		0xFF000000
#define CFG_FLASH_CFI 1
#define CFG_FLASH_CFI_DRIVER 1
#define CFG_FLASH_CFI_AMD_RESET 1
#define CFG_FLASH_USE_BUFFER_WRITE      1
#define CFG_MAX_FLASH_BANKS	1
#define CFG_MAX_FLASH_SECT	256
#define CFG_FLASH_ERASE_TOUT	120000
#define CFG_FLASH_WRITE_TOUT	1000

serial output:
U-Boot 1.2.0 (Jun 25 2007 - 14:29:22)

CPU:   AMCC PowerPC 405EP Rev. B at 266.666 MHz (PLB=133, OPB=66, EBC=33 MHz)
       I2C boot EEPROM disabled
       Internal PCI arbiter enabled
       16 kB I-Cache 16 kB D-Cache
Board: ###
I2C:   ready
DRAM:  64 MB
Top of RAM usable for U-Boot at: 04000000
Reserving 185k for U-Boot at: 03fd1000
Reserving 384k for malloc() at: 03f71000
Reserving 140 Bytes for Board Info at: 03f70f74
Reserving 48 Bytes for Global Data at: 03f70f44
Stack Pointer at: 03f70f28
New Stack Pointer is: 03f70f28
Now running in RAM - U-Boot at: 03fd1000
FLASH: flash detect cfi
fwc addr ff000000 cmd 0 0000 16bit x 8 bit
fwc addr ff0000aa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr ff000020 is= ffff 5151
fwc addr ff000aaa cmd 98 9898 16bit x 8 bit
is= cmd 51(Q) addr ff000020 is= ffff 5151
fwc addr ff000000 cmd 0 0000 16bit x 16 bit
fwc addr ff0000aa cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr ff000020 is= ffff 0051
fwc addr ff000aaa cmd 98 0098 16bit x 16 bit
is= cmd 51(Q) addr ff000020 is= ffff 0051
fwc addr ff000000 cmd 0 00000000 32bit x 8 bit
fwc addr ff000154 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr ff000040 is= ffffffff 51515151
fwc addr ff001554 cmd 98 98989898 32bit x 8 bit
is= cmd 51(Q) addr ff000040 is= ffffffff 51515151
fwc addr ff000000 cmd 0 00000000 32bit x 16 bit
fwc addr ff000154 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr ff000040 is= ffffffff 00510051
fwc addr ff001554 cmd 98 00980098 32bit x 16 bit
is= cmd 51(Q) addr ff000040 is= ffffffff 00510051
fwc addr ff000000 cmd 0 00000000 32bit x 32 bit
fwc addr ff000154 cmd 98 00000098 32bit x 32 bit
is= cmd 51(Q) addr ff000040 is= ffffffff 00000051
fwc addr ff001554 cmd 98 00000098 32bit x 32 bit
is= cmd 51(Q) addr ff000040 is= ffffffff 00000051
fwrite addr ff000000 cmd 0 0000000000000000 64 bit x 8 bit
fwrite addr ff0002a8 cmd 98 9898989898989898 64 bit x 8 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 5151515151515151
fwrite addr ff002aa8 cmd 98 9898989898989898 64 bit x 8 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 5151515151515151
fwrite addr ff000000 cmd 0 0000000000000000 64 bit x 16 bit
fwrite addr ff0002a8 cmd 98 0098009800980098 64 bit x 16 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 0051005100510051
fwrite addr ff002aa8 cmd 98 0098009800980098 64 bit x 16 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 0051005100510051
fwrite addr ff000000 cmd 0 0000000000000000 64 bit x 32 bit
fwrite addr ff0002a8 cmd 98 0000009800000098 64 bit x 32 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 0000005100000051
fwrite addr ff002aa8 cmd 98 0000009800000098 64 bit x 32 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 0000005100000051
fwrite addr ff000000 cmd 0 0000000000000000 64 bit x 64 bit
fwrite addr ff0002a8 cmd 98 0000000000000098 64 bit x 64 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 0000000000000051
fwrite addr ff002aa8 cmd 98 0000000000000098 64 bit x 64 bit
is= cmd 51(Q) addr ff000080 is= ffffffffffffffff 0000000000000051
not found
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
flash_protect ON: from 0xFFFC0000 to 0xFFFE90FF
flash_protect ON: from 0xFFF80000 to 0xFFF9FFFF
flash_protect ON: from 0xFFFA0000 to 0xFFFBFFFF
*** failed ***
### ERROR ### Please RESET the board ###




More information about the U-Boot mailing list