aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-03-27 20:25:43 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-31 09:47:43 -0400
commit57deb8fea01f732d83711ab3b3310204d0026ba8 (patch)
tree13678070a6be2ee281aa5001993d17c240d50f2a
parent2bbf63264ab2e8cbc740c738f66984b2aafa29c5 (diff)
powerpc/wii: Don't rely on the reserved memory hack
Because the two memory blocks (usually called MEM1 and MEM2) are not merged anymore, __request_region in kernel/resource.c will correctly allow reserving regions in the physical address space between MEM1 and MEM2, where many important peripherals are (GPIO, MMC, USB, ...). A previous change to __ioremap_caller in arch/powerpc/mm/pgtable_32.c ensures that multiple memblocks are properly considered in ioremap; this makes it unnecessary to set __allow_ioremap_reserved. Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/platforms/embedded6xx/wii.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
index 419a88938b0a..8bb46dcbebd8 100644
--- a/arch/powerpc/platforms/embedded6xx/wii.c
+++ b/arch/powerpc/platforms/embedded6xx/wii.c
@@ -80,21 +80,9 @@ void __init wii_memory_fixups(void)
80 BUG_ON(memblock.memory.cnt != 2); 80 BUG_ON(memblock.memory.cnt != 2);
81 BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base)); 81 BUG_ON(!page_aligned(p[0].base) || !page_aligned(p[1].base));
82 82
83 /* trim unaligned tail */ 83 /* determine hole */
84 memblock_remove(ALIGN(p[1].base + p[1].size, PAGE_SIZE),
85 (phys_addr_t)ULLONG_MAX);
86
87 /* determine hole, add & reserve them */
88 wii_hole_start = ALIGN(p[0].base + p[0].size, PAGE_SIZE); 84 wii_hole_start = ALIGN(p[0].base + p[0].size, PAGE_SIZE);
89 wii_hole_size = p[1].base - wii_hole_start; 85 wii_hole_size = p[1].base - wii_hole_start;
90 memblock_add(wii_hole_start, wii_hole_size);
91 memblock_reserve(wii_hole_start, wii_hole_size);
92
93 BUG_ON(memblock.memory.cnt != 1);
94 __memblock_dump_all();
95
96 /* allow ioremapping the address space in the hole */
97 __allow_ioremap_reserved = 1;
98} 86}
99 87
100unsigned long __init wii_mmu_mapin_mem2(unsigned long top) 88unsigned long __init wii_mmu_mapin_mem2(unsigned long top)