
On 20:48-20240108, Jon Humphreys wrote: [..]
+#ifdef CONFIG_BOARD_LATE_INIT +int board_late_init(void) +{
- ti_set_fdt_env(NULL, NULL);
If a board only has one FDT possible, why not just hard code the path here, rather than use the set_fdt_env() logic with NULLs and create/set TI_EVM_FDT_FOLDER_PATH config that is only used here anyway?
Centralizing the logic has the additional benefit of standardizing fall back when maps are not matched. It is better than having each of the board file introduce random way of doing things.
If you think we might add additional board types / FDTs later, then instead let's formalize the fdt_map concept and create a CONFIG_USES_FDT_MAP that will then rely on the fdt_map and call the ti_set_fdt_env(), and if not set, then it just returns a hard coded value, which could be based on the CONFIG_DEFAULT_DEVICE_TREE config.
Ends up being superflous - there is already a push to reduce the config options.
[..]