From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] spi subystem maintainer?
Date: Thu, 03 Feb 2011 12:07:33 +0100 [thread overview]
Message-ID: <4D4A8C75.30102@denx.de> (raw)
In-Reply-To: <FEEB1B72-E418-4B1C-84DD-CBDE22423CA9@kernel.crashing.org>
On 02/03/2011 11:36 AM, Kumar Gala wrote:
> That's correct, and with the newer FSL controller's we dont have
> direct control over the CS.
I know. You are probably talking about PowerPC, but it is the same for
the i.MX processors.
> I'm thinking we need to have the command
> and response dealt with in a single call to spi_xfer instead of what
> we seem to do all over the place today:
>
> ret = spi_xfer(spi, 8, &cmd, NULL, flags); if (ret) { debug("SF:
> Failed to send command %02x: %d\n", cmd, ret); return ret; }
Ok. You are not talking generally about spi, but how to manage spi
flash. I saw the same problem with the i.MX51, but then a GPIO was used
instead of the internal SS and I forgot this issue. We do not need to
change the spi_xfer() call (I mean, in the spi controllers).
>
> if (len) { ret = spi_xfer(spi, len * 8, NULL, response,
> SPI_XFER_END); if (ret) debug("SF: Failed to read response (%zu
> bytes): %d\n", len, ret); }
>
> Needs to turn into something like:
>
> ret = spi_xfer(spi, 8 + len * 8, &cmd, response, flags |
> SPI_XFER_END)
I think it could depend on the SPI flash you use. I checked in
stmicro.c, and the mechanism to split the enabling of SS and the
transfer of data is really used.
In stmicro_wait_ready(), it is used to poll the status of the flash. The
SS is active until the flash has complete the operation. Probably the
flash can accept a single call, too, but I am unsure.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
next prev parent reply other threads:[~2011-02-03 11:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 16:00 [U-Boot] spi subystem maintainer? Kumar Gala
2011-02-01 19:29 ` Wolfgang Denk
2011-02-02 7:23 ` Kumar Gala
2011-02-02 9:23 ` Stefano Babic
2011-02-02 9:30 ` Reinhard Meyer
2011-02-03 10:36 ` Kumar Gala
2011-02-03 11:07 ` Stefano Babic [this message]
2011-02-15 8:36 ` Mike Frysinger
2011-02-15 23:10 ` Kumar Gala
2011-02-17 5:04 ` Mike Frysinger
2011-08-18 20:50 ` Mike Frysinger
2011-02-15 8:22 ` Mike Frysinger
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=4D4A8C75.30102@denx.de \
--to=sbabic@denx.de \
--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