瀏覽代碼

ARM: mach-bcmring: Setup consistent dma size at boot time

Signed-off-by: Jon Medhurst <tixy@yxit.co.uk>
CC: Jiandong Zheng <jdzheng@broadcom.com>
CC: Scott Branden <sbranden@broadcom.com>
Jon Medhurst 14 年之前
父節點
當前提交
2d5e975b21
共有 2 個文件被更改,包括 3 次插入5 次删除
  1. 0 5
      arch/arm/mach-bcmring/include/mach/memory.h
  2. 3 0
      arch/arm/mach-bcmring/mm.c

+ 0 - 5
arch/arm/mach-bcmring/include/mach/memory.h

@@ -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

+ 3 - 0
arch/arm/mach-bcmring/mm.c

@@ -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);
 }