summaryrefslogtreecommitdiffstats
path: root/drivers/spi/atmel-quadspi.c
diff options
context:
space:
mode:
authorPratyush Yadav <p.yadav@ti.com>2020-06-24 00:00:16 +0530
committerMark Brown <broonie@kernel.org>2020-07-14 17:29:39 +0100
commit5c81c275582c9d9c66d2f928591a2065f2528231 (patch)
tree1fb43bee5b56da19f2c50c0eb825d712d58a86d3 /drivers/spi/atmel-quadspi.c
parentcaf72df48be32c39f74287976ae843501ae06949 (diff)
downloadlinux-5c81c275582c9d9c66d2f928591a2065f2528231.tar.bz2
spi: atmel-quadspi: reject DTR ops
Double Transfer Rate (DTR) ops are added in spi-mem. But this controller doesn't support DTR transactions. Since we don't use the default supports_op(), which rejects all DTR ops, do that explicitly in our supports_op(). Signed-off-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/20200623183030.26591-4-p.yadav@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi/atmel-quadspi.c')
-rw-r--r--drivers/spi/atmel-quadspi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/spi/atmel-quadspi.c b/drivers/spi/atmel-quadspi.c
index cb44d1e169aa..a898755fb41e 100644
--- a/drivers/spi/atmel-quadspi.c
+++ b/drivers/spi/atmel-quadspi.c
@@ -285,6 +285,12 @@ static bool atmel_qspi_supports_op(struct spi_mem *mem,
op->dummy.nbytes == 0)
return false;
+ /* DTR ops not supported. */
+ if (op->cmd.dtr || op->addr.dtr || op->dummy.dtr || op->data.dtr)
+ return false;
+ if (op->cmd.nbytes != 1)
+ return false;
+
return true;
}