aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-04-21 05:47:29 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-04-21 15:36:00 -0400
commitb29e9f5e64fb90d2e4be1c7ef8c925b56669c74a (patch)
tree99331c544296b82abe31c55e6bca1ae37dd142c5 /arch/arm/mm/mmu.c
parent24e6c6996fb6e0e716c1dda1def1bb023a0fe43b (diff)
[ARM] mm 5: Use mem_types table in ioremap
We really want to be using the memory type table in ioremap, so we only have to do the CPU type fixups in one place. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 5821e67cf8c2..6cb80b4973d2 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -176,14 +176,7 @@ void adjust_cr(unsigned long mask, unsigned long set)
176} 176}
177#endif 177#endif
178 178
179struct mem_type { 179static struct mem_type mem_types[] = {
180 unsigned int prot_pte;
181 unsigned int prot_l1;
182 unsigned int prot_sect;
183 unsigned int domain;
184};
185
186static struct mem_type mem_types[] __initdata = {
187 [MT_DEVICE] = { 180 [MT_DEVICE] = {
188 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | 181 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
189 L_PTE_WRITE, 182 L_PTE_WRITE,
@@ -237,6 +230,11 @@ static struct mem_type mem_types[] __initdata = {
237 } 230 }
238}; 231};
239 232
233const struct mem_type *get_mem_type(unsigned int type)
234{
235 return type < ARRAY_SIZE(mem_types) ? &mem_types[type] : NULL;
236}
237
240/* 238/*
241 * Adjust the PMD section entries according to the CPU in use. 239 * Adjust the PMD section entries according to the CPU in use.
242 */ 240 */