riscv/virt: probe virtio earlier

This allows virtio devices to be probed upon board_early_init, thus
making virito-serial ready earlier for console use.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-07-24 15:10:30 +08:00 committed by Xiang Xiao
parent 9e59b0b43b
commit 4f66b188cd

View File

@ -135,7 +135,9 @@ int board_app_initialize(uintptr_t arg)
#endif
#ifdef CONFIG_DRIVERS_VIRTIO_MMIO
#ifndef CONFIG_BOARD_EARLY_INITIALIZE
qemu_virtio_register_mmio_devices();
#endif
#endif
return OK;
@ -197,6 +199,13 @@ void board_late_initialize(void)
#endif
}
void board_early_initialize(void)
{
#ifdef CONFIG_DRIVERS_VIRTIO_MMIO
qemu_virtio_register_mmio_devices();
#endif
}
#ifdef CONFIG_BOARDCTL_POWEROFF
int board_power_off(int status)
{