diff --git a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c index fc4bd3f4b6..999adea53f 100644 --- a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c +++ b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c @@ -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) {