From: Simon Glass Date: Mon, 24 Apr 2023 01:49:45 +0000 (+1200) Subject: virtio: Ensure PCI is set up first X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=27ff7806c1d7d1e98cc6ec1d295595786e13b4b4;p=u-boot.git 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 --- 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);