summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2017-07-21 05:15:22 +0300
committerKever Yang <kever.yang@rock-chips.com>2017-07-21 13:36:11 +0300
commit7b56da87d5191056a74f4c14b1f578d789ea5c93 (patch)
tree530a051ab1221f40b767bd97d4677c3cd8ac6d1c
parent027f5d5ab1f514d66a10bbb0d7392257465fab70 (diff)
downloadu-boot-7b56da87d5191056a74f4c14b1f578d789ea5c93.tar.xz
rockchip: rk322x: update dram bank size
The DRAM start address is not 0, so need to update the last bank size as: DRAM start addr + DRAM_SIZE - last bank start addr Change-Id: I674a7564b6223c49447d1aa40780196d2f7d3cfa Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
-rw-r--r--arch/arm/mach-rockchip/rk322x-board.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/mach-rockchip/rk322x-board.c b/arch/arm/mach-rockchip/rk322x-board.c
index b6543a5108..62641809f1 100644
--- a/arch/arm/mach-rockchip/rk322x-board.c
+++ b/arch/arm/mach-rockchip/rk322x-board.c
@@ -72,11 +72,13 @@ int board_init(void)
int dram_init_banksize(void)
{
- /* Reserve 0x200000 for OPTEE */
- gd->bd->bi_dram[0].start = 0x60000000;
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
gd->bd->bi_dram[0].size = 0x8400000;
- gd->bd->bi_dram[1].start = 0x6a400000;
- gd->bd->bi_dram[1].size = gd->ram_size - gd->bd->bi_dram[1].start;
+ /* Reserve 0x200000 for OPTEE */
+ gd->bd->bi_dram[1].start = CONFIG_SYS_SDRAM_BASE
+ + gd->bd->bi_dram[0].size + 0x200000;
+ gd->bd->bi_dram[1].size = gd->bd->bi_dram[0].start
+ + gd->ram_size - gd->bd->bi_dram[1].start;
return 0;
}