summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorFranck LENORMAND <franck.lenormand@nxp.com>2018-06-05 14:37:46 +0200
committerJason Liu <jason.hui.liu@nxp.com>2018-10-29 11:10:38 +0800
commitd07274fcddde4258e63edf2a77dc29aef19a0d27 (patch)
tree02ce7245a3d2467d041c6723a169f897e08512e8 /drivers/crypto
parentaad9f7af35e84432e7a01790bc890f192163f7c1 (diff)
MLK-18082: crypto: caam: Fix DMA coherency configuration
The DMA configuration of the CAAM for imx8 boards is not strictly related to the architecture of the kernel. Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/jr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index 95163df77704..71d64ff210d0 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -505,7 +505,11 @@ static int caam_jr_probe(struct platform_device *pdev)
jrpriv->rregs = (struct caam_job_ring __iomem __force *)ctrl;
- if (sizeof(dma_addr_t) == sizeof(u64)) {
+ if (of_machine_is_compatible("fsl,imx8qm") ||
+ of_machine_is_compatible("fsl,imx8qxp") ||
+ of_machine_is_compatible("fsl,imx8mq")) {
+ error = dma_set_mask_and_coherent(jrdev, DMA_BIT_MASK(32));
+ } else if (sizeof(dma_addr_t) == sizeof(u64)) {
if (caam_dpaa2)
error = dma_set_mask_and_coherent(jrdev,
DMA_BIT_MASK(49));