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 <sjg@chromium.org>
This commit is contained in:
Simon Glass 2023-04-24 13:49:45 +12:00 committed by Tom Rini
parent 9f8351659a
commit 27ff7806c1

View file

@ -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);