diff options
author | Adam Ford <aford173@gmail.com> | 2021-09-20 11:14:27 -0500 |
---|---|---|
committer | Marek Vasut <marek.vasut+renesas@gmail.com> | 2021-10-29 21:51:54 +0200 |
commit | a72fca75f91e207fa1a006ac799002aa3d24edf0 (patch) | |
tree | 6857afb3fe078d45000e9c14634aeb7a088fbb12 /board | |
parent | a09929cc6c5a108f89e91660f37d745ed119385b (diff) | |
download | u-boot-a72fca75f91e207fa1a006ac799002aa3d24edf0.zip u-boot-a72fca75f91e207fa1a006ac799002aa3d24edf0.tar.gz u-boot-a72fca75f91e207fa1a006ac799002aa3d24edf0.tar.bz2 |
ARM: rmobile: Enable board detection when FIT is enabled
There are three boards from Beacon, RZ/G2 M/N/H which all
use the same board file, but different device trees.
Add code to automatically select the proper device tree
based on the CPU type.
Signed-off-by: Adam Ford <aford173@gmail.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/beacon/beacon-rzg2m/beacon-rzg2m.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c index c12ff77..b3521fc 100644 --- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c +++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c @@ -36,3 +36,19 @@ void reset_cpu(void) { writel(RST_CODE, RST_CA57RESCNT); } + +#if IS_ENABLED(CONFIG_MULTI_DTB_FIT) +int board_fit_config_name_match(const char *name) +{ + if (!strcmp(rzg_get_cpu_name(), "R8A774A1") && !strcmp(name, "r8a774a1-beacon-rzg2m-kit")) + return 0; + + if (!strcmp(rzg_get_cpu_name(), "R8A774B1") && !strcmp(name, "r8a774b1-beacon-rzg2n-kit")) + return 0; + + if (!strcmp(rzg_get_cpu_name(), "R8A774E1") && !strcmp(name, "r8a774e1-beacon-rzg2h-kit")) + return 0; + + return -1; +} +#endif |