diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-02-20 18:16:16 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-19 10:51:51 +0200 |
commit | 2de49268d3cfb7773f548a8e1b7ef89eb16ca1cb (patch) | |
tree | 64b990777c63837d724fd33cadc780fddc4611ee /board | |
parent | e471a5fd390247da31c97932d278a01ec035d3b7 (diff) | |
download | barebox-2de49268d3cfb7773f548a8e1b7ef89eb16ca1cb.tar.gz barebox-2de49268d3cfb7773f548a8e1b7ef89eb16ca1cb.tar.xz |
pcm038: Add MMU support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'board')
-rw-r--r-- | board/pcm038/pcm038.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/board/pcm038/pcm038.c b/board/pcm038/pcm038.c index fb6cc60dc8..e64668a3f5 100644 --- a/board/pcm038/pcm038.c +++ b/board/pcm038/pcm038.c @@ -40,6 +40,7 @@ #include <asm/arch/imx-nand.h> #include <asm/arch/imx-pll.h> #include <asm/arch/imxfb.h> +#include <asm/mmu.h> static struct device_d cfi_dev = { .name = "cfi_flash", @@ -148,6 +149,29 @@ static struct device_d imxfb_dev = { .platform_data = &pcm038_fb_data, }; +#ifdef CONFIG_MMU +static void pcm038_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 pcm038_mmu_init(void) +{ +} +#endif + static int pcm038_devices_init(void) { int i; @@ -213,6 +237,8 @@ static int pcm038_devices_init(void) PA31_PF_OE_ACD, }; + pcm038_mmu_init(); + /* configure 16 bit nor flash on cs0 */ CS0U = 0x0000CC03; CS0L = 0xa0330D01; |