summaryrefslogtreecommitdiff
path: root/board/emulation/qemu-arm/qemu-arm.c
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-10-15 02:21:19 -0700
committerSimon Glass <sjg@chromium.org>2018-11-14 09:16:28 -0800
commitb9b5956eb08a0ab12702b3bb9304e8157c595442 (patch)
tree731ad6622cb835ce2bd79062f5228858ff88774b /board/emulation/qemu-arm/qemu-arm.c
parent6f3327658b03f448c324ac54aad1bd6cc2c2e50d (diff)
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 <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/emulation/qemu-arm/qemu-arm.c')
-rw-r--r--board/emulation/qemu-arm/qemu-arm.c10
1 files changed, 10 insertions, 0 deletions
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 <common.h>
+#include <dm.h>
#include <fdtdec.h>
+#include <virtio_types.h>
+#include <virtio.h>
#ifdef CONFIG_ARM64
#include <asm/armv8/mmu.h>
@@ -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;
}