From: Andy Pont <andy.pont@sdcsystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] spi: omap3: Fix timeout handling
Date: Wed, 1 Apr 2015 16:21:50 +0100 [thread overview]
Message-ID: <003b01d06c8f$9b74a360$d25dea20$@pont@sdcsystems.com> (raw)
In-Reply-To: <1427890824-1599-1-git-send-email-davidcdueck@googlemail.com>
Hi David,
<snipped for brevity>
> for (i = 0; i < len; i++) {
> /* wait till TX register is empty (TXS == 1) */
> + start = get_timer(0);
> while (!(readl(&ds->regs->channel[ds->slave.cs].chstat) &
> OMAP3_MCSPI_CHSTAT_TXS)) {
> - if (--timeout <= 0) {
> + if (get_timer(start) > SPI_WAIT_TIMEOUT) {
> printf("SPI TXS timed out, status=0x%08x\n",
> readl(&ds->regs->channel[ds-
> >slave.cs].chstat));
> return -1;
I have a couple of questions...
Firstly, when in SPL is there access to the get_timer() function?
Secondly, when using Falcon mode to load Linux directly from SPI (Falcon
mode) then we want to maximise the throughput and save every CPU cycle we
possibly can. Adding yet another function call into the for loop and hence
calling it a couple of million times seems, on the face of it, like it is
going to slow things down.
Regards,
Andy.
next prev parent reply other threads:[~2015-04-01 15:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 12:20 [U-Boot] [PATCH v2] spi: omap3: Fix timeout handling David Dueck
2015-04-01 12:23 ` Jagan Teki
2015-04-01 15:21 ` Andy Pont [this message]
[not found] ` <551c0d2b.6d4ec20a.1fa8.ffffd270SMTPIN_ADDED_BROKEN@mx.google.com>
2015-04-07 0:25 ` Tom Rini
2015-04-24 9:49 ` Jagan Teki
2015-04-24 11:34 ` D. Dueck
2015-04-27 15:40 ` Jagan Teki
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='003b01d06c8f$9b74a360$d25dea20$@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