]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/sh/lib/board.c
sh: add common dram_init() function for all boards
[people/ms/u-boot.git] / arch / sh / lib / board.c
diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c
new file mode 100644 (file)
index 0000000..7cb594e
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) 2016 Vladimir Zapolskiy <vz@mleia.com>
+ *
+ * SPDX-License-Identifier:     GPL-2.0+
+ */
+
+#include <common.h>
+
+DECLARE_GLOBAL_DATA_PTR;
+
+int dram_init(void)
+{
+       gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
+                                   CONFIG_SYS_SDRAM_SIZE);
+
+       return 0;
+}