riscv: Move virtio scan to board_late_init()
[platform/kernel/u-boot.git] / board / emulation / qemu-riscv / qemu-riscv.c
index f39f3be..173245b 100644 (file)
@@ -12,6 +12,7 @@
 #include <log.h>
 #include <spl.h>
 #include <init.h>
+#include <usb.h>
 #include <virtio_types.h>
 #include <virtio.h>
 
@@ -30,6 +31,15 @@ int is_flash_available(void)
 
 int board_init(void)
 {
+       return 0;
+}
+
+int board_late_init(void)
+{
+       /* start usb so that usb keyboard can be used as input device */
+       if (CONFIG_IS_ENABLED(USB_KEYBOARD))
+               usb_init();
+
        /*
         * Make sure virtio bus is enumerated so that peripherals
         * on the virtio bus can be discovered by their drivers
@@ -39,11 +49,6 @@ int board_init(void)
        return 0;
 }
 
-int board_late_init(void)
-{
-       return 0;
-}
-
 #ifdef CONFIG_SPL
 u32 spl_boot_device(void)
 {