summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorVignesh R <vigneshr@ti.com>2015-11-10 11:52:10 +0530
committerJagan Teki <jteki@openedev.com>2015-11-17 23:43:29 +0530
commit857db48e5f6372eead8a32469d981801e775ee48 (patch)
tree1682f31b381f2664756faec99620366601bffb47 /drivers/spi
parent3d4825446e4258192e1f2302d691a8c0c82a0975 (diff)
downloadu-boot-imx-857db48e5f6372eead8a32469d981801e775ee48.zip
u-boot-imx-857db48e5f6372eead8a32469d981801e775ee48.tar.gz
u-boot-imx-857db48e5f6372eead8a32469d981801e775ee48.tar.bz2
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 <vigneshr@ti.com> Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/ti_qspi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
index ecd9d78..646dd89 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)