All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] ARM: rmobile: Enable board detection when FIT is enabled
@ 2021-08-30 15:39 Adam Ford
  2021-08-30 15:39 ` [PATCH 2/5] ARM: rmobile: beacon: Support RZ/G2 [M/N/H] on TARGET_BEACON_RZG2M Adam Ford
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Adam Ford @ 2021-08-30 15:39 UTC (permalink / raw)
  To: u-boot; +Cc: biju.das.jz, marek.vasut+renesas, Adam Ford

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>

diff --git a/board/beacon/beacon-rzg2m/beacon-rzg2m.c b/board/beacon/beacon-rzg2m/beacon-rzg2m.c
index c12ff77fb2..b3521fcbc1 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
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-20 12:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30 15:39 [PATCH 1/5] ARM: rmobile: Enable board detection when FIT is enabled Adam Ford
2021-08-30 15:39 ` [PATCH 2/5] ARM: rmobile: beacon: Support RZ/G2 [M/N/H] on TARGET_BEACON_RZG2M Adam Ford
2021-08-30 15:39 ` [PATCH 3/5] ARM: rmobile: beacon: Remove duplicated for RZ/G2 M/N/H Adam Ford
2021-08-30 15:39 ` [PATCH 4/5] ARM: rmobile: Beacon: Remove dead code Adam Ford
2021-08-30 15:39 ` [PATCH 5/5] ARM: rmobile: beacon: Enable reference clocks for USB and AVB Adam Ford
2021-09-20 12:11 ` [PATCH 1/5] ARM: rmobile: Enable board detection when FIT is enabled Adam Ford
2021-09-20 12:35   ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.