aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorJon Medhurst <tixy@yxit.co.uk>2011-08-03 11:57:19 -0400
committerJon Medhurst <tixy@yxit.co.uk>2011-08-22 08:00:10 -0400
commit009426a0ebd0fc4a230ab2c2295dbc8f7ba7e8dd (patch)
tree629daf1f542f8361c4a55395bdbf1f8f5da85464 /arch/arm
parent99d1717dd7fecf2b10195b0d864323b952b4eba0 (diff)
ARM: omap: Setup consistent dma size at boot time
Signed-off-by: Jon Medhurst <tixy@yxit.co.uk> CC: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap1/io.c1
-rw-r--r--arch/arm/mach-omap2/io.c2
-rw-r--r--arch/arm/plat-omap/include/plat/io.h2
-rw-r--r--arch/arm/plat-omap/include/plat/memory.h13
-rw-r--r--arch/arm/plat-omap/io.c8
5 files changed, 12 insertions, 14 deletions
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 870886a29594..1cfa1b6bb62b 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -121,6 +121,7 @@ void __init omap1_map_common_io(void)
121#endif 121#endif
122 122
123 omap_sram_init(); 123 omap_sram_init();
124 omap_init_consistent_dma_size();
124} 125}
125 126
126/* 127/*
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 2ce1ce6fb4db..d6d01cb7f28a 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -16,7 +16,6 @@
16 * it under the terms of the GNU General Public License version 2 as 16 * it under the terms of the GNU General Public License version 2 as
17 * published by the Free Software Foundation. 17 * published by the Free Software Foundation.
18 */ 18 */
19
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/init.h> 21#include <linux/init.h>
@@ -250,6 +249,7 @@ static void __init _omap2_map_common_io(void)
250 249
251 omap2_check_revision(); 250 omap2_check_revision();
252 omap_sram_init(); 251 omap_sram_init();
252 omap_init_consistent_dma_size();
253} 253}
254 254
255#ifdef CONFIG_SOC_OMAP2420 255#ifdef CONFIG_SOC_OMAP2420
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index d72ec85c97e6..ebe67ea8d068 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -309,6 +309,8 @@ extern void omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
309void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type); 309void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type);
310void omap_iounmap(volatile void __iomem *addr); 310void omap_iounmap(volatile void __iomem *addr);
311 311
312extern void __init omap_init_consistent_dma_size(void);
313
312#endif 314#endif
313 315
314#endif 316#endif
diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h
index e6720aa2d553..7f9df6f1e113 100644
--- a/arch/arm/plat-omap/include/plat/memory.h
+++ b/arch/arm/plat-omap/include/plat/memory.h
@@ -85,18 +85,5 @@
85 85
86#endif /* CONFIG_ARCH_OMAP15XX */ 86#endif /* CONFIG_ARCH_OMAP15XX */
87 87
88/* Override the ARM default */
89#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
90
91#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
92#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
93#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
94#endif
95
96#define CONSISTENT_DMA_SIZE \
97 (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
98
99#endif
100
101#endif 88#endif
102 89
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
index f1ecfa9fc61d..e9b0e23edd0a 100644
--- a/arch/arm/plat-omap/io.c
+++ b/arch/arm/plat-omap/io.c
@@ -12,6 +12,7 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/mm.h> 14#include <linux/mm.h>
15#include <linux/dma-mapping.h>
15 16
16#include <plat/omap7xx.h> 17#include <plat/omap7xx.h>
17#include <plat/omap1510.h> 18#include <plat/omap1510.h>
@@ -139,3 +140,10 @@ void omap_iounmap(volatile void __iomem *addr)
139 __iounmap(addr); 140 __iounmap(addr);
140} 141}
141EXPORT_SYMBOL(omap_iounmap); 142EXPORT_SYMBOL(omap_iounmap);
143
144void __init omap_init_consistent_dma_size(void)
145{
146#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
147 init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
148#endif
149}