aboutsummaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorBaruch Siach2020-01-20 14:20:13 +0200
committerStefan Roese2020-01-21 15:56:15 +0100
commit867572f09ebe6349937b9614f1863a9111aa8f8e (patch)
treeb3f3803170d8604a3449f5a4bce7010d7a4dd9b5 /board
parent7211fa6f5abede5f3f40ebdeaa9d9c14a0829033 (diff)
ARM: mvebu: clearfog: run-time selection of DT file
Set the kernel device-tree file (fdtfile environment variable) based on run-time detection of the platform. Reviewed-by: Stefan Roese <sr@denx.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Diffstat (limited to 'board')
-rw-r--r--board/solidrun/clearfog/clearfog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 8050cca55ab..e178b06cd34 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -175,3 +175,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)
+{
+ cf_read_tlv_data();
+
+ if (sr_product_is(&cf_tlv_data, "Clearfog Base"))
+ env_set("fdtfile", "armada-388-clearfog-base.dtb");
+ else if (sr_product_is(&cf_tlv_data, "Clearfog GTR S4"))
+ env_set("fdtfile", "armada-385-clearfog-gtr-s4.dtb");
+ else if (sr_product_is(&cf_tlv_data, "Clearfog GTR L8"))
+ env_set("fdtfile", "armada-385-clearfog-gtr-l8.dtb");
+
+ return 0;
+}