1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-10-22 10:31:56 +02:00

riscv: Move virtio scan to board_late_init()

When virtio_init() gets called from board_init() PCI isn't ready. Thus,
virtio-over-PCI (e.g. network interfaces) devices can't be detected and
used without additional `virtio scan` scan in the shell or a script.

Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
This commit is contained in:
Łukasz Stelmach
2024-03-28 10:58:24 +01:00
committed by Leo Yu-Chi Liang
parent f39b1b77d8
commit c532ddded9
2 changed files with 7 additions and 6 deletions

View File

@@ -22,6 +22,7 @@ config TARGET_OPENPITON_RISCV64
config TARGET_QEMU_VIRT config TARGET_QEMU_VIRT
bool "Support QEMU Virt Board" bool "Support QEMU Virt Board"
select BOARD_LATE_INIT
config TARGET_SIFIVE_UNLEASHED config TARGET_SIFIVE_UNLEASHED
bool "Support SiFive Unleashed Board" bool "Support SiFive Unleashed Board"

View File

@@ -31,12 +31,6 @@ int is_flash_available(void)
int board_init(void) int board_init(void)
{ {
/*
* Make sure virtio bus is enumerated so that peripherals
* on the virtio bus can be discovered by their drivers
*/
virtio_init();
return 0; return 0;
} }
@@ -46,6 +40,12 @@ int board_late_init(void)
if (CONFIG_IS_ENABLED(USB_KEYBOARD)) if (CONFIG_IS_ENABLED(USB_KEYBOARD))
usb_init(); usb_init();
/*
* Make sure virtio bus is enumerated so that peripherals
* on the virtio bus can be discovered by their drivers
*/
virtio_init();
return 0; return 0;
} }