diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-09-09 11:31:30 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-09-09 11:51:00 +0200 |
commit | 019b16fd5f715044a0cce7a2870c8cf584da854a (patch) | |
tree | 1dc3fe68a4385abe49e03381b305cff1bef67aef /board/phycard-i.MX27 | |
parent | 970606b1236f2a559977184709e29fa15c56237b (diff) | |
download | barebox-019b16fd5f715044a0cce7a2870c8cf584da854a.tar.gz barebox-019b16fd5f715044a0cce7a2870c8cf584da854a.tar.xz |
pca100: Add MMU support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'board/phycard-i.MX27')
-rw-r--r-- | board/phycard-i.MX27/pca100.c | 25 |
1 files changed, 25 insertions, 0 deletions
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; } |