[U-Boot] [PATCH v2] Tegra: T210: Add QSPI driver

Tom Warren TWarren at nvidia.com
Mon Oct 19 21:26:21 CEST 2015


Stephen,

-----Original Message-----
From: Stephen Warren [mailto:swarren at wwwdotorg.org] 
Sent: Monday, October 19, 2015 10:37 AM
To: Tom Warren <TWarren at nvidia.com>
Cc: u-boot at lists.denx.de; jteki at openedev.com; Stephen Warren <swarren at nvidia.com>; tomcwarren3959 at gmail.com
Subject: Re: [U-Boot] [PATCH v2] Tegra: T210: Add QSPI driver

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.
[Tom] Will you be writing the binding doc?

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()?
[Tom] Yen wrote this driver originally (adapted from the regular Tegra SPI driver), so I was hoping he would answer. I can remove it and test read/write/erase/update/etc., but I'd like Yen to weigh in. Somehow he appears to have been dropped from CC again - re-adding him.

Tom
--
nvpublic


More information about the U-Boot mailing list