public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] Tegra: T210: Add QSPI driver
Date: Mon, 19 Oct 2015 11:37:21 -0600	[thread overview]
Message-ID: <56252A51.2080802@wwwdotorg.org> (raw)
In-Reply-To: <1445034200-3691-1-git-send-email-twarren@nvidia.com>

On 10/16/2015 04:23 PM, Tom Warren wrote:
> This is the normal Tegra SPI driver modified to work with the
> QSPI controller in Tegra210. It does not do 2x/4x transfers
> or any other QSPI protocol.

I've just realized we don't have a binding document for QSPI. I believe 
we need to get one into the Linux kernel's DT binding docs repo as part 
of the work on this driver. Presumably this controller is very similar 
to the other Tegra SPI controllers, so this will be a simple process.

The code looks OK at a quick glance, except for the nit below.

> diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c

> +static int tegra210_qspi_claim_bus(struct udevice *bus)

> +	/* Clear stale status here */
> +	setbits_le32(&regs->fifo_status,
> +		     QSPI_FIFO_STS_ERR	|
> +		     QSPI_FIFO_STS_TX_FIFO_OVF	|
> +		     QSPI_FIFO_STS_TX_FIFO_UNR	|
> +		     QSPI_FIFO_STS_RX_FIFO_OVF	|
> +		     QSPI_FIFO_STS_RX_FIFO_UNR	|
> +		     QSPI_FIFO_STS_TX_FIFO_FULL	|
> +		     QSPI_FIFO_STS_TX_FIFO_EMPTY	|
> +		     QSPI_FIFO_STS_RX_FIFO_FULL	|
> +		     QSPI_FIFO_STS_RX_FIFO_EMPTY);
> +	debug("%s: FIFO STATUS = %08x\n", __func__, readl(&regs->fifo_status));

Isn't this redundant with the status clear at the start of 
tegra210_qspi_xfer()?

  reply	other threads:[~2015-10-19 17:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 22:23 [U-Boot] [PATCH v2] Tegra: T210: Add QSPI driver Tom Warren
2015-10-19 17:37 ` Stephen Warren [this message]
2015-10-19 19:26   ` Tom Warren

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=56252A51.2080802@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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