summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig12
-rw-r--r--common/board_f.c11
2 files changed, 22 insertions, 1 deletions
diff --git a/Kconfig b/Kconfig
index ce25ea24a60..2f7677f47f1 100644
--- a/Kconfig
+++ b/Kconfig
@@ -474,6 +474,18 @@ config SKIP_RELOCATE
Skips relocation of U-Boot allowing for systems that have extremely
limited RAM to run U-Boot.
+config SKIP_EARLY_DM
+ bool "Skips initialising device model pre-relocation"
+ help
+ Enable this option to skip scanning and probing devices prior to
+ U-Boot relocation (during board_f). Unless console support is disabled
+ a serial port is still required, however this can be found through
+ /chosen/stdout-path in FDT. If the serial port relies on other devices
+ like clocks these will also be bound and probed on demand.
+
+ This can speed up time to interactive console by about 50%, particularly
+ when combined with OF_LIVE.
+
endif # EXPERT
config PHYS_64BIT
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;