summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-03-04 01:09:53 +0100
committerTom Rini <trini@konsulko.com>2016-03-15 15:13:09 -0400
commit21845825608af7fbc5513e4fbf812426df437302 (patch)
treef63c53b16e1023d33b0441d3710736d2cfb57d0f /board
parent9b5b8b6ee19de9b6c1a701e8e6faa16ffe951a58 (diff)
downloadu-boot-imx-21845825608af7fbc5513e4fbf812426df437302.zip
u-boot-imx-21845825608af7fbc5513e4fbf812426df437302.tar.gz
u-boot-imx-21845825608af7fbc5513e4fbf812426df437302.tar.bz2
hikey: Add MMU tables
The hikey runs with dcache disabled today. There really should be no reason not to use caches on AArch64, so let's add MMU definitions and enable the dcache. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'board')
-rw-r--r--board/hisilicon/hikey/hikey.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/board/hisilicon/hikey/hikey.c b/board/hisilicon/hikey/hikey.c
index c4ae40b..1edc807 100644
--- a/board/hisilicon/hikey/hikey.c
+++ b/board/hisilicon/hikey/hikey.c
@@ -19,6 +19,7 @@
#include <asm/arch/periph.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/hi6220.h>
+#include <asm/armv8/mmu.h>
/*TODO drop this table in favour of device tree */
static const struct hikey_gpio_platdata hi6220_gpio[] = {
@@ -87,6 +88,26 @@ U_BOOT_DEVICE(hikey_seriala) = {
.platdata = &serial_platdata,
};
+static struct mm_region hikey_mem_map[] = {
+ {
+ .base = 0x0UL,
+ .size = 0x80000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+ PTE_BLOCK_INNER_SHARE
+ }, {
+ .base = 0x80000000UL,
+ .size = 0x80000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+ PTE_BLOCK_NON_SHARE |
+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
+ }, {
+ /* List terminator */
+ 0,
+ }
+};
+
+struct mm_region *mem_map = hikey_mem_map;
+
#ifdef CONFIG_BOARD_EARLY_INIT_F
int board_uart_init(void)
{