From: Vignesh R Date: Tue, 10 Nov 2015 06:22:10 +0000 (+0530) Subject: spi: ti_qspi: Add dummy readl for bus sync X-Git-Tag: v2016.01-rc2~242^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=857db48e5f6372eead8a32469d981801e775ee48;p=u-boot spi: ti_qspi: Add dummy readl for bus sync 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 Reviewed-by: Mugunthan V N Reviewed-by: Jagan Teki --- diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c index ecd9d78ae3..646dd899d3 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); } void spi_init(void)