riscv: Call bootm_final()
Make use of this function, adding some pieces needed by RISC-V Drop the udc_disconnect() from EFI_LOADER since it is now done in bootm_final() Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -32,27 +32,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
*/
|
||||
static void announce_and_cleanup(int fake)
|
||||
{
|
||||
printf("\nStarting kernel ...%s\n\n", fake ?
|
||||
"(fake run for tracing)" : "");
|
||||
bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
|
||||
#ifdef CONFIG_BOOTSTAGE_FDT
|
||||
bootstage_fdt_add_report();
|
||||
#endif
|
||||
#if CONFIG_IS_ENABLED(BOOTSTAGE_REPORT)
|
||||
bootstage_report();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_DEVICE
|
||||
udc_disconnect();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 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();
|
||||
|
||||
bootm_final(fake);
|
||||
cleanup_before_linux();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,17 +7,24 @@
|
||||
|
||||
#include <bootm.h>
|
||||
#include <bootstage.h>
|
||||
#include <usb.h>
|
||||
#include <dm/root.h>
|
||||
|
||||
void bootm_final(enum bootm_final_t flags)
|
||||
{
|
||||
printf("\nStarting kernel ...\n\n");
|
||||
printf("\nStarting kernel ...%s\n\n", flags & BOOTM_FINAL_FAKE ?
|
||||
"(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();
|
||||
|
||||
if (IS_ENABLED(CONFIG_USB_DEVICE))
|
||||
udc_disconnect();
|
||||
|
||||
/*
|
||||
* Call remove function of all devices with a removal flag set.
|
||||
* This may be useful for last-stage operations, like cancelling
|
||||
|
||||
@@ -2253,8 +2253,6 @@ static efi_status_t EFIAPI efi_exit_boot_services(efi_handle_t image_handle,
|
||||
|
||||
if (!efi_st_keep_devices) {
|
||||
bootm_disable_interrupts();
|
||||
if (IS_ENABLED(CONFIG_USB_DEVICE))
|
||||
udc_disconnect();
|
||||
board_quiesce_devices();
|
||||
bootm_final(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user