summaryrefslogtreecommitdiff
path: root/board/freescale/ls2080aqds/ddr.c
diff options
context:
space:
mode:
authorRajesh Bhagat <rajesh.bhagat@nxp.com>2018-12-27 04:38:01 +0000
committerYork Sun <york.sun@nxp.com>2019-01-17 13:16:26 -0800
commit1908201caeca1a1bf63a112dfb1fc1fbc445e4d0 (patch)
tree1ede3b3a2181777dc3e1f27dd927a3f5ebce2c7b /board/freescale/ls2080aqds/ddr.c
parent9570df03ee37f437f9ba3ddc25c8c6527a396992 (diff)
armv8: ls2088aqds: Add TFABOOT support
TFABOOT support includes: - ls2088aqds_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale/ls2080aqds/ddr.c')
-rw-r--r--board/freescale/ls2080aqds/ddr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/ls2080aqds/ddr.c b/board/freescale/ls2080aqds/ddr.c
index e9e7333c0a..fffe78c301 100644
--- a/board/freescale/ls2080aqds/ddr.c
+++ b/board/freescale/ls2080aqds/ddr.c
@@ -155,6 +155,17 @@ found:
}
}
+#ifdef CONFIG_TFABOOT
+int fsl_initdram(void)
+{
+ gd->ram_size = tfa_get_dram_size();
+
+ if (!gd->ram_size)
+ gd->ram_size = fsl_ddr_sdram_size();
+
+ return 0;
+}
+#else
int fsl_initdram(void)
{
#if defined(CONFIG_SPL) && !defined(CONFIG_SPL_BUILD)
@@ -167,3 +178,4 @@ int fsl_initdram(void)
return 0;
}
+#endif /* CONFIG_TFABOOT */