Merge tag 'u-boot-rockchip-20200501' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / board / renesas / salvator-x / salvator-x.c
index 8b15267d7b2d476bf009cb96567963a3fe8db19b..91c3728571e65c55b9c3e3063b150ee8c5e705b8 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <malloc.h>
 #include <netdev.h>
 #include <dm.h>
@@ -31,7 +32,6 @@ void s_init(void)
 {
 }
 
-#define SCIF2_MSTP310          BIT(10) /* SCIF2 */
 #define DVFS_MSTP926           BIT(26)
 #define HSUSB_MSTP704          BIT(4)  /* HSUSB */
 
@@ -70,21 +70,6 @@ int board_init(void)
        return 0;
 }
 
-int dram_init(void)
-{
-       if (fdtdec_setup_mem_size_base() != 0)
-               return -EINVAL;
-
-       return 0;
-}
-
-int dram_init_banksize(void)
-{
-       fdtdec_setup_memory_banksize();
-
-       return 0;
-}
-
 #define RST_BASE       0xE6160000
 #define RST_CA57RESCNT (RST_BASE + 0x40)
 #define RST_CA53RESCNT (RST_BASE + 0x44)
@@ -100,3 +85,25 @@ void reset_cpu(ulong addr)
        writel(RST_CODE, RST_CA57RESCNT);
 #endif
 }
+
+#ifdef CONFIG_MULTI_DTB_FIT
+int board_fit_config_name_match(const char *name)
+{
+       /* PRR driver is not available yet */
+       u32 cpu_type = rmobile_get_cpu_type();
+
+       if ((cpu_type == RMOBILE_CPU_TYPE_R8A7795) &&
+           !strcmp(name, "r8a77950-salvator-x-u-boot"))
+               return 0;
+
+       if ((cpu_type == RMOBILE_CPU_TYPE_R8A7796) &&
+           !strcmp(name, "r8a77960-salvator-x-u-boot"))
+               return 0;
+
+       if ((cpu_type == RMOBILE_CPU_TYPE_R8A77965) &&
+           !strcmp(name, "r8a77965-salvator-x-u-boot"))
+               return 0;
+
+       return -1;
+}
+#endif