From patchwork Thu Nov 26 18:40:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 333040 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp1542602ilb; Thu, 26 Nov 2020 10:42:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/KKmclRQ53hX6If6Xk/93+nmcZfkikhbhXS5viBbDt70HpLweYZvstSGoC0i9RdD3eQ9w X-Received: by 2002:a17:906:f894:: with SMTP id lg20mr3923287ejb.348.1606416154987; Thu, 26 Nov 2020 10:42:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606416154; cv=none; d=google.com; s=arc-20160816; b=umxRv4goI1sAxjenLUWovq6WXaoADP7JtgXZWnLo4DhD6Y27vbte1XgzfmrAcOCrQ6 OA2L2WUT7i5bFbGxoDcqPOkUA1qzK/L/FBOrdna/XtNCc1EzNjJmWBml4FHOXPYczUbo jCN7AOWvlrKSAnm0XgqHzKhusfZHaUkevlthKxR+sbXoB80AYBgrwaT7oem/1o7KpMkU 3BH8c7LgVr+FdxEbIo5RJFqnYGtt0YS4+BGHEXxCrp1QThw/95KfJRDcJI/EiUza8wJg 9mHAxiDm30rsYVQNNRFXsYMJ4S/yujSA88PgEkEm/azyLQxIRaN1nPtsenN0bKSajLQA reAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:cc:to:from; bh=jlDfmAKIMa77JnO2+eUk5IAi3oX7KMzTVNbN0He9XSo=; b=JoqDZLn2XC3GGGjclC4tB2zK/7/UdNNRM7WANXCOAN+CV6uA+4flMm0pNYKyEMGRH0 oTNM9A7cIisoHCF4lnrBJ9CC9SX2gx7JEPyNFp/79dzK2U361LCwYlAhaweQBV2VwHY+ Q0/ZTBK2Bp8C7vmDrm+UCOGMDB1fiyh4lM3j/eVODB2ngba4CQjZ/RMaDwBIymE95izo 63S1MfGrajYrFtsJrOjaWczmhO/jvJ4xsQ+pbVoVX1oW189+wt4p6OhjQyU8GZziI/S2 Ij3Z+Cj67BoOOXOZDZObubcX9SZ1Lw/1Bhf9Bnl5IvzLiQPcL+kNOJvonFvWWbOR5Cv2 xqIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id k16si3565287eja.59.2020.11.26.10.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 10:42:34 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1E1BE826E6; Thu, 26 Nov 2020 19:42:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 23AC6826E7; Thu, 26 Nov 2020 19:42:04 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 314F5826D6 for ; Thu, 26 Nov 2020 19:41:59 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sughosh.ganu@linaro.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CCFD415A1; Thu, 26 Nov 2020 10:41:57 -0800 (PST) Received: from a076522.blr.arm.com (a076522.blr.arm.com [10.162.16.44]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6532E3F23F; Thu, 26 Nov 2020 10:41:55 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Takahiro Akashi , Heinrich Schuchardt , Alexander Graf , Lukasz Majewski , Tuomas Tynkkynen , Tom Rini , Sughosh Ganu Subject: [PATCH 03/14] qemu: arm: Scan the pci bus in board_init Date: Fri, 27 Nov 2020 00:10:59 +0530 Message-Id: <20201126184110.30521-4-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201126184110.30521-1-sughosh.ganu@linaro.org> References: <20201126184110.30521-1-sughosh.ganu@linaro.org> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.102.3 at phobos.denx.de X-Virus-Status: Clean Scan the pci bus in board_init routine before scanning the virtio devices. This enumerates all the virtio devices, including devices found on the pci bus. Signed-off-by: Sughosh Ganu --- board/emulation/qemu-arm/qemu-arm.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.1 diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index e146d1cc50..b3d5b3d5c2 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -65,6 +65,14 @@ struct mm_region *mem_map = qemu_arm64_mem_map; int board_init(void) { + + /* + * Scan the pci bus before calling virtio_init. This + * enumerates all virtio devices, including devices + * on the pci bus. + */ + pci_init(); + /* * Make sure virtio bus is enumerated so that peripherals * on the virtio bus can be discovered by their drivers