aboutsummaryrefslogtreecommitdiff
path: root/board/CZ.NIC
diff options
context:
space:
mode:
authorMarek BehĂșn2018-12-17 16:10:09 +0100
committerStefan Roese2019-01-21 11:39:50 +0100
commit3b281aca41dbad65fc0ccc2bed5c2caf684210fc (patch)
tree3f574236ffc66e4078e0203d687e03b113588c33 /board/CZ.NIC
parentc87b87006b0d1f42dd0b2f3a2c0a3048959489cf (diff)
arm: mvebu: turris_mox: Support 1 GB version of Turris Mox
Use get_ram_size to determine if the RAM size on Turris Mox is 512 MiB or 1 GiB. Signed-off-by: Marek BehĂșn <marek.behun@nic.cz> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board/CZ.NIC')
-rw-r--r--board/CZ.NIC/turris_mox/turris_mox.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/board/CZ.NIC/turris_mox/turris_mox.c b/board/CZ.NIC/turris_mox/turris_mox.c
index d16d6fd124d..65d50a92ddf 100644
--- a/board/CZ.NIC/turris_mox/turris_mox.c
+++ b/board/CZ.NIC/turris_mox/turris_mox.c
@@ -41,6 +41,22 @@
DECLARE_GLOBAL_DATA_PTR;
+int dram_init(void)
+{
+ gd->ram_base = 0;
+ gd->ram_size = (phys_size_t)get_ram_size(0, 0x40000000);
+
+ return 0;
+}
+
+int dram_init_banksize(void)
+{
+ gd->bd->bi_dram[0].start = (phys_addr_t)0;
+ gd->bd->bi_dram[0].size = gd->ram_size;
+
+ return 0;
+}
+
#if defined(CONFIG_OF_BOARD_FIXUP)
int board_fix_fdt(void *blob)
{