public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andy Pont <andy.pont@sdcsystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Spansion SPI flash read timeout with AM335x
Date: Tue, 9 Sep 2014 08:40:58 +0100	[thread overview]
Message-ID: <003b01cfcc01$6a706c60$3f514520$@pont@sdcsystems.com> (raw)

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.

                 reply	other threads:[~2014-09-09  7:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003b01cfcc01$6a706c60$3f514520$@pont@sdcsystems.com' \
    --to=andy.pont@sdcsystems.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox