[PATCH] qemu: arm: Scan the pci bus in board_init

Sughosh Ganu sughosh.ganu at linaro.org
Tue Dec 31 14:31:17 CET 2019


Scan the pci bus in board_init routine before scanning the virtio
devices. This enumerates all the virtio devices, including devices
found on the pci bus.

Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
---
 board/emulation/qemu-arm/qemu-arm.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c
index 4e18733..6c5335c 100644
--- a/board/emulation/qemu-arm/qemu-arm.c
+++ b/board/emulation/qemu-arm/qemu-arm.c
@@ -63,6 +63,13 @@ struct mm_region *mem_map = qemu_arm64_mem_map;
 int board_init(void)
 {
 	/*
+	 * Scan the pci bus before calling virtio_init. This
+	 * enumerates all virtio devices, including devices
+	 * on the pci bus.
+	 */
+	pci_init();
+
+	/*
 	 * Make sure virtio bus is enumerated so that peripherals
 	 * on the virtio bus can be discovered by their drivers
 	 */
-- 
2.7.4



More information about the U-Boot mailing list