summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/karo-tx28
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-01-14 17:16:15 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-17 09:43:00 +0100
commit2fed74ef6d446552300cc254de7b3e26140b04fe (patch)
tree1a393c4059343119195279bd79d821a9ea92ad6c /arch/arm/boards/karo-tx28
parent06b7cc48756d0222eb12310324efa0108328f026 (diff)
downloadbarebox-2fed74ef6d446552300cc254de7b3e26140b04fe.tar.gz
barebox-2fed74ef6d446552300cc254de7b3e26140b04fe.tar.xz
ARM tx28: Add mmu support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/karo-tx28')
-rw-r--r--arch/arm/boards/karo-tx28/tx28.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/boards/karo-tx28/tx28.c b/arch/arm/boards/karo-tx28/tx28.c
index 6f4ef4ec1e..5692171253 100644
--- a/arch/arm/boards/karo-tx28/tx28.c
+++ b/arch/arm/boards/karo-tx28/tx28.c
@@ -21,6 +21,7 @@
#include <asm/io.h>
#include <generated/mach-types.h>
#include <mach/imx-regs.h>
+#include <asm/mmu.h>
static struct memory_platform_data ram_pdata = {
.name = "ram0",
@@ -82,6 +83,28 @@ static const uint32_t tx28_pad_setup[] = {
extern void base_board_init(void);
+#ifdef CONFIG_MMU
+static int tx28_mmu_init(void)
+{
+ mmu_init();
+
+ arm_create_section(0x40000000, 0x40000000, 128, PMD_SECT_DEF_CACHED);
+ arm_create_section(0x50000000, 0x40000000, 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();
+
+ return 0;
+}
+postcore_initcall(tx28_mmu_init);
+#endif
+
static int tx28_devices_init(void)
{
int i;