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 A5FCBC04A68 for ; Thu, 28 Jul 2022 19:26:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 95ADA841B0; Thu, 28 Jul 2022 21:26:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.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=konsulko.com header.i=@konsulko.com header.b="RUj14R7e"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C0AAD841C2; Thu, 28 Jul 2022 21:26:14 +0200 (CEST) Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4BCDE8414B for ; Thu, 28 Jul 2022 21:26:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x733.google.com with SMTP id b25so2159806qka.11 for ; Thu, 28 Jul 2022 12:26:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=3uDuz6YjvkRS4dosYqtnTuIkF5YYyaP513rDC0RWT3E=; b=RUj14R7eoq0II5HtWGSvzPys+LA24YP2L86gtfMZHYuWbyQcVtZKxAKQ/QcG1ruIyz mwgnWFFRA22qYr8+kMHfb6ul3kbAAYG5T0IanskDdaq7aEY8vvfZmHd0sqInMua0RKeD zO1ZGQuUepsEiI6CDSQa10fbkh8pHFjQAAskA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=3uDuz6YjvkRS4dosYqtnTuIkF5YYyaP513rDC0RWT3E=; b=60LPw5AAYRY19C+q62EI4HhBYmVxFeL9NIMWb66rVHxBMlK9t1fk2U8pQper+YpBRA tsvJdwDQ4LccP6RoCKZlBplRHXFBdqD4s1nafpxzyD2efNalC2uV9dTTE3A21sjEhUH7 4MS7Os20dP+rE/w3KiGEPoTgQIhHjZLu6LjqCrMS4bdg1uMwg1PTzGj9Mj2LhpzvTRIy bHq/Jaa2ApalrUMKqcGalDh08arnMbg1d2N9eNUfbLZp0DOEdxDz+tUou8YNo7d4JThT CXF/SoUzi9yiwa+RLIwJBGKV6Rvo6utXLGYodCD/IwaN6guBfVDjtvhhG5t35hGKUDG2 UM1Q== X-Gm-Message-State: AJIora9/UZD2ymmfo5f1oSlpVu/1xa3vua/lMmzbWYnn3/jzVrgfp1D/ tMPc7KW9euawfEE3UyoC5YCicVp6dV6290IS X-Google-Smtp-Source: AGRyM1tBXd6K9ydEVwxvIDN6T2JPsB3Kab/L1TjIeGRNNkQSCj82JomLKUS233+wIAW1+hVk7GnQnA== X-Received: by 2002:a05:620a:461f:b0:6b6:63a3:72dd with SMTP id br31-20020a05620a461f00b006b663a372ddmr260401qkb.681.1659036370883; Thu, 28 Jul 2022 12:26:10 -0700 (PDT) Received: from bill-the-cat (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id bm8-20020a05620a198800b006a787380a5csm1092640qkb.67.2022.07.28.12.26.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 12:26:10 -0700 (PDT) Date: Thu, 28 Jul 2022 15:26:08 -0400 From: Tom Rini To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: u-boot@lists.denx.de, Simon Glass , Heinrich Schuchardt Subject: Re: [RFCv2] doc: develop: Describe system configuration Message-ID: <20220728192608.GL1146598@bill-the-cat> References: <20220728185349.2039431-1-trini@konsulko.com> <20220728190507.csxskvjp2ests36c@pali> <20220728191803.GK1146598@bill-the-cat> <20220728192152.7tkkj7tvdu5gc5yt@pali> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SZGHj6OchM/kEUqg" Content-Disposition: inline In-Reply-To: <20220728192152.7tkkj7tvdu5gc5yt@pali> X-Clacks-Overhead: GNU Terry Pratchett 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.6 at phobos.denx.de X-Virus-Status: Clean --SZGHj6OchM/kEUqg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 28, 2022 at 09:21:52PM +0200, Pali Roh=E1r wrote: > On Thursday 28 July 2022 15:18:03 Tom Rini wrote: > > On Thu, Jul 28, 2022 at 09:05:07PM +0200, Pali Roh=E1r wrote: > > > On Thursday 28 July 2022 14:53:49 Tom Rini wrote: > > [snip] > > > > +When it has been determined that the practical solution for where = to have > > > > +something is in the ``CFG`` namespace, the next decision is where = to place these > > > > +settings. It is strongly encouraged to place these in the architec= ture header > > > > +files, if they are generic to a given SoC, or under the board dire= ctory if board > > > > +specific. Placing them under the board.h file in the *include/conf= igs/* > > > > +directory should be seen as a last resort. > > >=20 > > > Sounds good. > > >=20 > > > The only missing bit of information for me, which I really do not know > > > still remain... Where, how and in which format to store board specific > > > CFG option which is required for architecture or SoC for proper setup? > > >=20 > > > It cannot be in board/ subdir because arch/ code cannot use it (and e= ven > > > do not know which include file should use). It cannot be in arch/ sub= dir > > > because it is SoC specific (e.g. arch would have to use long spaghetti > > > #if defined(BOARD_1) ... #elif defined(BOARD_2) ... #endif block). And > > > it cannot be in include/configs/ because you do not like it and do not > > > want it here. > > >=20 > > > Currently this issue is _un_solved by using CONFIG option either in > > > Kconfig or in include/configs/ ... and both options are not ideal. > > >=20 > > > I just do not see how to solve this problem. > >=20 > > I think it's fine to have things in quite literally > > (which we have a few of already) and then as needed #if / #elif / #endif > > for SoC changes. Much of this _could_ be instead pulled from device > > trees. But that's unlikely to happen for a number of platforms. And > > for the board specific cases which are not converted to come out of > > device tree, include/configs/board.h isn't going to be able to go away > > for that platform just yet. > >=20 > > So in a round about way, yes, I'm just punting on the problem because I > > suspect the "right" answer is converting to driver model in a more > > complete way and pulling the information from the device tree. But I > > accept there's not a desire on anyones part to invest that much time in > > a dead end platform. >=20 > Driver model and device tree is probably the better place. But in case > such option is required for SoC setup to allow U-Boot to access device > tree then it cannot be in device tree... I guess I need an example value or two please, that can't reside in nor can be delayed long enough to come from the device tree instead. One thing that we can and do in some platforms do today is have SPL use a correct-enough simplified device tree so we always enable enough clocks/mux to have GPIOs work to determine the real rev we're on and pass the correct tree to full U-Boot. I don't think we have the hooks to re-evaluate the tree in full U-Boot, but perhaps we do need that. --=20 Tom --SZGHj6OchM/kEUqg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmLi4tAACgkQFHw5/5Y0 tyxdZgwArIsS2iLTy3vBg3w1S4pMtSrXVJDLauE0HzWZoWJcaNKnNOCbmXhSLuBy dQxPVDr9RXzqRIbyqJOJvIh3XGPnN1SSQPuVzHeAhZ/2EiYMKhgg+h4xVlhSJWFi H1JkoFaKNK3rOOJIiZjHVqbYp5srgfahtrsob4l2Pe7vD+zrlhmyZ9Ql9D9gVS8b GILXuUrsu+m8E9+6FUfdvA3EJkSWShrVrix4fe+frDVm3ZAiy9w02ImE2RxeEBMv 3dwBER03TssT4FpBXUA4cC+r2dkK0sRm113RdCbxWTVL8b5wOZ5L+s7O3GtLfSes wC0jqJJ9TSViKp7PgLgyoMgTDBarwAfeCrCIYy7dPwzuoPKqQonhR2eW/VPT6w+x trqRp3IqzKchfM999FEHw3xx1/Jcesyoaj+kANEshLmeS73hscYIqNRGnRhoTfrH 3yBXfJ6ImrQaehn6ZkTrB+LhXHBDSQWB2PgzfCTZ1NWzmcPc5d80oNN+HWO1Xy57 PET2XuMY =/O01 -----END PGP SIGNATURE----- --SZGHj6OchM/kEUqg--