From b9b5956eb08a0ab12702b3bb9304e8157c595442 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Mon, 15 Oct 2018 02:21:19 -0700 Subject: arm: qemu: Enumerate virtio bus during early boot Currently devices on the virtio bus is not automatically enumerated, which means peripherals on the virtio bus are not discovered by their drivers. This uses board_init() to do the virtio enumeration. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- board/emulation/qemu-arm/qemu-arm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'board/emulation/qemu-arm/qemu-arm.c') diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index 812c90636d..e1f4709c4c 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -2,8 +2,12 @@ /* * Copyright (c) 2017 Tuomas Tynkkynen */ + #include +#include #include +#include +#include #ifdef CONFIG_ARM64 #include @@ -58,6 +62,12 @@ struct mm_region *mem_map = qemu_arm64_mem_map; 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; } -- cgit