summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
Diffstat (limited to 'boot')
-rw-r--r--boot/bootm.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index 280efb26e90..4836d6b2d41 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -7,6 +7,7 @@
#ifndef USE_HOSTCC
#include <bootm.h>
#include <bootstage.h>
+#include <dm/root.h>
#include <cli.h>
#include <command.h>
#include <cpu_func.h>
@@ -1194,6 +1195,30 @@ void __weak switch_to_non_secure_mode(void)
{
}
+void bootm_final(int flag)
+{
+ printf("\nStarting kernel ...%s\n\n",
+ (flag & BOOTM_STATE_OS_FAKE_GO) ?
+ " (fake run for tracing)" : "");
+
+ bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
+
+ if (IS_ENABLED(CONFIG_BOOTSTAGE_FDT) && IS_ENABLED(CONFIG_CMD_FDT))
+ bootstage_fdt_add_report();
+ bootstage_stash_default();
+ if (IS_ENABLED(CONFIG_BOOTSTAGE_REPORT))
+ bootstage_report();
+
+ board_quiesce_devices();
+
+ /*
+ * Call remove function of all devices with a removal flag set.
+ * This may be useful for last-stage operations, like cancelling
+ * of DMA operation or releasing device internal buffers.
+ */
+ dm_remove_devices_active();
+}
+
#else /* USE_HOSTCC */
#if defined(CONFIG_FIT_SIGNATURE)