All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 08/10] ARM: mvebu: clearfog: run-time selection of DT file
Date: Mon, 25 Nov 2019 12:30:48 +0200	[thread overview]
Message-ID: <a6587bc9749d31b079a226fae680fb178277d331.1574676560.git.baruch@tkos.co.il> (raw)
In-Reply-To: <cover.1574676560.git.baruch@tkos.co.il>

Set the kernel device-tree file (fdtfile environment variable) based on
run-time detection of the platform.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 arch/arm/mach-mvebu/Kconfig        |  1 +
 board/solidrun/clearfog/clearfog.c | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index fdd39685b75d..bc5eaa5a7679 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -91,6 +91,7 @@ choice
 config TARGET_CLEARFOG
 	bool "Support ClearFog"
 	select 88F6820
+	select BOARD_LATE_INIT
 
 config TARGET_HELIOS4
 	bool "Support Helios4"
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 852b1ad71bb2..00c1306e9c80 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -265,3 +265,17 @@ int board_eth_init(bd_t *bis)
 	cpu_eth_init(bis); /* Built in controller(s) come first */
 	return pci_eth_init(bis);
 }
+
+int board_late_init(void)
+{
+	read_tlv_data();
+
+	if (sr_product_is("Clearfog Base"))
+		 env_set("fdtfile", "armada-388-clearfog-base.dtb");
+	else if (sr_product_is("Clearfog GTR S4"))
+		 env_set("fdtfile", "armada-385-clearfog-gtr-s4.dtb");
+	else if (sr_product_is("Clearfog GTR L8"))
+		 env_set("fdtfile", "armada-385-clearfog-gtr-l8.dtb");
+
+	return 0;
+}
-- 
2.24.0

  parent reply	other threads:[~2019-11-25 10:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 10:30 [U-Boot] [PATCH 00/10] ARM: clearfog: add run-time board detect Baruch Siach
2019-11-25 10:30 ` [U-Boot] [PATCH 01/10] ddr: marvell: a38x: allow board specific clock out setup Baruch Siach
2020-01-13  6:56   ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 02/10] arm: mvebu: clearfog: enable both DDR clocks Baruch Siach
2020-01-13  6:59   ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 03/10] cmd: add sys_eeprom command Baruch Siach
2020-01-13  7:11   ` Stefan Roese
2020-01-14 10:18     ` Baruch Siach
2020-01-14 11:24       ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 04/10] ARM: mvebu: clearfog: add EEPROM devices Baruch Siach
2020-01-13  7:12   ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 05/10] ARM: mvebu: clearfog: add support for EEPROM TLV info Baruch Siach
2020-01-13  7:13   ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 06/10] ARM: mvebu: clearfog: read basic TLV data Baruch Siach
2020-01-13  7:22   ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 07/10] ARM: mvebu: clearfog: print TLV stored product name Baruch Siach
2020-01-13  7:23   ` Stefan Roese
2019-11-25 10:30 ` Baruch Siach [this message]
2020-01-13  7:27   ` [PATCH 08/10] ARM: mvebu: clearfog: run-time selection of DT file Stefan Roese
2020-01-14 10:26     ` Baruch Siach
2020-01-14 11:28       ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 09/10] ARM: mvebu: clearfog: add Clearfog GTR support Baruch Siach
2020-01-13  7:29   ` Stefan Roese
2019-11-25 10:30 ` [U-Boot] [PATCH 10/10] ARM: mvebu: clearfog: add Clearfog Base serdes configuration Baruch Siach
2020-01-13  7:30   ` Stefan Roese
2020-01-13  7:31 ` [PATCH 00/10] ARM: clearfog: add run-time board detect Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6587bc9749d31b079a226fae680fb178277d331.1574676560.git.baruch@tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.