summaryrefslogtreecommitdiff
path: root/board/freescale/ls1046aqds/ddr.c
diff options
context:
space:
mode:
authorRajesh Bhagat <rajesh.bhagat@nxp.com>2018-11-05 18:02:40 +0000
committerYork Sun <york.sun@nxp.com>2018-12-06 14:37:19 -0800
commit50e2d41f6c9b252ec00b3ed33264d091db7ed479 (patch)
tree6b8b9f069fd7a0af7e6c4143a0ce3cf241cc8691 /board/freescale/ls1046aqds/ddr.c
parent8e156bb17638b2ce88cafc89be7a553c91d2448c (diff)
armv8: ls1046aqds: Add TFABOOT support
TFABOOT support includes: - ls1046aqds_tfa_defconfig to be loaded by trusted firmware - environment address and size changes for TFABOOT - FMAN address changes for TFABOOT - define BOOTCOMMAND for TFABOOT Signed-off-by: Pankit Garg <pankit.garg@nxp.com> Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'board/freescale/ls1046aqds/ddr.c')
-rw-r--r--board/freescale/ls1046aqds/ddr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/board/freescale/ls1046aqds/ddr.c b/board/freescale/ls1046aqds/ddr.c
index 08f7610e69..45b1f373a7 100644
--- a/board/freescale/ls1046aqds/ddr.c
+++ b/board/freescale/ls1046aqds/ddr.c
@@ -92,6 +92,16 @@ found:
popts->cpo_sample = 0x70;
}
+#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)
{
phys_size_t dram_size;
@@ -116,3 +126,4 @@ int fsl_initdram(void)
return 0;
}
+#endif