[PATCH 02/10] board: ti: am62ax: Set fdtfile from C code instead of findfdt script

Nishanth Menon nm at ti.com
Tue Jan 9 15:23:25 CET 2024


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.

[..]

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D


More information about the U-Boot mailing list