From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Mon, 19 Oct 2015 11:37:21 -0600 Subject: [U-Boot] [PATCH v2] Tegra: T210: Add QSPI driver In-Reply-To: <1445034200-3691-1-git-send-email-twarren@nvidia.com> References: <1445034200-3691-1-git-send-email-twarren@nvidia.com> Message-ID: <56252A51.2080802@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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(®s->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(®s->fifo_status)); Isn't this redundant with the status clear at the start of tegra210_qspi_xfer()?