From patchwork Mon Dec 21 11:43:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 346402 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp4384121jai; Mon, 21 Dec 2020 03:43:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJx720yKfArjRo6dei0AWasaH5gbR9aWh15SS9UJ8TcXj+njL2qv+c6rBzP/P4dhb//hr5fZ X-Received: by 2002:a17:906:1741:: with SMTP id d1mr4626291eje.182.1608551032849; Mon, 21 Dec 2020 03:43:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608551032; cv=none; d=google.com; s=arc-20160816; b=Ngfbm15HPbjUMvjD+ne3NtmXAgLqOhnLLr/+RCHbgtKPqPRV46R2mejR4TCSGdV+go gdNAhHp/qYpaeVhs9d9q5eClMgw8rFdVnHHlAkSW6h2kzzWfc34Sd8Nr1cgWerv35sjq 7WzQjsRaK5d9ECJ+SQSqnuOKjw7WpIVAruyT9D8rx4nbuXlDpl+/mDgoEWRJ2rq1K9LQ Db6du6CGvhsIPxsZb3K4A1dj1HXoN7kQ6aGT4VWd+fYzXzmEW0RFuXAeROzURCboY9dr Xb+4V47rZ+GQQMws/4cCACU+HDOKh9gpurmCK5x4Q5ys6nq4fiFO8jFVUYAxBwEwm+TY PYew== 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=HP5ds6sQI/Tr0AXQhGNV/qKHObVpjQI/3vziAhcygvg=; b=hGAy99Xvt6Ug7qjBtkmIqJR/DIqZS2y/Obg3Ol69wWk9vRy6CvgS2WBwWiSy/8/SSB RD3iUsJt5RVd1SNxA0ZdPgxn250mgGV5BBPS/TUk267ndupA8MqH57/+03SrD9UaxXw6 +mkUwBBA7EAniX+RTyCoV1uMK8dyloO2AbcJXrsVy7YFrj2jjzG3uytcMBnrcv2gkkTG bm1dWKx4nDlLaK/7A3jcYlj+3N9WjmBlEGtUTtdQXmKhyeWn1CXhbp8ynskbX5KTQT2q bvx97OQPT/M1DypDUqk25NaM6q/k6c34iFEWF5A9A00H7Gpc9WatOltSxgCgcryPa75h /cSQ== 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 g1si2020103ejf.714.2020.12.21.03.43.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Dec 2020 03:43:52 -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 0DF60827FA; Mon, 21 Dec 2020 12:43:40 +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 17363827DC; Mon, 21 Dec 2020 12:43:37 +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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, SPF_HELO_NONE 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 3DA618273A for ; Mon, 21 Dec 2020 12:43:34 +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 F23F3101E; Mon, 21 Dec 2020 03:43:32 -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 5C9283F718; Mon, 21 Dec 2020 03:43:30 -0800 (PST) From: Sughosh Ganu To: u-boot@lists.denx.de Cc: Takahiro Akashi , Heinrich Schuchardt , Alexander Graf , Lukasz Majewski , Tuomas Tynkkynen , Tom Rini , Ilias Apalodimas , Sughosh Ganu Subject: [PATCH v2 02/14] qemu: arm: Initialise virtio in board_late_init Date: Mon, 21 Dec 2020 17:13:02 +0530 Message-Id: <20201221114314.25588-3-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201221114314.25588-1-sughosh.ganu@linaro.org> References: <20201221114314.25588-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 On the qemu arm platform, the virtio devices are initialised in board_init, which gets called before the initr_pci. With this, the virtio block devices on the pci bus are not initialised. Move the initialisation of virtio devices to board_late_init which gets called after the call to initr_pci. Signed-off-by: Sughosh Ganu --- Changes since V1: * The earlier patch was adding a call to pci_init in board_init. Moved the virtio_init call to board_late_init board/emulation/qemu-arm/qemu-arm.c | 5 +++++ configs/qemu_arm64_defconfig | 1 + 2 files changed, 6 insertions(+) -- 2.17.1 diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index f18f2ed7da..aa68bef469 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -64,6 +64,11 @@ struct mm_region *mem_map = qemu_arm64_mem_map; #endif int board_init(void) +{ + return 0; +} + +int board_late_init(void) { /* * Make sure virtio bus is enumerated so that peripherals diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig index f6e586627a..5c855fa08c 100644 --- a/configs/qemu_arm64_defconfig +++ b/configs/qemu_arm64_defconfig @@ -14,6 +14,7 @@ CONFIG_LEGACY_IMAGE_FORMAT=y CONFIG_USE_PREBOOT=y # CONFIG_DISPLAY_CPUINFO is not set # CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_BOARD_LATE_INIT=y CONFIG_PCI_INIT_R=y CONFIG_CMD_BOOTEFI_SELFTEST=y CONFIG_CMD_NVEDIT_EFI=y