[U-Boot] [PATCH 1/2] spi: ti_qspi: Add dummy readl for bus sync
Jagan Teki
jteki at openedev.com
Tue Nov 17 07:03:24 CET 2015
On 10 November 2015 at 11:52, Vignesh R <vigneshr at ti.com> wrote:
> Add dummy readl after invalidating cmd field of QSPI_CMD_REG to ensure
> bus sync. Without this device's CS is not deactivated reliably leading
> to failure to enumerate flash or failure to set quad enable bit on
> Macronix flash present on am437x-sk and am437x-idk evms.
>
> Signed-off-by: Vignesh R <vigneshr at ti.com>
> ---
> drivers/spi/ti_qspi.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
> index bd63db8a2acc..ba2da017c21a 100644
> --- a/drivers/spi/ti_qspi.c
> +++ b/drivers/spi/ti_qspi.c
> @@ -170,6 +170,8 @@ void spi_cs_deactivate(struct spi_slave *slave)
> debug("spi_cs_deactivate: 0x%08x\n", (u32)slave);
>
> writel(qslave->cmd | QSPI_INVAL, &qslave->base->cmd);
> + /* dummy readl to ensure bus sync */
> + readl(&qslave->base->cmd);
Isn't effect anything for non-quad case? and dummy bytes might changed
based on quad and quadio does this single dummy readl is same for
those cases as well?
thanks!
--
Jagan | openedev.
More information about the U-Boot
mailing list