]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: dts: Turn ULCB into Multi-DTB config
authorMarek Vasut <marek.vasut+renesas@gmail.com>
Tue, 4 Dec 2018 00:44:34 +0000 (01:44 +0100)
committerMarek Vasut <marex@denx.de>
Tue, 4 Dec 2018 08:21:07 +0000 (09:21 +0100)
Bundle DTBs for R8A7795, R8A7796 ULCB variants into 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/ulcb/ulcb.c
configs/r8a7795_ulcb_defconfig
configs/r8a7796_ulcb_defconfig

index 628c5364b8c1b611eb9e11b303a5a7c058dae0f5..81d6f8f6f20772518ad64376f74c02a567be815d 100644 (file)
@@ -82,3 +82,21 @@ int dram_init_banksize(void)
 
        return 0;
 }
+
+#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-h3ulcb-u-boot"))
+               return 0;
+
+       if ((cpu_type == RMOBILE_CPU_TYPE_R8A7796) &&
+           !strcmp(name, "r8a7796-m3ulcb-u-boot"))
+               return 0;
+
+       return -1;
+}
+#endif
index 8d765e28044431d213ed27402ed710b51f08bfcf..3280a353dc47265d003fedf2dcf8c2b23aa35a0e 100644 (file)
@@ -28,6 +28,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7795-h3ulcb-u-boot"
+CONFIG_OF_LIST="r8a7795-h3ulcb-u-boot r8a7796-m3ulcb-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
index b68bb7c647fa541aadfe70aa773e1f57eeffb61c..20b2dd957995f6f0af4a49ada016f065a5976b16 100644 (file)
@@ -29,6 +29,8 @@ CONFIG_CMD_FAT=y
 CONFIG_CMD_FS_GENERIC=y
 CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="r8a7796-m3ulcb-u-boot"
+CONFIG_OF_LIST="r8a7795-h3ulcb-u-boot r8a7796-m3ulcb-u-boot"
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y