summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccp/ccp-platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/ccp/ccp-platform.c')
-rw-r--r--drivers/crypto/ccp/ccp-platform.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-platform.c b/drivers/crypto/ccp/ccp-platform.c
index 65e58291c66..b0a2806908f 100644
--- a/drivers/crypto/ccp/ccp-platform.c
+++ b/drivers/crypto/ccp/ccp-platform.c
@@ -22,6 +22,7 @@
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/ccp.h>
+#include <linux/of.h>
#include "ccp-dev.h"
@@ -112,6 +113,11 @@ static int ccp_platform_probe(struct platform_device *pdev)
*(dev->dma_mask) = DMA_BIT_MASK(48);
dev->coherent_dma_mask = DMA_BIT_MASK(48);
+ if (of_property_read_bool(dev->of_node, "dma-coherent"))
+ ccp->axcache = CACHE_WB_NO_ALLOC;
+ else
+ ccp->axcache = CACHE_NONE;
+
dev_set_drvdata(dev, ccp);
ret = ccp_init(ccp);