From patchwork Wed Dec 30 13:57:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 355257 Delivered-To: patch@linaro.org Received: by 2002:a02:85a7:0:0:0:0:0 with SMTP id d36csp11350502jai; Wed, 30 Dec 2020 05:58:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOMQHS/rWM3qlssjfzGfgOjonY3vn6qeslmtavLPYBVn697hBdyccY51ApfWLdmB7Tt1IH X-Received: by 2002:a17:906:878d:: with SMTP id za13mr49151398ejb.395.1609336699534; Wed, 30 Dec 2020 05:58:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609336699; cv=none; d=google.com; s=arc-20160816; b=sXDkf/iow1yuWM0Te+NFcZm8E9gSgoMnUy7so2sARtY7PaCNeLRDEhdcYWhXGrXBKE L3DVJcY/oq2mAyJAnNC+TYytzlmkBDXf36SRtzVQrPsZzkRyM7sUzvS8fjfiuRAoLOsI yl/fqv9RXPX24OME7RvrDec2HHWesIjUb767xp8EUt0UWPG7Giq0/QyXvkG4poLWJGYd KzW7s5wn66Zk/+9lpK/AvDCR3oPIYqy4VBOUHCzftfZ+mza/XIbKRuS8NvzsO+dSdE01 gJoUW4RyqUe1UdlulIJ3r0llU+K34PyoX0KhMkn44lhwqMIlAeMz5seL4XYpzt+otnXv czhw== 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=oryn0kVjCtbs7L29QknjKNgquAxAQxFrZz4asmUY3I4=; b=dEkzcXEl/gJ22PJoWh8coTF/jCnQ3gZ0+1mtVq3g+uNFc1lw88Ps6yr18Pl3Lnj/gG UCc2on7lOr0jx1t+FV/1sqKNUW8Rb2yqMjsQerk8AklcwfXEpaPL49q7zgmhpUrXj2TK i1yjM6CDMlDAGkqmRhK6g9CdfZ9Bj3icZTpieyhk2C9cX6kKSOo72EPrd0V2bjCt9Of6 mVn9i6gbvNy0Mtm+fdFlLYYO6SwYQxfv+1Q1fsSE1mB8rQZGtQXnml+kfpzVFe/5CeGz GpZsj6jrVRSkVYOXDrW71T9/92SG1+3aJ4t/+camwO5LRZ3UR2fH1f8BTiR7qxyxMBaL X8fA== 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 dh5si22688013edb.122.2020.12.30.05.58.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Dec 2020 05:58:19 -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 10E35825F4; Wed, 30 Dec 2020 14:57:55 +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 3D40E8260A; Wed, 30 Dec 2020 14:57:49 +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 5314F82496 for ; Wed, 30 Dec 2020 14:57:39 +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 B507B12FC; Wed, 30 Dec 2020 05:57:37 -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 1E5633F6CF; Wed, 30 Dec 2020 05:57:34 -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 v4 02/14] qemu: arm: Initialise virtio devices in board_late_init Date: Wed, 30 Dec 2020 19:27:00 +0530 Message-Id: <20201230135712.5289-3-sughosh.ganu@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201230135712.5289-1-sughosh.ganu@linaro.org> References: <20201230135712.5289-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 the board_init function, which gets called before the initr_pci. With this sequence, the virtio block devices on the pci bus are not initialised. Move the initialisation of the virtio devices to board_late_init which gets called after the call to initr_pci. Signed-off-by: Sughosh Ganu --- Changes since V3: None arch/arm/mach-qemu/Kconfig | 2 ++ board/emulation/qemu-arm/qemu-arm.c | 5 +++++ 2 files changed, 7 insertions(+) -- 2.17.1 diff --git a/arch/arm/mach-qemu/Kconfig b/arch/arm/mach-qemu/Kconfig index 588d2d3102..186c3582eb 100644 --- a/arch/arm/mach-qemu/Kconfig +++ b/arch/arm/mach-qemu/Kconfig @@ -16,12 +16,14 @@ choice config TARGET_QEMU_ARM_32BIT bool "ARMv7-A, 32bit" select ARCH_SUPPORT_PSCI + select BOARD_LATE_INIT select CPU_V7A select SYS_ARCH_TIMER config TARGET_QEMU_ARM_64BIT bool "ARMv8, 64bit" select ARM64 + select BOARD_LATE_INIT endchoice 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