From a72fca75f91e207fa1a006ac799002aa3d24edf0 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Mon, 20 Sep 2021 11:14:27 -0500 Subject: 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 --- board/beacon/beacon-rzg2m/beacon-rzg2m.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'board') diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c index c12ff77fb24..b3521fcbc14 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 -- cgit v1.2.3 From cde373f04f116b931b87bc17cf5d101c181e77cc Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Mon, 20 Sep 2021 11:14:29 -0500 Subject: ARM: rmobile: beacon: Remove duplicated for RZ/G2 M/N/H Now that TARGET_BEACON_RZG2M can handle all the work that was done with TARGET_BEACON_RZG2N and TARGET_BEACON_RZG2H, remove them since they just create more duplicate code. Signed-off-by: Adam Ford --- board/beacon/beacon-rzg2m/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/beacon/beacon-rzg2m/Kconfig b/board/beacon/beacon-rzg2m/Kconfig index 99c23a3d148..c03857cf2fe 100644 --- a/board/beacon/beacon-rzg2m/Kconfig +++ b/board/beacon/beacon-rzg2m/Kconfig @@ -1,4 +1,4 @@ -if TARGET_BEACON_RZG2H || TARGET_BEACON_RZG2M || TARGET_BEACON_RZG2N +if TARGET_BEACON_RZG2M config SYS_SOC default "rmobile" -- cgit v1.2.3 From 8e8fb50a93febd944e8943d752a6d9b065d45fcd Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Mon, 20 Sep 2021 11:14:30 -0500 Subject: ARM: rmobile: Beacon: Remove dead code There are a few do-nothing functions that can be removed. Remove them. Signed-off-by: Adam Ford --- board/beacon/beacon-rzg2m/beacon-rzg2m.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'board') diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c index b3521fcbc14..df6044a4297 100644 --- a/board/beacon/beacon-rzg2m/beacon-rzg2m.c +++ b/board/beacon/beacon-rzg2m/beacon-rzg2m.c @@ -10,16 +10,6 @@ DECLARE_GLOBAL_DATA_PTR; -void s_init(void) -{ -} - -/* Kconfig forces this on, so just return 0 */ -int board_early_init_f(void) -{ - return 0; -} - int board_init(void) { /* address of boot parameters */ -- cgit v1.2.3 From 16f1f0058974abd480a2c01d99a98179c667e828 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Mon, 20 Sep 2021 11:14:32 -0500 Subject: ARM: rmobile: Rename r8a774a1_beacon_defconfig to rzg2_beacon_defconfig Now that the three M/N/H variants can be built from one config, rename the defconfig file to be more generic since it supports multiple RZ/G2. Signed-off-by: Adam Ford --- board/beacon/beacon-rzg2m/MAINTAINERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'board') diff --git a/board/beacon/beacon-rzg2m/MAINTAINERS b/board/beacon/beacon-rzg2m/MAINTAINERS index 45c269da723..77c4057ab05 100644 --- a/board/beacon/beacon-rzg2m/MAINTAINERS +++ b/board/beacon/beacon-rzg2m/MAINTAINERS @@ -3,6 +3,4 @@ M: Adam Ford S: Maintained F: board/beacon/beacon-rzg2m/ F: include/configs/beacon-rzg2m.h -F: configs/r8a774a1_beacon_defconfig -F: configs/r8a774b1_beacon_defconfig -F: configs/r8a774e1_beacon_defconfig +F: configs/rzg2_beacon_defconfig -- cgit v1.2.3