Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DAF20C4338F for ; Mon, 26 Jul 2021 07:12:11 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 591C060F46 for ; Mon, 26 Jul 2021 07:12:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 591C060F46 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 037BA832C6; Mon, 26 Jul 2021 09:12:09 +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="d2f4uITF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CEDC6832C7; Mon, 26 Jul 2021 09:12:06 +0200 (CEST) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (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 F3730832B1 for ; Mon, 26 Jul 2021 09:12:02 +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=lokeshvutla@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 16Q7C0Z0071668; Mon, 26 Jul 2021 02:12:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1627283520; bh=YYADRCcxsleARQWpH4lB9lqNcN1JDh3rnZ76ouT2uc8=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=d2f4uITFE3xahco2kzv3YIUPiFxfaZ3H3qhGqam3ofg41CAHspc6wPdfAsVpYY4Az 7WZJXsApHNZ/sEDdZqJgQ4taD/D/Fj1OScghWMmftT0JH2Vhdcpw476xSn/mkxRW9p NsAl3Fi/4D5cXTPoFeuHn6neR9s6FcXvp6TE3if0= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 16Q7C0Xg034319 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 26 Jul 2021 02:12:00 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 26 Jul 2021 02:12:00 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Mon, 26 Jul 2021 02:12:00 -0500 Received: from [10.24.69.20] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 16Q7BwRN042690; Mon, 26 Jul 2021 02:11:59 -0500 Subject: Re: [PATCH v2 5/5] configs: am335x_evm: Fix BeagleBone Green DTB selection To: Paul Barker CC: Tom Rini , Peter Robinson , References: <20210712201412.13306-1-paul.barker@sancloud.com> <20210712201412.13306-6-paul.barker@sancloud.com> <20210720091946.1d4e94f7.paul.barker@sancloud.com> <17e3ec01-dd6a-e79e-4afe-900ddb56d3f9@ti.com> <20210721074006.6c96999d.paul.barker@sancloud.com> From: Lokesh Vutla Message-ID: <53d554fa-52f8-5bc0-c722-95f9cb3917f8@ti.com> Date: Mon, 26 Jul 2021 12:41:57 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210721074006.6c96999d.paul.barker@sancloud.com> Content-Type: text/plain; charset="windows-1252" Content-Language: en-US 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.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.103.2 at phobos.denx.de X-Virus-Status: Clean On 21/07/21 12:10 pm, Paul Barker wrote: > On Wed, 21 Jul 2021 11:29:04 +0530 > Lokesh Vutla wrote: > >> On 20/07/21 1:49 pm, Paul Barker wrote: >>> On Tue, 13 Jul 2021 11:59:06 +0530 >>> Lokesh Vutla wrote: >>> >>>> On 13/07/21 1:44 am, Paul Barker wrote: >>>>> The function board_is_bone_lt() returns true for the BeagleBone Green, >>>>> the BeagleBone Enhanced and the BeagleBone Black. Therefore when >>>>> selecting which devicetree to use we must ensure that the more specific >>>>> functions board_is_bbg1() and board_is_bben() are checked first >>>>> otherwise all three devices would end up using the am335x-boneblack >>>>> devicetree. This can be achieved by placing the relevant devicetree >>>>> names (am335x-sancloud-bbe and am335x-bonegreen) before am335x-boneblack >>>>> in CONFIG_OF_LIST. >>>> >>>> Such restrictions should be handled inside board_fit_config_name_match() and >>>> hiden from user configuration. Can you update the board_fit_config_name_match() >>>> instead of updating defconfig? >>> >>> Hi Lokesh, >>> >>> Apologies for the late reply, I lost most of last week due to illness. >>> >>> I first attempted to fix this by changing the order of things in >>> `board_fit_config_name_match` but it had no effect. Looking at >>> `fit_find_config_node` in `common/common_fit.c`, we loop through the >>> list of dtbs and check each one in turn for a match. So to move >>> am335x-bonegreen ahead of am335x-boneblack we need to change the order >>> in which the dtbs are checked in `fit_find_config_node`. The simplest >>> way I could find to do that is to change the order of the names in >>> CONFIG_OF_LIST. >> >> ahh..ok got it. But still such constraints in config file is most likely will >> not be maintained in future when someone touching the config. Because not >> everyone knows this. >> >> Is it possible to create a new macro which is true only for bbb and use it >> instead in board_fit_config_name_match? > > I'm happy to have a look for an alternative solution like that. The > patch here is a quick fix though that can be applied as-is. Perhaps we > should apply this and also look for an alternative implementation of > `board_is_bone_lt`. > > If you want to leave this patch out for now, can we move ahead and > merge the other patches in this series? You are right. Applied the first 4 patches to for-rc branch. Thanks and regards, Lokesh