summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Nelson <sam.nelson@ti.com>2016-11-02 13:17:13 -0400
committerSam Nelson <sam.nelson@ti.com>2016-11-15 10:50:34 -0500
commitd0f1b49b736561c82c6dee330f1042331c6fee4e (patch)
tree55825badb3530f08fd52618e6465f0e38329201d
parentd6d3e84c84d0e84a9b96c3f6f789ac642d03afcb (diff)
downloadlinuxutils-d0f1b49b736561c82c6dee330f1042331c6fee4e.tar.gz
cmemk: Fix for issue with allocating memory from CMA pool with non-keystone
coherent_dma_mask was not set for Am57x platforms and resulted in allocation failure Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rw-r--r--src/cmem/module/cmemk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmem/module/cmemk.c b/src/cmem/module/cmemk.c
index 84e3bcd..e65c3d0 100644
--- a/src/cmem/module/cmemk.c
+++ b/src/cmem/module/cmemk.c
@@ -2327,11 +2327,12 @@ int __init cmem_init(void)
/* Create cmem device */
cmem_cma_dev_0 = device_create(cmem_class, NULL, MKDEV(cmem_major, 0),
NULL, "cmem");
-#if IS_ENABLED(CONFIG_ARCH_KEYSTONE) && IS_ENABLED(CONFIG_ARM_LPAE) \
- && (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0))
cmem_cma_dev_0->coherent_dma_mask = DMA_BIT_MASK(32);
+#if IS_ENABLED(CONFIG_ARCH_KEYSTONE) && IS_ENABLED(CONFIG_ARM_LPAE)
cmem_cma_dev_0->dma_pfn_offset = KEYSTONE_DMA_PFN_OFFSET;
#endif
+#endif
for (bi = 0; bi < NBLOCKS; bi++) {
if (!block_start[bi] || !block_end[bi]) {
if (bi != 0) {