From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Pont Date: Tue, 9 Sep 2014 08:40:58 +0100 Subject: [U-Boot] Spansion SPI flash read timeout with AM335x Message-ID: <003b01cfcc01$6a706c60$3f514520$@pont@sdcsystems.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.