diff options
-rw-r--r-- | arch/arm/Kconfig | 1 | ||||
-rw-r--r-- | board/phycard-i.MX27/pca100.c | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 30c1f39617..441dfb637f 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -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 diff --git a/board/phycard-i.MX27/pca100.c b/board/phycard-i.MX27/pca100.c index dfc9761222..14ab99d4e2 100644 --- a/board/phycard-i.MX27/pca100.c +++ b/board/phycard-i.MX27/pca100.c @@ -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; } |