[U-Boot] [PATCH v2] Tegra: T210: Add QSPI driver
Stephen Warren
swarren at wwwdotorg.org
Mon Oct 19 19:37:21 CEST 2015
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()?
More information about the U-Boot
mailing list