From patchwork Sun Apr 2 02:02:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1764162 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=CJKXOfNP; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ppy495Jhwz1yY8 for ; Sun, 2 Apr 2023 12:03:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D328F85B7E; Sun, 2 Apr 2023 04:03:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="CJKXOfNP"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F174085C9B; Sun, 2 Apr 2023 04:03:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EAF5385AB9 for ; Sun, 2 Apr 2023 04:03:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-pj1-x1035.google.com with SMTP id j13so24235923pjd.1 for ; Sat, 01 Apr 2023 19:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1680400985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ni71BTgKoDuhyrTNpBJCYaDXlJcZ0gQ3cf090iW3zWA=; b=CJKXOfNPLTaIm1SCN26a9CHDxTQL8Z284enoIRb+fwW75s1IRpaSQKu0V47RKLEJsV qY+oy8LMfqP1aAClPySfjG5WrLsxAMKtFkm4fDwCO8YRF9awfwO6KitqRO8mA4f6/kLu weKBZrtb6FaHiBWvqJ9XT9HKyFcaVXMGtv1vM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680400985; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ni71BTgKoDuhyrTNpBJCYaDXlJcZ0gQ3cf090iW3zWA=; b=KEkNK2aF7nV78FMPuWZ4GFPxHHXHk7xsOtv9Qqi8i6BM01FRN80k33vApQ4D1EjGpU 0NwtL1bc5SY94v5LnsL7hOubcwMvVoAxY062GOPQ9ivUXuk3KJj7nU+zy6DQNY5yeAyA NTdUEI0lfZ+MtHGAovFtzS4l+Xm2awj+TyEP8JUVq9ceR+JxdtyEXhU5g3GiB0pLMnSp IFqq7cXs2SDe0d4YFkZZR4caOxeblxWCLBS6ciDgdFkENx8B8EMdB2PwaRTS8mcZ4Qhj rJiythfd/eW81F7qDuFKJFPeRkHJOdv4eHG5s6m23fXx1PRGvo17ugVCAXw6hXupGpWL b5IA== X-Gm-Message-State: AAQBX9cAPMczuQf9um8yeZEJoy+n4JKBKEAuG81/jh1CsU0Qm63eniHw IFJ2nYDnTL1LY7+FJPUxVyZpDP9JnznyuLdMlNY= X-Google-Smtp-Source: AKy350bo+pW8zz1TZGaj3D3qHqD3KDTJVK3E9z7g0boJm32yIgLO28pXv8ETagvg114WvpLqJ11Obg== X-Received: by 2002:a17:903:228b:b0:1a1:e112:4607 with SMTP id b11-20020a170903228b00b001a1e1124607mr40983952plh.50.1680400984965; Sat, 01 Apr 2023 19:03:04 -0700 (PDT) Received: from localhost.localdomain ([27.110.126.54]) by smtp.gmail.com with ESMTPSA id g14-20020a1709029f8e00b0019b0937003esm3988380plq.150.2023.04.01.19.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Apr 2023 19:03:04 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mark Kettenis , huang lin , Jeffy Chen , Simon Glass , Kever Yang , Philipp Tomsich , Tom Rini , Vagrant Cascadian Subject: [PATCH v7 02/11] virtio: Ensure PCI is set up first Date: Sun, 2 Apr 2023 14:02:24 +1200 Message-Id: <20230402140231.v7.2.I10d83b8073de5058efabbf2ba2498fe008624293@changeid> X-Mailer: git-send-email 2.40.0.348.gf938b09366-goog In-Reply-To: <20230402140231.v7.1.Id5a4b4ee7b653591dfb25e75204c17215521164b@changeid> References: <20230402140231.v7.1.Id5a4b4ee7b653591dfb25e75204c17215521164b@changeid> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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 --- (no changes since v5) Changes in v5: Add new patch to ensure PCI is set up first 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 de9bc90359ca..918cc15b019f 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);