]> git.sur5r.net Git - u-boot/commitdiff
spi: ti_qspi: Add dummy readl for bus sync
authorVignesh R <vigneshr@ti.com>
Tue, 10 Nov 2015 06:22:10 +0000 (11:52 +0530)
committerJagan Teki <jteki@openedev.com>
Tue, 17 Nov 2015 18:13:29 +0000 (23:43 +0530)
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>
drivers/spi/ti_qspi.c

index ecd9d78ae3873e4da21c10e03750f1400d3edeb7..646dd899d3ec262e1afdc22b66446d294540a257 100644 (file)
@@ -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)