aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/board/freescale/ls1046afrwy/ddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/board/freescale/ls1046afrwy/ddr.c')
-rw-r--r--roms/u-boot/board/freescale/ls1046afrwy/ddr.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/roms/u-boot/board/freescale/ls1046afrwy/ddr.c b/roms/u-boot/board/freescale/ls1046afrwy/ddr.c
new file mode 100644
index 000000000..256397b52
--- /dev/null
+++ b/roms/u-boot/board/freescale/ls1046afrwy/ddr.c
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 NXP
+ */
+
+#include <common.h>
+#include <fsl_ddr_sdram.h>
+#include <asm/global_data.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;
+}