ARM: mach-shmobile: Setup consistent dma size at boot time
authorJon Medhurst <tixy@yxit.co.uk>
Thu, 4 Aug 2011 16:05:21 +0000 (17:05 +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: Paul Mundt <lethal@linux-sh.org>
CC: Magnus Damm <magnus.damm@gmail.com>
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-g3evm.c
arch/arm/mach-shmobile/board-g4evm.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/include/mach/memory.h

index ce5c251..167a67c 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/mfd/tmio.h>
 #include <linux/sh_clk.h>
+#include <linux/dma-mapping.h>
 #include <video/sh_mobile_lcdc.h>
 #include <video/sh_mipi_dsi.h>
 #include <sound/sh_fsi.h>
@@ -446,6 +447,8 @@ static struct map_desc ag5evm_io_desc[] __initdata = {
 static void __init ag5evm_map_io(void)
 {
        iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
 
        /* setup early devices and console here as well */
        sh73a0_add_early_devices();
index 9e0856b..ec8f9d9 100644 (file)
@@ -42,6 +42,7 @@
 #include <linux/leds.h>
 #include <linux/input/sh_keysc.h>
 #include <linux/usb/r8a66597.h>
+#include <linux/dma-mapping.h>
 
 #include <media/sh_mobile_ceu.h>
 #include <media/sh_mobile_csi2.h>
@@ -1170,6 +1171,8 @@ static struct map_desc ap4evb_io_desc[] __initdata = {
 static void __init ap4evb_map_io(void)
 {
        iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
 
        /* setup early devices and console here as well */
        sh7372_add_early_devices();
index ef4613b..8b620bf 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/gpio.h>
 #include <linux/input.h>
 #include <linux/input/sh_keysc.h>
+#include <linux/dma-mapping.h>
 #include <mach/sh7367.h>
 #include <mach/common.h>
 #include <asm/mach-types.h>
@@ -260,6 +261,8 @@ static struct map_desc g3evm_io_desc[] __initdata = {
 static void __init g3evm_map_io(void)
 {
        iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
 
        /* setup early devices and console here as well */
        sh7367_add_early_devices();
index 8e3c555..7719ddc 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/mmc/host.h>
 #include <linux/mmc/sh_mobile_sdhi.h>
 #include <linux/gpio.h>
+#include <linux/dma-mapping.h>
 #include <mach/sh7377.h>
 #include <mach/common.h>
 #include <asm/mach-types.h>
@@ -274,6 +275,8 @@ static struct map_desc g4evm_io_desc[] __initdata = {
 static void __init g4evm_map_io(void)
 {
        iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
 
        /* setup early devices and console here as well */
        sh7377_add_early_devices();
index d41c01f..671925d 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/tca6416_keypad.h>
 #include <linux/usb/r8a66597.h>
 #include <linux/usb/renesas_usbhs.h>
+#include <linux/dma-mapping.h>
 
 #include <video/sh_mobile_hdmi.h>
 #include <video/sh_mobile_lcdc.h>
@@ -1377,6 +1378,8 @@ static struct map_desc mackerel_io_desc[] __initdata = {
 static void __init mackerel_map_io(void)
 {
        iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
+       /* DMA memory at 0xf6000000 - 0xffdfffff */
+       init_consistent_dma_size(158 << 20);
 
        /* setup early devices and console here as well */
        sh7372_add_early_devices();
index ad00c3c..0ffbe81 100644 (file)
@@ -4,7 +4,4 @@
 #define PLAT_PHYS_OFFSET       UL(CONFIG_MEMORY_START)
 #define MEM_SIZE       UL(CONFIG_MEMORY_SIZE)
 
-/* DMA memory at 0xf6000000 - 0xffdfffff */
-#define CONSISTENT_DMA_SIZE (158 << 20)
-
 #endif /* __ASM_MACH_MEMORY_H */