9
0
Fork 0

ARM Chumby: Add MMU support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2011-01-20 09:38:20 +01:00
parent 6729267643
commit 61a8639441
1 changed files with 23 additions and 0 deletions

View File

@ -25,6 +25,7 @@
#include <usb/ehci.h>
#include <asm/armlinux.h>
#include <asm/io.h>
#include <asm/mmu.h>
#include <generated/mach-types.h>
#include <mach/imx-regs.h>
#include <mach/clock.h>
@ -264,6 +265,28 @@ static const uint32_t pad_setup[] = {
GPMI_RDY3_GPIO | GPIO_IN | PULLUP(1),
};
#ifdef CONFIG_MMU
static int falconwing_mmu_init(void)
{
mmu_init();
arm_create_section(0x40000000, 0x40000000, 64, PMD_SECT_DEF_CACHED);
arm_create_section(0x50000000, 0x40000000, 64, PMD_SECT_DEF_UNCACHED);
setup_dma_coherent(0x10000000);
#if TEXT_BASE & (0x100000 - 1)
#warning cannot create vector section. Adjust TEXT_BASE to a 1M boundary
#else
arm_create_section(0x0, TEXT_BASE, 1, PMD_SECT_DEF_UNCACHED);
#endif
mmu_enable();
return 0;
}
postcore_initcall(falconwing_mmu_init);
#endif
/**
* Try to register an environment storage on the attached MCI card
* @return 0 on success