summaryrefslogtreecommitdiff
path: root/board/schneider/rzn1-snarc/rzn1.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/schneider/rzn1-snarc/rzn1.c')
-rw-r--r--board/schneider/rzn1-snarc/rzn1.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/board/schneider/rzn1-snarc/rzn1.c b/board/schneider/rzn1-snarc/rzn1.c
new file mode 100644
index 0000000000..09241c3a95
--- /dev/null
+++ b/board/schneider/rzn1-snarc/rzn1.c
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include <common.h>
+#include <dm.h>
+#include <ram.h>
+#include <asm/global_data.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int board_init(void)
+{
+ gd->bd->bi_boot_params = gd->ram_base + 0x100;
+
+ return 0;
+}
+
+int dram_init(void)
+{
+ struct udevice *dev;
+ int err;
+
+ /*
+ * This will end up calling cadence_ddr_probe(),
+ * and will also update gd->ram_size.
+ */
+ err = uclass_get_device(UCLASS_RAM, 0, &dev);
+ if (err)
+ debug("DRAM init failed: %d\n", err);
+
+ return err;
+}