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>2019-02-12 10:32:45 +0800
commit249baa681c406c257369ddc6ac7daa671a5008fc (patch)
tree98450070593f92eb3ce851c3af78b8c6cce89e44 /drivers/crypto
parent5faeaea5ca4586c1aed647fc2ebd83d6c5792bc1 (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));