armv7: use start and size parameters in mmu_setup()

mmu_setup() was originally written in U-Boot to utilize board-specific
global data. Since we're trying to avoid that, we added start and size
parameters so that board-specific info can be passed in via mainboard
code. Let's start using it that way.

Change-Id: I7d7de0e42bd918c9f9f0c177acaf56c110bf8353
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/2378
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
This commit is contained in:
David Hendricks 2013-02-12 15:30:17 -08:00
parent 1b6fecd64d
commit b25208fc8b
1 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@ static inline void dram_bank_mmu_setup(unsigned long start, unsigned long size)
}
/* to activate the MMU we need to set up virtual memory: use 1M areas */
inline void mmu_setup(unsigned long start, unsigned long size)
inline void mmu_setup(unsigned long start, unsigned long size_mb)
{
int i;
u32 reg;
@ -125,7 +125,7 @@ inline void mmu_setup(unsigned long start, unsigned long size)
for (i = 0; i < 4096; i++)
set_section_dcache(i, DCACHE_OFF);
dram_bank_mmu_setup(CONFIG_SYS_SDRAM_BASE, CONFIG_DRAM_SIZE_MB << 20);
dram_bank_mmu_setup(start, size_mb << 20);
/* Copy the page table address to cp15 */
asm volatile("mcr p15, 0, %0, c2, c0, 0"