summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2016-03-04 01:09:48 +0100
committerTom Rini <trini@konsulko.com>2016-03-15 15:13:02 -0400
commitd473f0c621513d3f1c42888c113b68f65b7e81cf (patch)
tree72566868778f606d2a3bcaa07895bf68f39bffad /board
parent5e2ec773bb6c5acf22d8652112856e87cff86ea4 (diff)
downloadu-boot-imx-d473f0c621513d3f1c42888c113b68f65b7e81cf.zip
u-boot-imx-d473f0c621513d3f1c42888c113b68f65b7e81cf.tar.gz
u-boot-imx-d473f0c621513d3f1c42888c113b68f65b7e81cf.tar.bz2
thunderx: Move mmu table into board file
The MMU range table can vary depending on things we may only find out at runtime. While the very simple ThunderX variant does not change, other boards will, so move the definition from a static entry in a header file to the board file. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'board')
-rw-r--r--board/cavium/thunderx/thunderx.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c
index b926767..9131a38 100644
--- a/board/cavium/thunderx/thunderx.c
+++ b/board/cavium/thunderx/thunderx.c
@@ -10,6 +10,7 @@
#include <linux/compiler.h>
#include <cavium/atf.h>
+#include <asm/armv8/mmu.h>
#if !CONFIG_IS_ENABLED(OF_CONTROL)
#include <dm/platdata.h>
@@ -42,6 +43,29 @@ U_BOOT_DEVICE(thunderx_serial1) = {
DECLARE_GLOBAL_DATA_PTR;
+static struct mm_region thunderx_mem_map[] = {
+ {
+ .base = 0x000000000000UL,
+ .size = 0x40000000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE,
+ }, {
+ .base = 0x800000000000UL,
+ .size = 0x40000000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+ PTE_BLOCK_NON_SHARE,
+ }, {
+ .base = 0x840000000000UL,
+ .size = 0x40000000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+ PTE_BLOCK_NON_SHARE,
+ }, {
+ /* List terminator */
+ 0,
+ }
+};
+
+struct mm_region *mem_map = thunderx_mem_map;
+
int board_init(void)
{
return 0;