diff options
author | Tom Rini <trini@konsulko.com> | 2017-07-11 14:21:50 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-07-11 14:21:50 -0400 |
commit | d43ef73bf26614af9b01fd57baa1a1fcf24bfade (patch) | |
tree | e37eac34d78100d69ac984525f98186d1e68d0b7 /arch/arm/mach-rockchip/rk3368/rk3368.c | |
parent | 6b26aaef083957b75bcd69aa65bd6ffcf9245bb3 (diff) | |
parent | 2454b719fb874120e06e4aa64bfb9450d091e56c (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.c | 13 |
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 fb829a4a37..f62d91df74 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) { |