]> git.baikalelectronics.ru Git - uboot.git/commitdiff
ARM: dts: Turn Salvator-X into Multi-DTB config
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 18 Oct 2018 18:30:00 +0000 (20:30 +0200)
committerMarek Vasut <marex@denx.de>
Tue, 4 Dec 2018 08:21:07 +0000 (09:21 +0100)
Bundle DTBs for R8A7795, R8A7796, R8A77965 Salvator-X variants
into the single U-Boot build and let U-Boot choose between them
based on the CPU model.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
board/renesas/salvator-x/salvator-x.c
configs/r8a7795_salvator-x_defconfig
configs/r8a77965_salvator-x_defconfig
configs/r8a7796_salvator-x_defconfig

index 5779c1b41c41141b93816ac96ac5bc6ddda14987..8f0247e046159046cd2cfaf5ae6983900a6d42ba 100644 (file)
@@ -99,3 +99,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, "r8a7795-salvator-x-u-boot"))
+               return 0;
+
+       if ((cpu_type == RMOBILE_CPU_TYPE_R8A7796) &&
+           !strcmp(name, "r8a7796-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
index 149d6274aa012c7ebaf6defc345b1c4567210f06..1aa3cef5641995a1e3dd8ead590bd85efb3198bc 100644 (file)
@@ -28,6 +28,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7795-salvator-x-u-boot"
+CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
index 2d6b86f0bbf9441fdf894ce4c5b30917b8a17ebc..820477164a6132085adbc2afe2dd0f99c1776ba5 100644 (file)
@@ -29,6 +29,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a77965-salvator-x-u-boot"
+CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
index 352504532d96f5e0dfbfb3eef792c7fd55dd2cb4..a57e475ca2b4ecd09aa8a9ea67bdb35f3aa03340 100644 (file)
@@ -29,6 +29,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7796-salvator-x-u-boot"
+CONFIG_OF_LIST="r8a7795-salvator-x-u-boot r8a7796-salvator-x-u-boot r8a77965-salvator-x-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y