diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2010-06-04 14:22:56 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-06-17 08:30:38 +0200 |
commit | 9c827f121ac9073d58ab12c1901f5cd24406794d (patch) | |
tree | 234124e42354be2a355b5ae8dc71b6d5024287be /board | |
parent | f7c02aea7b45474126b4723dfeb2581b0fd55447 (diff) | |
download | barebox-9c827f121ac9073d58ab12c1901f5cd24406794d.tar.gz barebox-9c827f121ac9073d58ab12c1901f5cd24406794d.tar.xz |
pcm037: Add MMU support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'board')
-rw-r--r-- | board/pcm037/pcm037.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/board/pcm037/pcm037.c b/board/pcm037/pcm037.c index aee40c6c2b..2e6968b844 100644 --- a/board/pcm037/pcm037.c +++ b/board/pcm037/pcm037.c @@ -33,6 +33,7 @@ #include <asm/armlinux.h> #include <mach/gpio.h> #include <asm/io.h> +#include <asm/mmu.h> #include <partition.h> #include <asm/mach-types.h> #include <mach/imx-nand.h> @@ -117,6 +118,7 @@ static struct device_d sdram1_dev = { struct imx_nand_platform_data nand_info = { .width = 1, .hw_ecc = 1, + .flash_bbt = 1, }; static struct device_d nand_dev = { @@ -226,8 +228,37 @@ static void pcm037_usb_init(void) } #endif +#ifdef CONFIG_MMU +static void pcm037_mmu_init(void) +{ + mmu_init(); + + arm_create_section(0x80000000, 0x80000000, 128, PMD_SECT_DEF_CACHED); + arm_create_section(0x90000000, 0x80000000, 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(); + +#ifdef CONFIG_CACHE_L2X0 + l2x0_init((void __iomem *)0x30000000, 0x00030024, 0x00000000); +#endif +} +#else +static void pcm037_mmu_init(void) +{ +} +#endif + static int imx31_devices_init(void) { + pcm037_mmu_init(); + __REG(CSCR_U(0)) = 0x0000cf03; /* CS0: Nor Flash */ __REG(CSCR_L(0)) = 0x10000d03; __REG(CSCR_A(0)) = 0x00720900; |