#ifndef USE_HOSTCC
#include <bootm.h>
#include <bootstage.h>
+#include <dm/root.h>
#include <cli.h>
#include <command.h>
#include <cpu_func.h>
{
}
+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();
+ if (IS_ENABLED(CONFIG_BOOTSTAGE_REPORT))
+ bootstage_report();
+
+ /*
+ * 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)
*/
int bootm_boot_start(ulong addr, const char *cmdline);
+/**
+ * bootm_final() - Announce and do cleanup before boot
+ *
+ * This performs the common pre-boot steps: printing the "Starting kernel"
+ * message, recording bootstage data, and removing active devices.
+ *
+ * @flag: Boot state flags (BOOTM_STATE_OS_FAKE_GO prints a fake-run message)
+ */
+void bootm_final(int flag);
+
#endif