Skip to contentSkip to conversation

arm64: configs: Remove obsolete TI config

PATCH In review Aashvij Shenai 2 participants 2 messages Jan 20, 2025 – Jan 24, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: configs: Remove obsolete TI config

This config is causing conflicts with how fdtfile variable is initialized.
For K3 devices, CONFIG_DEFAULT_DEVICE_TREE= "ti/k3-<board>.dtb". With CONFIG_TI_FDT_FOLDER_PATH also prefixing "ti", fdtfile is then "ti/ti/k3-<board>.dtb". This variable is updated when fitImage is booted and fails to boot due to the parsing error "ti/ti/".

Given that there are no other users of this config other than K3 for now, it is being removed.

Since am64x, j721e and j721s2 also define a DEFAULT_FDT_FILE, update them to conform to the DEFAULT_DEVICE_TREE standard.

---

 board/beagle/beagleboneai64/beagleboneai64.c |  3 +--
 board/beagle/beagleplay/beagleplay.c         |  3 +--
 board/ti/am64x/evm.c                         |  4 ++--
 board/ti/common/Kconfig                      | 11 -----------
 board/ti/common/fdt_ops.c                    |  9 +++------
 board/ti/j721e/evm.c                         |  6 +++---
 board/ti/j721s2/evm.c                        |  4 ++--
 7 files changed, 12 insertions(+), 28 deletions(-)
board/beagle/beagleboneai64/beagleboneai64.c +1 -2
index 1e43d1c1bd2..e8d07f1f95f 100644
@@ -73,8 +73,7 @@ int board_late_init(void)
 {
 	char fdtfile[50];
 
-	snprintf(fdtfile, sizeof(fdtfile), "%s/%s.dtb",
-		 CONFIG_TI_FDT_FOLDER_PATH, CONFIG_DEFAULT_DEVICE_TREE);
+	snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
 
 	env_set("fdtfile", fdtfile);
 
board/beagle/beagleplay/beagleplay.c +1 -2
index a21f09e3122..fae69b37585 100644
@@ -69,8 +69,7 @@ int board_late_init(void)
 {
 	char fdtfile[50];
 
-	snprintf(fdtfile, sizeof(fdtfile), "%s/%s.dtb",
-		 CONFIG_TI_FDT_FOLDER_PATH, CONFIG_DEFAULT_DEVICE_TREE);
+	snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
 
 	env_set("fdtfile", fdtfile);
 
board/ti/am64x/evm.c +2 -2
index 00b8317d6bf..c0033db2078 100644
@@ -217,8 +217,8 @@ int checkboard(void)
 
 #ifdef CONFIG_BOARD_LATE_INIT
 static struct ti_fdt_map ti_am64_evm_fdt_map[] = {
-	{"am64x_gpevm", "k3-am642-evm.dtb"},
-	{"am64x_skevm", "k3-am642-sk.dtb"},
+	{"am64x_gpevm", "ti/k3-am642-evm.dtb"},
+	{"am64x_skevm", "ti/k3-am642-sk.dtb"},
 	{ /* Sentinel. */ }
 };
 
board/ti/common/Kconfig +0 -11
index de44e4de211..b8b691aa06c 100644
@@ -50,14 +50,3 @@ config TI_COMMON_CMD_OPTIONS
 	imply CMD_TIME
 	imply CMD_USB if USB
 
-config TI_FDT_FOLDER_PATH
-	string "Location of Folder path where dtb is present"
-	default "ti/davinci" if ARCH_DAVINCI
-	default "ti/keystone" if ARCH_KEYSTONE
-	default "ti/omap" if ARCH_OMAP2PLUS
-	default "ti" if ARCH_K3
-	depends on ARCH_DAVINCI || ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_K3
-	help
-	   Folder path for kernel device tree default.
-	   This is used along with fdtfile path to locate the kernel
-	   device tree blob.
board/ti/common/fdt_ops.c +3 -6
index 8a3300993ed..47df5726ff0 100644
@@ -35,17 +35,14 @@ void ti_set_fdt_env(const char *board_name, struct ti_fdt_map *fdt_map)
 		 */
 #ifdef CONFIG_DEFAULT_FDT_FILE
 		if (strlen(CONFIG_DEFAULT_FDT_FILE)) {
-			snprintf(fdtfile, sizeof(fdtfile), "%s/%s",
-				 CONFIG_TI_FDT_FOLDER_PATH, CONFIG_DEFAULT_FDT_FILE);
+			snprintf(fdtfile, sizeof(fdtfile), "%s", CONFIG_DEFAULT_FDT_FILE);
 		} else
 #endif
 		{
-			snprintf(fdtfile, sizeof(fdtfile), "%s/%s.dtb",
-				 CONFIG_TI_FDT_FOLDER_PATH, CONFIG_DEFAULT_DEVICE_TREE);
+			snprintf(fdtfile, sizeof(fdtfile), "%s.dtb", CONFIG_DEFAULT_DEVICE_TREE);
 		}
 	} else {
-		snprintf(fdtfile, sizeof(fdtfile), "%s/%s", CONFIG_TI_FDT_FOLDER_PATH,
-			 fdt_file_name);
+		snprintf(fdtfile, sizeof(fdtfile), "%s", fdt_file_name);
 	}
 
 	env_set("fdtfile", fdtfile);
board/ti/j721e/evm.c +3 -3
index 6221be9dcff..c54816e9e18 100644
@@ -395,9 +395,9 @@ static int probe_daughtercards(void)
 
 #ifdef CONFIG_BOARD_LATE_INIT
 static struct ti_fdt_map ti_j721e_evm_fdt_map[] = {
-	{"j721e", "k3-j721e-common-proc-board.dtb"},
-	{"j721e-sk", "k3-j721e-sk.dtb"},
-	{"j7200", "k3-j7200-common-proc-board.dtb"},
+	{"j721e", "ti/k3-j721e-common-proc-board.dtb"},
+	{"j721e-sk", "ti/k3-j721e-sk.dtb"},
+	{"j7200", "ti/k3-j7200-common-proc-board.dtb"},
 	{ /* Sentinel. */ }
 };
 static void setup_board_eeprom_env(void)
board/ti/j721s2/evm.c +2 -2
index 2cfeb3bec6c..6627e0ce466 100644
@@ -116,8 +116,8 @@ int checkboard(void)
 }
 
 static struct ti_fdt_map ti_j721s2_evm_fdt_map[] = {
-	{"j721s2", "k3-j721s2-common-proc-board.dtb"},
-	{"am68-sk", "k3-am68-sk-base-board.dtb"},
+	{"j721s2", "ti/k3-j721s2-common-proc-board.dtb"},
+	{"am68-sk", "ti/k3-am68-sk-base-board.dtb"},
 	{ /* Sentinel. */ }
 };
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 8 lines · Aashvij Shenai

This config is causing conflicts with how fdtfile variable is initialized.
For K3 devices, CONFIG_DEFAULT_DEVICE_TREE= "ti/k3-<board>.dtb". With CONFIG_TI_FDT_FOLDER_PATH also prefixing "ti", fdtfile is then "ti/ti/k3-<board>.dtb". This variable is updated when fitImage is booted and fails to boot due to the parsing error "ti/ti/".

[...]

Applied to u-boot/master, thanks!

Signature · 1 line
Tom