diff options
| author | Casey Connolly <casey.connolly@linaro.org> | 2026-04-01 16:15:18 +0200 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2026-04-21 11:19:49 -0600 |
| commit | f5e96fdffc024552944776848bd5570e1b2caa9b (patch) | |
| tree | 3cc106fd26fccdf6418b53910be25d391e581d69 /common | |
| parent | 968164b6863e3a75fb0f5842f4f1cab9ac7c8c36 (diff) | |
common: add an option to skip DM pre-relocation
For some platforms like Qualcomm, it isn't necessary to perform a full
DM init and scan prior to relocation, it's also particularly slow since
it runs with dcache disabled and prior to building the livetree.
The only device which needs to be probed pre-reloc is the serial
port (otherwise U-Boot will panic), however this can be found through
/chosen/stdout-path.
Therefore we can avoid scanning the entire FDT and binding devices,
instead just binding the serial port and clock driver on-demand.
This decreases the total time from power on to reaching the interactive
U-Boot shell be about 50% (from ~2.8s to 1.8s).
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Diffstat (limited to 'common')
| -rw-r--r-- | common/board_f.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common/board_f.c b/common/board_f.c index df2b0dc899b..2713438cc18 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -814,7 +814,16 @@ static int initf_dm(void) return 0; bootstage_start(BOOTSTAGE_ID_ACCUM_DM_F, "dm_f"); - ret = dm_init_and_scan(true); + + /* + * If SKIP_EARLY_DM is set then we just create an empty device + * model, the serial port will still be bound later through + * serial_find_console_or_panic() via /chosen/stdout-path + */ + if (!CONFIG_IS_ENABLED(SKIP_EARLY_DM)) + ret = dm_init_and_scan(true); + else + ret = dm_init(false); if (ret) return ret; |
