Merge git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / arch / arm / mach-uniphier / dram_init.c
index d9f6c16fdc2554375f82d28eb8c322ef1e32a0e6..22136855fa1a4ba04fdca5884b3978327992486b 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <fdt_support.h>
 #include <fdtdec.h>
 #include <linux/errno.h>
 #include <linux/sizes.h>
@@ -14,9 +15,6 @@
 #include "sg-regs.h"
 #include "soc-info.h"
 
-#define pr_warn(fmt, args...)  printf(fmt, ##args)
-#define pr_err(fmt, args...)   printf(fmt, ##args)
-
 DECLARE_GLOBAL_DATA_PTR;
 
 struct uniphier_memif_data {
@@ -26,15 +24,6 @@ struct uniphier_memif_data {
 };
 
 static const struct uniphier_memif_data uniphier_memif_data[] = {
-       {
-               .soc_id = UNIPHIER_SLD3_ID,
-               .sparse_ch1_base = 0xc0000000,
-               /*
-                * In fact, SLD3 has DRAM ch2, but the memory regions for ch1
-                * and ch2 overlap, and host cannot get access to them at the
-                * same time.  Hide the ch2 from U-Boot.
-                */
-       },
        {
                .soc_id = UNIPHIER_LD4_ID,
                .sparse_ch1_base = 0xc0000000,
@@ -232,7 +221,7 @@ int dram_init(void)
        return 0;
 }
 
-void dram_init_banksize(void)
+int dram_init_banksize(void)
 {
        struct uniphier_dram_map dram_map[3] = {};
        int i;
@@ -246,6 +235,8 @@ void dram_init_banksize(void)
                gd->bd->bi_dram[i].start = dram_map[i].base;
                gd->bd->bi_dram[i].size = dram_map[i].size;
        }
+
+       return 0;
 }
 
 #ifdef CONFIG_OF_BOARD_SETUP