Message ID | 20201024152156.25578-7-samuel@sholland.org |
---|---|
State | Accepted |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.a=rsa-sha256 header.s=fm1 header.b=E+buADdC; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=aPp+QAB4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CJPyZ54kCz9sSG for <incoming@patchwork.ozlabs.org>; Sun, 25 Oct 2020 02:24:06 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 919FF824C3; Sat, 24 Oct 2020 17:22:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=sholland.org header.i=@sholland.org header.b="E+buADdC"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="aPp+QAB4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B4FF882485; Sat, 24 Oct 2020 17:22:15 +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.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B6DA282479 for <u-boot@lists.denx.de>; Sat, 24 Oct 2020 17:22:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=samuel@sholland.org Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0FFFF5C008C; Sat, 24 Oct 2020 11:22:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 24 Oct 2020 11:22:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=oy818OyTjFDUi RgtIin0PfnsMsNgBxVQ1tx2XxqimS4=; b=E+buADdCjENK8IRn1fbD0kZ6F1QSf litqPDE47jtIHoE8bkXq76EUm6ok2woiNmmYku8ZuGMiO8zeG2+RwrhoR6AVGyMj wg/o6fYaLscW/5jPjXTIXWUHvlYA0TEyvXaMHouQqJUnkagD09BKpSpU2bmQeA46 b7DRjqkwFK/j6rK1357URi1k2EWaejLv/3L4PYSUUHokV4Bl++T7bN2LOaDBbLZo oKhPHb45/q6kIF8YE6K4xoGDwusi3uAyO02iqtPFhhlaVWCVKCxPt9SLJw6hb/N3 EXjQwdvtcXoayPNBiljE4V1dSe2e1wrpLREkeb7efnX6Xo1CAOiJimv0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=oy818OyTjFDUiRgtIin0PfnsMsNgBxVQ1tx2XxqimS4=; b=aPp+QAB4 85EKT67rp0SUHH3cVLFWUtgVSUZXrSnzURBQLRp7zsezIRH23JOgP1frsVtLRqmf IqBeRdbvyU7AErLjpRIh0CUsNehjptfBiq23dK7fRFzgrQ10LmP7XeVuultW4Ijf gkqYGmWkdPgdiRKlBV/XCxFjHMUlz5WIHIts2kEhwwgHGsqIHdnBzz283VeAE2uG LPCxXMqffLZ6yNQX4GInDa9gY6DRyw/ZKpo+jxy2nm4+JV0DX8XDUViLFYtpodZO r9z7eLMQ/SwMdIkCEV/7K4tBDfE9OxNkKOiG3Q49l3f0FsL7CZda1sdweBI3i8wf lr5JDICq1LzRjg== X-ME-Sender: <xms:l0aUX4rqafBSHnsGj9I_AAhZWY2ZhEsfeIKlReLyd_kIwDpN2ZZobg> <xme:l0aUX-r0_rCBQsyj4Du2A_B0Iej8LQyiIgQjqxZbCBNa_7ugxHDAgd1r1FsXZ9_B1 E_G2z-HHjSEPcmvbQ> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrkedvgdekkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepudfhjeefvdfhgfefheetgffhieeigfefhefgvddvveefgeejheejvdfg jeehueeinecukfhppeejtddrudefhedrudegkedrudehudenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgrnhgu rdhorhhg X-ME-Proxy: <xmx:l0aUX9PbsBcynmEGMwjasSi6dHMfQVj07dakgc_49Z8AMX4JZpRDUg> <xmx:l0aUX_6WNOHUKpafwhUbyBJlXpvS4e63XJlE79_L0GSLigf2gMBoNQ> <xmx:l0aUX35CeNWiqIsCEf5CBU5cjwRN8Gv2HziY5KLOL-s3NR9PzI53-g> <xmx:mEaUX5mMX8Fo5VIAY6C8XCBfDxjf_fDR8g-FjWgGcBJi3Q7aTVEnPg> Received: from titanium.stl.sholland.net (70-135-148-151.lightspeed.stlsmo.sbcglobal.net [70.135.148.151]) by mail.messagingengine.com (Postfix) with ESMTPA id 6F0DF328005D; Sat, 24 Oct 2020 11:21:59 -0400 (EDT) From: Samuel Holland <samuel@sholland.org> To: Jagan Teki <jagan@amarulasolutions.com>, Maxime Ripard <mripard@kernel.org> Cc: Andre Przywara <andre.przywara@arm.com>, Peter Robinson <pbrobinson@gmail.com>, u-boot@lists.denx.de, Samuel Holland <samuel@sholland.org> Subject: [PATCH v2 6/8] sunxi: board: Set fdtfile to match the DT chosen by SPL Date: Sat, 24 Oct 2020 10:21:54 -0500 Message-Id: <20201024152156.25578-7-samuel@sholland.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201024152156.25578-1-samuel@sholland.org> References: <20201024152156.25578-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
PinePhone automatic device tree selection
|
expand
|
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 9d0e29788b1..d7ec66ed847 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -870,6 +870,7 @@ static void setup_environment(const void *fdt) int misc_init_r(void) { + const char *spl_dt_name; uint boot; env_set("fel_booted", NULL); @@ -888,6 +889,16 @@ int misc_init_r(void) env_set("mmc_bootdev", "1"); } + /* Set fdtfile to match the FIT configuration chosen in SPL. */ + spl_dt_name = get_spl_dt_name(); + if (spl_dt_name) { + char *prefix = IS_ENABLED(CONFIG_ARM64) ? "allwinner/" : ""; + char str[64]; + + snprintf(str, sizeof(str), "%s%s.dtb", prefix, spl_dt_name); + env_set("fdtfile", str); + } + setup_environment(gd->fdt_blob); #ifdef CONFIG_USB_ETHER