[U-Boot] Spansion SPI flash read timeout with AM335x

Andy Pont andy.pont at sdcsystems.com
Tue Sep 9 09:40:58 CEST 2014


Hello,

I am doing some work with the TI AM3358 Starter Kit and a Spansion S25FL164K
SPI NOR flash.

Trying both U-Boot 2013.10, which ships with the TI kit, and 2014.04 I have
made the changes to board configuration file to enable SPI0 and disable I2C1
in the board pin mux, have included Spansion flash support and have added
the following entry into the Spansion devices listed in sf_params.c

{"S25FL164K",	   0x014017, 0x0140,	 4 * 1024,  2048, RD_FULL,
SECT_4K},

Using the am335x_evm_spiboot configuration I have MLO and u-boot.img files
which I can program to the SPI flash successfully and also boot the board
from.  I have a problem with read timeouts in the omap3_spi_read() function
in drivers/spi/omap3_spi.c trying to read the Linux kernel.

Having run some more tests (results below) it appears that with an "sf read"
command requesting more than about 0x16E000 bytes will fail.  On occasion,
typically the first failed attempt, the status returns 0x00000002 rather
than 0x00000007.

U-Boot# sf read ${loadaddr} 0xE0000 0x100000
SF: 1048576 bytes @ 0xe0000 Read: OK
U-Boot# sf read ${loadaddr} 0xE0000 0x140000
SF: 1310720 bytes @ 0xe0000 Read: OK
U-Boot# sf read ${loadaddr} 0xE0000 0x150000
SF: 1376256 bytes @ 0xe0000 Read: OK
U-Boot# sf read ${loadaddr} 0xE0000 0x160000
SF: 1441792 bytes @ 0xe0000 Read: OK
U-Boot# sf read ${loadaddr} 0xE0000 0x170000
omap3_spi_read SPI RXS timed out, status=0x00000007
SF: 1507328 bytes @ 0xe0000 Read: ERROR
U-Boot# sf read ${loadaddr} 0xE0000 0x168000
SF: 1474560 bytes @ 0xe0000 Read: OK
U-Boot# sf read ${loadaddr} 0xE0000 0x16C000
SF: 1490944 bytes @ 0xe0000 Read: OK
U-Boot# sf read ${loadaddr} 0xE0000 0x16E000
SF: 1499136 bytes @ 0xe0000 Read: OK
U-Boot# sf read ${loadaddr} 0xE0000 0x16F000
omap3_spi_read SPI RXS timed out, status=0x00000007
SF: 1503232 bytes @ 0xe0000 Read: ERROR

Can anyone give me some guidance on how to resolve this?

Thanks,

Andy.



More information about the U-Boot mailing list