[U-Boot-Users] Ideas on U-Boot configuration with FDT

Wolfgang Grandegger wg at grandegger.com
Fri May 18 17:01:49 CEST 2007


Timur Tabi wrote:
> Wolfgang Grandegger wrote:
> 
>>> I think fdt_checkboard() (or boardcheck) should be run from inside 
>>> the fdt_open_into() command.  This takes advantage of the existing 
>>> mechanism of fdt_open_into() to return an error.  It also allows for 
>>> a device tree to be opened after U-Boot has booted.
>>
>> But it's too late for initial initialization (before RAM is available). 
> 
> Just make it so that fdt_open_into() is called early:
> 
>     checkboard,
>     INIT_FUNC_WATCHDOG_INIT
> #if defined(CFG_FDT_ADDR_FLASH)
>     init_fdt,
> #endif
> #if defined(CONFIG_MISC_INIT_F)
>     misc_init_f,
> #endif
>     INIT_FUNC_WATCHDOG_RESET
> #if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C)
>     init_func_i2c,
> #endif
> 
> and init_fdt() calls fdt_open_into().

RAM is _not_ available at that stage.

>> Using the FDT directly from ROM is not recommended because access 
>> might be slow, but we likely need it for early initialization.
> 
> I don't access speed is important for the reading the FDT, especially 
> flash vs. RAM.  It's not that much slower.

Depends, you might be right for FLASH on a 32-bit bus. On slow ROM 
devices and slow processors, it matters.

Wolfgang.





More information about the U-Boot mailing list