From patchwork Thu Nov 26 18:40:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sughosh Ganu X-Patchwork-Id: 333038 Delivered-To: patch@linaro.org Received: by 2002:a92:5e16:0:0:0:0:0 with SMTP id s22csp1542347ilb; Thu, 26 Nov 2020 10:42:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7dM/M3X1MIKT3HSqtGjvx1YMnElYA5TsJy1oe9mf9X/ThAc6v0mnt7C3xa0DCEHJr/Nu8 X-Received: by 2002:a17:907:447d:: with SMTP id oo21mr1235343ejb.367.1606416131494; Thu, 26 Nov 2020 10:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606416131; cv=none; d=google.com; s=arc-20160816; b=wqq7Dzuv7YH6zbTAqnod5bCG25NAtskh7PYMYT6a+iWN4ED6MgcqZp24YS77aHB1rB Mcri4b+s0LhOFKwtHHy134bCEAz02w+OTixWI3iCIKFC1aogzhCh01D7IAJWkZ1EVoZh DF9y9sZ6JDegJGFJnePNo6RSrGd12fez9/KrJdEFK1vGFVfPDrltc1hJmIuVxMvM95BF WopIBVuGoDukHkNO9/W6WMAx0nGazny5M9Rxd2m3f2y8ys2l3qcmzJtX0WV/W0mYgKxa 9RmsvzS8M6twVFN0FC2OIelIu8+IGzui8OCkRZfzRnGGJHQgTndcXQte3jfDF5sWO1Mj yDUA== 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=Ch5nzG5XBXD5QSSPZ8f9z5FPkh+9BJjYV8K2YkvAHAc=; b=EPz4gwEK/+TbQE7GplcJrzryr60npYX1jM4xryKipTwCXwA/nRUnfMKbSx4v2WNCi6 1nlgi4g43smtRrow71HGjsTHvO21DWe7orP9efMo92hnGgyO1BKTs2+m3Jo7mH7+AfQK mgizANNXGdxbiX0ONdqzgHURDLnmhl9rIsc0ezxzTy5lwN/Gc6zM8VSpdWSSlx7xdHWF 0UHO7RxRI11f3atLnYIn+NNvZpY9A3hD7V647GOzXZaflUxGg0fvw5v2O3fAp8EQlIy6 oN6RA49HZUeGQkpDUC8Vv8XSrQkxJQU7Os554VG6VHUeYj9DS48qtKPGjXZJKlMIEgI8 OG8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id e13si3632920eja.305.2020.11.26.10.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2020 10:42:11 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 8D2E8826D9; Thu, 26 Nov 2020 19:42:00 +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 2A15E826C3; Thu, 26 Nov 2020 19:41:56 +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 AF155826C3 for ; Thu, 26 Nov 2020 19:41:52 +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 C1FEA1516; Thu, 26 Nov 2020 10:41:51 -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 5A0323F23F; Thu, 26 Nov 2020 10:41:49 -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 01/14] qemu: arm: Use the generated DTB only when CONGIG_OF_BOARD is defined Date: Fri, 27 Nov 2020 00:10:57 +0530 Message-Id: <20201126184110.30521-2-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 The Qemu platform emulator generates a device tree blob and places it at the start of the dram, which is then used by u-boot. Use this dtb only if CONFIG_OF_BOARD is defined. This allows using a different device tree, using the CONFIG_OF_SEPARATE option. This dtb is attached to the u-boot binary as a u-boot-fdt.bin file Signed-off-by: Sughosh Ganu --- board/emulation/qemu-arm/qemu-arm.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/board/emulation/qemu-arm/qemu-arm.c b/board/emulation/qemu-arm/qemu-arm.c index f18f2ed7da..e146d1cc50 100644 --- a/board/emulation/qemu-arm/qemu-arm.c +++ b/board/emulation/qemu-arm/qemu-arm.c @@ -89,11 +89,13 @@ int dram_init_banksize(void) return 0; } +#if defined(CONFIG_OF_BOARD) void *board_fdt_blob_setup(void) { /* QEMU loads a generated DTB for us at the start of RAM. */ return (void *)CONFIG_SYS_SDRAM_BASE; } +#endif void enable_caches(void) {