Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 90811C001DF for ; Mon, 31 Jul 2023 14:36:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E4C9C868CE; Mon, 31 Jul 2023 16:36:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="Dmy+HsX4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22E64868DF; Mon, 31 Jul 2023 16:36:43 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 9D01186895 for ; Mon, 31 Jul 2023 16:36:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=afd@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36VEadnT077106 for ; Mon, 31 Jul 2023 09:36:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690814199; bh=uzPk0MCmsu7lH8zIekBda3Ov6GaB+JT2Hcr1LFGx/Wg=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=Dmy+HsX4UThNshufrkD9PVvWMM3/fD73YhP1+RBy2juY/nD7jL58hAZgLAYS3TAls vXhVbePL6gX8/cGmepSGHGYbfluqdM6qmBPoZVcioIbKgXjRJw71ezr+887GaSFh4G wtNLHak5/DRlztCjOn4eV8AmmTEXcRT0rUKgQT2M= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36VEadf2029601 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 31 Jul 2023 09:36:39 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 31 Jul 2023 09:36:39 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 31 Jul 2023 09:36:38 -0500 Received: from [10.250.32.123] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36VEacP2113502; Mon, 31 Jul 2023 09:36:38 -0500 Message-ID: Date: Mon, 31 Jul 2023 09:36:38 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] board: ti: am62x: Add variable device tree in env Content-Language: en-US To: Jason Kacines , Manorit Chawdhry , Bryan Brattlof , Vignesh Raghavendra CC: References: <20230731142727.11550-1-j-kacines@ti.com> From: Andrew Davis In-Reply-To: <20230731142727.11550-1-j-kacines@ti.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean On 7/31/23 9:27 AM, Jason Kacines wrote: > Added variable default_device_tree that grabs from defconfig. Prevents > needing to change this variable in two locations if using a separate > device tree. In the future, it would be a good idea to remove this logic > completely, but this will help reduce complications. > If there are more than one possible DT for a given configuration, then we should have logic in `findfdt` to handle that. Not sure what having this set from kconfig will help in practice. Plus this kconfig is the DT bundled with SPL/U-Boot, but here you are using it to set the name of the DT to load for kernel (in theory these should have the same name but it still feels like a misuse). How about we just skip to removing this logic as you suggest, set name_fdt directly and remove the `default_device_tree` env var. Andrew > Signed-off-by: Jason Kacines > --- > board/ti/am62x/am62x.env | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env > index bb37d21de6..ee3d5a6b5f 100644 > --- a/board/ti/am62x/am62x.env > +++ b/board/ti/am62x/am62x.env > @@ -1,7 +1,7 @@ > #include > #include > > -default_device_tree=ti/k3-am625-sk.dtb > +default_device_tree=CONFIG_DEFAULT_DEVICE_TREE.dtb > findfdt= > setenv name_fdt ${default_device_tree}; > setenv fdtfile ${name_fdt}