diff options
author | David Daney <ddaney@caviumnetworks.com> | 2010-10-01 16:27:33 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-10-29 14:08:32 -0400 |
commit | ee71b7d2f834d5e4b3a43001b2fa88743ed71a2c (patch) | |
tree | 9d7c5359c42908712a982c14f7dbf2d0b59f9e3c /arch/mips | |
parent | 48e1fd5a81416a037f5a48120bf281102f2584e2 (diff) |
MIPS: Add a platform hook for swiotlb setup.
This allows platforms that are using the swiotlb to initialize it.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Patchwork: http://patchwork.linux-mips.org/patch/1638/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/bootinfo.h | 12 | ||||
-rw-r--r-- | arch/mips/kernel/setup.c | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/include/asm/bootinfo.h b/arch/mips/include/asm/bootinfo.h index 15a8ef0707c6..35cd1bab69c3 100644 --- a/arch/mips/include/asm/bootinfo.h +++ b/arch/mips/include/asm/bootinfo.h | |||
@@ -125,4 +125,16 @@ extern unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3; | |||
125 | */ | 125 | */ |
126 | extern void plat_mem_setup(void); | 126 | extern void plat_mem_setup(void); |
127 | 127 | ||
128 | #ifdef CONFIG_SWIOTLB | ||
129 | /* | ||
130 | * Optional platform hook to call swiotlb_setup(). | ||
131 | */ | ||
132 | extern void plat_swiotlb_setup(void); | ||
133 | |||
134 | #else | ||
135 | |||
136 | static inline void plat_swiotlb_setup(void) {} | ||
137 | |||
138 | #endif /* CONFIG_SWIOTLB */ | ||
139 | |||
128 | #endif /* _ASM_BOOTINFO_H */ | 140 | #endif /* _ASM_BOOTINFO_H */ |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index a6b900f2962b..acd3f2c49c06 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -490,6 +490,7 @@ static void __init arch_mem_init(char **cmdline_p) | |||
490 | bootmem_init(); | 490 | bootmem_init(); |
491 | device_tree_init(); | 491 | device_tree_init(); |
492 | sparse_init(); | 492 | sparse_init(); |
493 | plat_swiotlb_setup(); | ||
493 | paging_init(); | 494 | paging_init(); |
494 | } | 495 | } |
495 | 496 | ||