9
0
Fork 0

pca100: Add MMU support

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-09-09 11:31:30 +02:00
parent 970606b123
commit 019b16fd5f
2 changed files with 26 additions and 0 deletions

View File

@ -237,6 +237,7 @@ config MACH_PCA100
bool "phyCard-i.MX27"
select ARCH_IMX27
select MACH_HAS_LOWLEVEL_INIT
select HAVE_MMU
help
Say Y here if you are using Phytec's phyCard-i.MX27 (pca100) equipped
with a Freescale i.MX27 Processor

View File

@ -37,6 +37,7 @@
#include <asm/arch/imx-nand.h>
#include <asm/arch/imx-pll.h>
#include <gpio.h>
#include <asm/mmu.h>
static struct memory_platform_data ram_pdata = {
.name = "ram0",
@ -72,6 +73,29 @@ static struct device_d nand_dev = {
.platform_data = &nand_info,
};
#ifdef CONFIG_MMU
static void pca100_mmu_init(void)
{
mmu_init();
arm_create_section(0xa0000000, 0xa0000000, 128, PMD_SECT_DEF_CACHED);
arm_create_section(0xb0000000, 0xa0000000, 128, 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();
}
#else
static void pca100_mmu_init(void)
{
}
#endif
static int pca100_devices_init(void)
{
int i;
@ -149,6 +173,7 @@ static struct device_d pca100_serial_device = {
static int pca100_console_init(void)
{
pca100_mmu_init();
register_device(&pca100_serial_device);
return 0;
}