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:
parent
9e59b0b43b
commit
4f66b188cd
@ -135,7 +135,9 @@ int board_app_initialize(uintptr_t arg)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DRIVERS_VIRTIO_MMIO
|
#ifdef CONFIG_DRIVERS_VIRTIO_MMIO
|
||||||
|
#ifndef CONFIG_BOARD_EARLY_INITIALIZE
|
||||||
qemu_virtio_register_mmio_devices();
|
qemu_virtio_register_mmio_devices();
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
@ -197,6 +199,13 @@ void board_late_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void board_early_initialize(void)
|
||||||
|
{
|
||||||
|
#ifdef CONFIG_DRIVERS_VIRTIO_MMIO
|
||||||
|
qemu_virtio_register_mmio_devices();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BOARDCTL_POWEROFF
|
#ifdef CONFIG_BOARDCTL_POWEROFF
|
||||||
int board_power_off(int status)
|
int board_power_off(int status)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user