From mboxrd@z Thu Jan 1 00:00:00 1970 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.8 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,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 BCA4CC07E9B for ; Wed, 21 Jul 2021 05:59:24 +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 89E8B60232 for ; Wed, 21 Jul 2021 05:59:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89E8B60232 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CFBE881664; Wed, 21 Jul 2021 07:59:20 +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="wydN+p3x"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 215DA80FBE; Wed, 21 Jul 2021 07:59:19 +0200 (CEST) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 864E480FBE for ; Wed, 21 Jul 2021 07:59:15 +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 lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 16L5x8KS061113; Wed, 21 Jul 2021 00:59:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1626847148; bh=+iyCli9H53dFRlLkGa+6JcxOCGTDv7l2Fj9Oc1Qq+MQ=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=wydN+p3xklgLjrCenTeuwcERGbc9OOvhvRHA5b9wfKZY8aoetZGA20+a2lFYiolzv XtCkl2l3BqcXLG7S5KVOKfxFfhscVHwjJm3hMncr29pbbPFm9/+JsJEhRERm9IxPmm syELxIObWypzd5nn6aeV5pwOLkodJYvWqkIaKAVo= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 16L5x8Y4041246 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 21 Jul 2021 00:59:08 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 21 Jul 2021 00:59:07 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE112.ent.ti.com (10.64.6.33) 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; Wed, 21 Jul 2021 00:59:07 -0500 Received: from [10.24.69.20] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 16L5x5w2026482; Wed, 21 Jul 2021 00:59:06 -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> From: Lokesh Vutla Message-ID: <17e3ec01-dd6a-e79e-4afe-900ddb56d3f9@ti.com> Date: Wed, 21 Jul 2021 11:29:04 +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: <20210720091946.1d4e94f7.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 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? Thanks and reagrds, Lokesh > > Thanks, >