diff options
author | Simon Glass <sjg@chromium.org> | 2023-04-24 13:49:45 +1200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-04-26 08:43:04 -0400 |
commit | 27ff7806c1d7d1e98cc6ec1d295595786e13b4b4 (patch) | |
tree | b8c63b1492536adf951bea37027ed9333848293d | |
parent | 9f8351659add391f656a890ca4cd1164baba10c8 (diff) | |
download | u-boot-27ff7806c1d7d1e98cc6ec1d295595786e13b4b4.zip u-boot-27ff7806c1d7d1e98cc6ec1d295595786e13b4b4.tar.gz u-boot-27ff7806c1d7d1e98cc6ec1d295595786e13b4b4.tar.bz2 |
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>
-rw-r--r-- | drivers/virtio/virtio-uclass.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c index b3fb3db..31bb21c 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); |