Skip to content

Commit

Permalink
riscv/virt: probe virtio earlier
Browse files Browse the repository at this point in the history
This allows virtio devices to be probed upon board_early_init, thus
allowing virito-serial being ready earlier for console uses.

Signed-off-by: Yanfeng Liu <[email protected]>
  • Loading branch information
yf13 committed Jul 24, 2024
1 parent f970b57 commit 0701fee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,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;
Expand Down Expand Up @@ -183,6 +185,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)
{
Expand Down

0 comments on commit 0701fee

Please sign in to comment.