summaryrefslogtreecommitdiff
path: root/board/freescale/ls1046afrwy/ddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/ls1046afrwy/ddr.c')
-rw-r--r--board/freescale/ls1046afrwy/ddr.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/freescale/ls1046afrwy/ddr.c b/board/freescale/ls1046afrwy/ddr.c
new file mode 100644
index 0000000000..daf17e0169
--- /dev/null
+++ b/board/freescale/ls1046afrwy/ddr.c
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 NXP
+ */
+
+#include <common.h>
+#include <fsl_ddr_sdram.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int fsl_initdram(void)
+{
+ gd->ram_size = tfa_get_dram_size();
+
+ if (!gd->ram_size)
+ gd->ram_size = fsl_ddr_sdram_size();
+
+ return 0;
+}