ARM: mach-bcmring: Setup consistent dma size at boot time
authorJon Medhurst <tixy@yxit.co.uk>
Thu, 4 Aug 2011 15:35:26 +0000 (16:35 +0100)
committerJon Medhurst <tixy@yxit.co.uk>
Mon, 22 Aug 2011 12:00:12 +0000 (12:00 +0000)
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
CC: Jiandong Zheng <jdzheng@broadcom.com>
CC: Scott Branden <sbranden@broadcom.com>
arch/arm/mach-bcmring/include/mach/memory.h
arch/arm/mach-bcmring/mm.c

index 15162e4c75f9f0eb195c489606de85a44a8d3fda..8848a5bb3445c3cf6e07b3c691a00697a9c23de0 100644 (file)
@@ -25,9 +25,4 @@
 
 #define PLAT_PHYS_OFFSET CFG_GLOBAL_RAM_BASE
 
-/*
- * Maximum DMA memory allowed is 14M
- */
-#define CONSISTENT_DMA_SIZE (SZ_16M - SZ_2M)
-
 #endif
index 0f1c37e4523ae530544c29260917a1ff385273ae..8616876abb9f92df76fd4a53de0bdc01aefd494b 100644 (file)
@@ -13,6 +13,7 @@
 *****************************************************************************/
 
 #include <linux/platform_device.h>
+#include <linux/dma-mapping.h>
 #include <asm/mach/map.h>
 
 #include <mach/hardware.h>
@@ -53,4 +54,6 @@ void __init bcmring_map_io(void)
 {
 
        iotable_init(bcmring_io_desc, ARRAY_SIZE(bcmring_io_desc));
+       /* Maximum DMA memory allowed is 14M */
+       init_consistent_dma_size(14 << 20);
 }