summaryrefslogtreecommitdiffstats
path: root/board/freescale/ls1043aqds/ddr.c
diff options
context:
space:
mode:
authorShaohui Xie <Shaohui.Xie@freescale.com>2016-01-04 11:03:44 +0800
committerYork Sun <york.sun@nxp.com>2016-01-25 08:24:14 -0800
commit58e4ad1deee26425a6e0623481a0ced6a0c2db4e (patch)
treeb716ef73cee557a0eff1ee05a59d21467c23994f /board/freescale/ls1043aqds/ddr.c
parent0d3972cfcd6dff18d110d2ee01ad99e3623bfd45 (diff)
downloadblackbird-obmc-uboot-58e4ad1deee26425a6e0623481a0ced6a0c2db4e.tar.gz
blackbird-obmc-uboot-58e4ad1deee26425a6e0623481a0ced6a0c2db4e.zip
armv8/ls1043aqds: Add support for >2GB memory
This patch also exposes the complete DDR region(s) to Linux. Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale/ls1043aqds/ddr.c')
-rw-r--r--board/freescale/ls1043aqds/ddr.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/board/freescale/ls1043aqds/ddr.c b/board/freescale/ls1043aqds/ddr.c
index 42d906824a..3d3c53385a 100644
--- a/board/freescale/ls1043aqds/ddr.c
+++ b/board/freescale/ls1043aqds/ddr.c
@@ -132,9 +132,22 @@ void dram_init_banksize(void)
* The address needs to add the offset of its bank.
*/
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
- gd->bd->bi_dram[0].size = gd->ram_size;
+ if (gd->ram_size > CONFIG_SYS_DDR_BLOCK1_SIZE) {
+ gd->bd->bi_dram[0].size = CONFIG_SYS_DDR_BLOCK1_SIZE;
+ gd->bd->bi_dram[1].start = CONFIG_SYS_DDR_BLOCK2_BASE;
+ gd->bd->bi_dram[1].size = gd->ram_size -
+ CONFIG_SYS_DDR_BLOCK1_SIZE;
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
- gd->secure_ram = gd->bd->bi_dram[0].start + gd->secure_ram;
- gd->secure_ram |= MEM_RESERVE_SECURE_MAINTAINED;
+ gd->secure_ram = gd->bd->bi_dram[1].start +
+ gd->secure_ram -
+ CONFIG_SYS_DDR_BLOCK1_SIZE;
+ gd->secure_ram |= MEM_RESERVE_SECURE_MAINTAINED;
#endif
+ } else {
+ gd->bd->bi_dram[0].size = gd->ram_size;
+#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
+ gd->secure_ram = gd->bd->bi_dram[0].start + gd->secure_ram;
+ gd->secure_ram |= MEM_RESERVE_SECURE_MAINTAINED;
+#endif
+ }
}
OpenPOWER on IntegriCloud