summaryrefslogtreecommitdiff
path: root/board/freescale/ls2080ardb/ddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/ls2080ardb/ddr.c')
-rw-r--r--board/freescale/ls2080ardb/ddr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/ls2080ardb/ddr.c b/board/freescale/ls2080ardb/ddr.c
index 26eb14b812..72ce872c75 100644
--- a/board/freescale/ls2080ardb/ddr.c
+++ b/board/freescale/ls2080ardb/ddr.c
@@ -160,6 +160,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)
@@ -172,3 +183,4 @@ int fsl_initdram(void)
return 0;
}
+#endif /* CONFIG_TFABOOT */