diff options
author | Marek Vasut <marek.vasut+renesas@gmail.com> | 2018-10-18 20:30:00 +0200 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2018-12-04 09:21:07 +0100 |
commit | 14ebe87b58f759c395512e01e592a96abe62c3b6 (patch) | |
tree | 49e04ea1bb5907a56f7ded75c231a1a97d1ffc16 | |
parent | 3ba61f06729caa337f1071e84a2129218d290f90 (diff) | |
download | u-boot-14ebe87b58f759c395512e01e592a96abe62c3b6.tar.gz |
ARM: dts: Turn Salvator-X into Multi-DTB config
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>
-rw-r--r-- | board/renesas/salvator-x/salvator-x.c | 22 | ||||
-rw-r--r-- | configs/r8a7795_salvator-x_defconfig | 2 | ||||
-rw-r--r-- | configs/r8a77965_salvator-x_defconfig | 2 | ||||
-rw-r--r-- | configs/r8a7796_salvator-x_defconfig | 2 |
4 files changed, 28 insertions, 0 deletions
diff --git a/board/renesas/salvator-x/salvator-x.c b/board/renesas/salvator-x/salvator-x.c index 5779c1b41c..8f0247e046 100644 --- a/board/renesas/salvator-x/salvator-x.c +++ b/board/renesas/salvator-x/salvator-x.c @@ -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 diff --git a/configs/r8a7795_salvator-x_defconfig b/configs/r8a7795_salvator-x_defconfig index 149d6274aa..1aa3cef564 100644 --- a/configs/r8a7795_salvator-x_defconfig +++ b/configs/r8a7795_salvator-x_defconfig @@ -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 diff --git a/configs/r8a77965_salvator-x_defconfig b/configs/r8a77965_salvator-x_defconfig index 2d6b86f0bb..820477164a 100644 --- a/configs/r8a77965_salvator-x_defconfig +++ b/configs/r8a77965_salvator-x_defconfig @@ -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 diff --git a/configs/r8a7796_salvator-x_defconfig b/configs/r8a7796_salvator-x_defconfig index 352504532d..a57e475ca2 100644 --- a/configs/r8a7796_salvator-x_defconfig +++ b/configs/r8a7796_salvator-x_defconfig @@ -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 |