Idea is to enable memory mapped by default at the end of the probe, if the control reaches the "transfer" api, then the operation is not a memory mapped one. Hence, we switch to Normal mode and at the end of the "transfer" function. switch back to memory mapped mode. Signed-off-by: Sourav Poddar <sourav.poddar@xxxxxx> --- drivers/spi/spi-ti-qspi.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/drivers/spi/spi-ti-qspi.c b/drivers/spi/spi-ti-qspi.c index d21d40d..ba95d64 100644 --- a/drivers/spi/spi-ti-qspi.c +++ b/drivers/spi/spi-ti-qspi.c @@ -415,6 +415,8 @@ static int ti_qspi_start_transfer_one(struct spi_master *master, int status = 0, ret; int frame_length; + disable_qspi_memory_mapped(qspi); + /* setup device control reg */ qspi->dc = 0; @@ -460,6 +462,8 @@ static int ti_qspi_start_transfer_one(struct spi_master *master, ti_qspi_write(qspi, qspi->cmd | QSPI_INVAL, QSPI_SPI_CMD_REG); + enable_qspi_memory_mapped(qspi); + return status; } @@ -613,6 +617,8 @@ static int ti_qspi_probe(struct platform_device *pdev) if (ret) goto free_master; + enable_qspi_memory_mapped(qspi); + return 0; free_master: -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html