aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/rk3368/rk3368.c
diff options
context:
space:
mode:
authorTom Rini2017-07-11 14:21:50 -0400
committerTom Rini2017-07-11 14:21:50 -0400
commitd43ef73bf26614af9b01fd57baa1a1fcf24bfade (patch)
treee37eac34d78100d69ac984525f98186d1e68d0b7 /arch/arm/mach-rockchip/rk3368/rk3368.c
parent6b26aaef083957b75bcd69aa65bd6ffcf9245bb3 (diff)
parent2454b719fb874120e06e4aa64bfb9450d091e56c (diff)
Merge branch 'master' of git://git.denx.de/u-boot-rockchip
Diffstat (limited to 'arch/arm/mach-rockchip/rk3368/rk3368.c')
-rw-r--r--arch/arm/mach-rockchip/rk3368/rk3368.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/rk3368/rk3368.c b/arch/arm/mach-rockchip/rk3368/rk3368.c
index fb829a4a374..f62d91df74c 100644
--- a/arch/arm/mach-rockchip/rk3368/rk3368.c
+++ b/arch/arm/mach-rockchip/rk3368/rk3368.c
@@ -13,6 +13,8 @@
#include <asm/arch/grf_rk3368.h>
#include <syscon.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#define IMEM_BASE 0xFF8C0000
/* Max MCU's SRAM value is 8K, begin at (IMEM_BASE + 4K) */
@@ -50,6 +52,17 @@ static struct mm_region rk3368_mem_map[] = {
struct mm_region *mem_map = rk3368_mem_map;
+int dram_init_banksize(void)
+{
+ size_t max_size = min((unsigned long)gd->ram_size, gd->ram_top);
+
+ /* Reserve 0x200000 for ATF bl31 */
+ gd->bd->bi_dram[0].start = 0x200000;
+ gd->bd->bi_dram[0].size = max_size - gd->bd->bi_dram[0].start;
+
+ return 0;
+}
+
#ifdef CONFIG_ARCH_EARLY_INIT_R
static int mcu_init(void)
{