aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-10-27 04:07:45 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-10-27 04:07:45 -0400
commit94c285108e4551157ecc1b8156921712138fa860 (patch)
tree5eed34d9e097a81542c8c640b19fb264d071518a /arch/sh
parent4c978ca3194a4002407a85b15122f793efc8616b (diff)
sh: Bump up dma_ops initialization far earlier in the boot process.
Presently this was tacked on to the dma debug init bits from fs_initcall(), which is far too late for devices setting up their own per-device coherent areas. Throw this in the beginning of mem_init(), as per the x86 iommu allocation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/mm/consistent.c2
-rw-r--r--arch/sh/mm/init.c11
2 files changed, 11 insertions, 2 deletions
diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index ef20bbabefa0..902967e3f841 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -27,8 +27,6 @@ EXPORT_SYMBOL(dma_ops);
27static int __init dma_init(void) 27static int __init dma_init(void)
28{ 28{
29 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES); 29 dma_debug_init(PREALLOC_DMA_DEBUG_ENTRIES);
30
31 no_iommu_init();
32 return 0; 30 return 0;
33} 31}
34fs_initcall(dma_init); 32fs_initcall(dma_init);
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index c8af6c5fa586..432acd07e76a 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -15,6 +15,7 @@
15#include <linux/pagemap.h> 15#include <linux/pagemap.h>
16#include <linux/percpu.h> 16#include <linux/percpu.h>
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/dma-mapping.h>
18#include <asm/mmu_context.h> 19#include <asm/mmu_context.h>
19#include <asm/tlb.h> 20#include <asm/tlb.h>
20#include <asm/cacheflush.h> 21#include <asm/cacheflush.h>
@@ -186,11 +187,21 @@ void __init paging_init(void)
186 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start)); 187 set_fixmap_nocache(FIX_UNCACHED, __pa(&__uncached_start));
187} 188}
188 189
190/*
191 * Early initialization for any I/O MMUs we might have.
192 */
193static void __init iommu_init(void)
194{
195 no_iommu_init();
196}
197
189void __init mem_init(void) 198void __init mem_init(void)
190{ 199{
191 int codesize, datasize, initsize; 200 int codesize, datasize, initsize;
192 int nid; 201 int nid;
193 202
203 iommu_init();
204
194 num_physpages = 0; 205 num_physpages = 0;
195 high_memory = NULL; 206 high_memory = NULL;
196 207