From 27ff7806c1d7d1e98cc6ec1d295595786e13b4b4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 24 Apr 2023 13:49:45 +1200 Subject: [PATCH] virtio: Ensure PCI is set up first Sometimes virtio may rely on PCI, or at least that is what the distro_bootcmd script suggests. Add this in. Signed-off-by: Simon Glass --- drivers/virtio/virtio-uclass.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c index b3fb3dbfad..31bb21c534 100644 --- a/drivers/virtio/virtio-uclass.c +++ b/drivers/virtio/virtio-uclass.c @@ -373,6 +373,12 @@ static int virtio_bootdev_hunt(struct bootdev_hunter *info, bool show) { int ret; + if (IS_ENABLED(CONFIG_PCI)) { + ret = uclass_probe_all(UCLASS_PCI); + if (ret && ret != -ENOENT) + return log_msg_ret("pci", ret); + } + ret = uclass_probe_all(UCLASS_VIRTIO); if (ret && ret != -ENOENT) return log_msg_ret("vir", ret); -- 2.39.5