[PATCH V5 08/17] include: env: ti: ti_common: Add a generic findfdt

Nishanth Menon nm at ti.com
Thu Aug 24 05:10:52 CEST 2023


ti_mmc bootmethod uses a findfdt routine that is expected to be
implemented by all platforms.

Define a default findfdt based on configured DEFAULT_DEVICE_TREE option
for u-boot. This saves duplication across multiple boards and handles
architecture folder location changes centrally.

TI ARMV7 platforms will need to override default_device_tree_subarch
in the env file to point to the appropriate platform. Note: default
"omap" is used to cater to "most common" default.

Signed-off-by: Nishanth Menon <nm at ti.com>
---
New patch (part of bootstd transition)

 include/env/ti/ti_common.env | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/env/ti/ti_common.env b/include/env/ti/ti_common.env
index e87a41a6590b..322f849a5560 100644
--- a/include/env/ti/ti_common.env
+++ b/include/env/ti/ti_common.env
@@ -32,3 +32,15 @@ bootcmd_ti_mmc=
 	else;
 		run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern;
 	fi;
+default_device_tree=CONFIG_DEFAULT_DEVICE_TREE
+default_device_tree_arch=ti
+#ifdef CONFIG_ARM64
+findfdt=
+	setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb;
+	setenv fdtfile ${name_fdt}
+#else
+default_device_tree_subarch=omap
+findfdt=
+	setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb;
+	setenv fdtfile ${name_fdt}
+#endif
-- 
2.40.0



More information about the U-Boot mailing list