diff options
author | Sam Nelson <sam.nelson@ti.com> | 2016-11-02 13:17:13 -0400 |
---|---|---|
committer | Sam Nelson <sam.nelson@ti.com> | 2016-11-15 10:50:34 -0500 |
commit | d0f1b49b736561c82c6dee330f1042331c6fee4e (patch) | |
tree | 55825badb3530f08fd52618e6465f0e38329201d | |
parent | d6d3e84c84d0e84a9b96c3f6f789ac642d03afcb (diff) | |
download | linuxutils-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.c | 5 |
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) { |