summaryrefslogtreecommitdiff
path: root/board/freescale/lx2160a/ddr.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/lx2160a/ddr.c')
-rw-r--r--board/freescale/lx2160a/ddr.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/board/freescale/lx2160a/ddr.c b/board/freescale/lx2160a/ddr.c
new file mode 100644
index 0000000000..cd422bf2bc
--- /dev/null
+++ b/board/freescale/lx2160a/ddr.c
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2018 NXP
+ */
+
+#include <common.h>
+#include <fsl_ddr_sdram.h>
+#include <fsl_ddr_dimm_params.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;
+}