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 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 EE351C636CD for ; Wed, 8 Feb 2023 01:40:18 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BA3C085E7E; Wed, 8 Feb 2023 02:40:15 +0100 (CET) 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="Rudso0tO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AD3CA85E6A; Wed, 8 Feb 2023 02:40:11 +0100 (CET) Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (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 33FAF85DE5 for ; Wed, 8 Feb 2023 02:40:06 +0100 (CET) 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-qv1-xf35.google.com with SMTP id mm5so6115425qvb.12 for ; Tue, 07 Feb 2023 17:40:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LJvgjd0mQx71TL9kRGQ1SLdyGmyLeD9iFB80EjoTuc8=; b=Rudso0tORyFm8S0wPMrDJB0A/FtN6Gxcn/COXhGyWsgN1UI1yhE1VuRDQKYQnUXjAx w1jzIebjKqxIRUJoxirh5HG2mkTgZJSmClBLRTZm5+ftjey20XycNKcZlLyZ0l0JlufG fZIEdQtch2LZu1KCWlloIX18AiLJYP+ujfSXE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LJvgjd0mQx71TL9kRGQ1SLdyGmyLeD9iFB80EjoTuc8=; b=RAaWVgahuTUzbNbJBdWUGxykOTaFW6k7yOShcbBA6CJ5UxplnwHja82BCw7tEJ/ByS l28cNrouoxkcjMV6+795tTbVS53IiTVu4OV7nL/4cupBwZ8Q3IYl6DqZQbCMhNX0bY6t pezU/mtZwM6ccF5/3uU7AK5ImL7F+KT04vRFnicCwGFRUZDjUIa5gcnQPZjwGrs1fZLT h6XL14sQzLq3S0fD1t7shNxZP7nGsdeQ0OR7KaDGh9OxKC+wENw+3vhbncQyCox8t6CE z2Blr6J12jFJTo8cBbcw00vxRNIxkhWErrTCafy75WApJwCO0VSKt6Do4kJc+DNAgSAM dt3g== X-Gm-Message-State: AO0yUKUoIMrMAAGabLuov0cGlgfN1b1wEwrlpQGasbUXj1V6HguqfJU4 xcpZaAD8O3ebCBk3++XWkEf1lA== X-Google-Smtp-Source: AK7set9P8PhTyCIcZvtQ0bj7/f2aV1H3CALOsTqhuAZrcd4re5ue9hNR0u7BcC5+4FZhWBBtiAESMA== X-Received: by 2002:a05:6214:f6e:b0:56b:f210:8d5d with SMTP id iy14-20020a0562140f6e00b0056bf2108d5dmr10328869qvb.0.1675820404897; Tue, 07 Feb 2023 17:40:04 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-90cc-7e59-435b-3104.res6.spectrum.com. [2603:6081:7b00:6400:90cc:7e59:435b:3104]) by smtp.gmail.com with ESMTPSA id t66-20020a374645000000b0072862fcbbdcsm3616665qka.42.2023.02.07.17.40.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 17:40:04 -0800 (PST) Date: Tue, 7 Feb 2023 20:40:02 -0500 From: Tom Rini To: Simon Glass Cc: Michal Simek , u-boot@lists.denx.de, U-Boot Custodians Subject: Re: [PATCH v3 6/8] dm: treewide: Complete migration to new driver model schema Message-ID: References: <5919786f-354d-7d7f-d2a7-19f0b7121a0c@amd.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nQZnqPKE7R0pcr6Z" Content-Disposition: inline In-Reply-To: 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 --nQZnqPKE7R0pcr6Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 07, 2023 at 06:32:58PM -0700, Simon Glass wrote: > Hi Tom, >=20 > On Tue, 7 Feb 2023 at 17:16, Tom Rini wrote: > > > > On Tue, Feb 07, 2023 at 03:25:18PM -0700, Simon Glass wrote: > > > Hi Tom, > > > > > > On Tue, 7 Feb 2023 at 14:46, Tom Rini wrote: > > > > > > > > On Tue, Feb 07, 2023 at 02:43:49PM -0700, Simon Glass wrote: > > > > > Hi Tom, > > > > > > > > > > On Tue, 7 Feb 2023 at 14:06, Tom Rini wrote: > > > > > > > > > > > > On Mon, Feb 06, 2023 at 10:12:27AM -0700, Simon Glass wrote: > > > > > > [snip] > > > > > > > On Mon, 6 Feb 2023 at 07:56, Michal Simek wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 2/6/23 15:44, Tom Rini wrote: > > > > > > > > > On Mon, Feb 06, 2023 at 01:22:48PM +0100, Michal Simek wr= ote: > > > > > > > > >> Hi Simon, > > > > > > > > >> > > > > > > > > >> On 2/1/23 23:54, Simon Glass wrote: > > > > > > > > >>> Update various build and test components to use the new= schema. > > > > > > > > >>> > > > > > > > > >>> Signed-off-by: Simon Glass > > > > > > > > >>> --- > > > > > > > > >>> > > > > > > > > >>> (no changes since v1) > > > > > > > > >>> > > > > > > > > >>> drivers/core/ofnode.c | 10 +++++----- > > > > > > > > >>> drivers/video/video-uclass.c | 4 ++-- > > > > > > > > >>> dts/Kconfig | 2 +- > > > > > > > > >>> include/dm/device.h | 2 +- > > > > > > > > >>> include/dm/ofnode.h | 10 +++++----- > > > > > > > > >>> scripts/Makefile.lib | 12 ++++++------ > > > > > > > > >>> test/dm/test-fdt.c | 2 +- > > > > > > > > >>> test/py/tests/test_ofplatdata.py | 8 ++++---- > > > > > > > > >>> tools/binman/binman.rst | 3 +-- > > > > > > > > >>> tools/dtoc/test_fdt.py | 8 ++++---- > > > > > > > > >>> 10 files changed, 30 insertions(+), 31 deletions(-) > > > > > > > > >>> > > > > > > > > >>> diff --git a/drivers/core/ofnode.c b/drivers/core/ofnod= e.c > > > > > > > > >>> index 4d56b1a7675..5249a60639b 100644 > > > > > > > > >>> --- a/drivers/core/ofnode.c > > > > > > > > >>> +++ b/drivers/core/ofnode.c > > > > > > > > >>> @@ -1265,22 +1265,22 @@ bool ofnode_pre_reloc(ofnode no= de) > > > > > > > > >>> { > > > > > > > > >>> #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_TPL_= BUILD) > > > > > > > > >>> /* for SPL and TPL the remaining nodes after the fd= tgrep 1st pass > > > > > > > > >>> - * had property dm-pre-reloc or u-boot,dm-spl/tpl. > > > > > > > > >>> + * had property bootph-all or bootph-pre-sram/bootp= h-pre-ram. > > > > > > > > >>> * They are removed in final dtb (fdtgrep 2nd pass) > > > > > > > > >>> */ > > > > > > > > >>> return true; > > > > > > > > >>> #else > > > > > > > > >>> - if (ofnode_read_bool(node, "u-boot,dm-pre-reloc")) > > > > > > > > >>> + if (ofnode_read_bool(node, "bootph-all")) > > > > > > > > >>> return true; > > > > > > > > >>> - if (ofnode_read_bool(node, "u-boot,dm-pre-proper")) > > > > > > > > >>> + if (ofnode_read_bool(node, "bootph-some-ram")) > > > > > > > > >>> return true; > > > > > > > > >>> /* > > > > > > > > >>> * In regular builds individual spl and tpl handlin= g both > > > > > > > > >>> * count as handled pre-relocation for later second= init. > > > > > > > > >>> */ > > > > > > > > >>> - if (ofnode_read_bool(node, "u-boot,dm-spl") || > > > > > > > > >>> - ofnode_read_bool(node, "u-boot,dm-tpl")) > > > > > > > > >>> + if (ofnode_read_bool(node, "bootph-pre-ram") || > > > > > > > > >>> + ofnode_read_bool(node, "bootph-pre-sram")) > > > > > > > > >>> return true; > > > > > > > > >> > > > > > > > > >> Please correct me if I am wrong but this change will lik= ely break all boards > > > > > > > > >> which didn't migrate to this at this stage. And because = targeting early > > > > > > > > >> stages people will be without console. > > > > > > > > >> I think we should have transition period for 1-2 release= s to give people > > > > > > > > >> enough time to migrate. It means print big warning that = they have to migrate > > > > > > > > >> their DTS. > > > > > > > > > > > > > > > > > > What's the migration case here we're missing? Is it platf= orms that > > > > > > > > > maintain a dts externally, via tooling / etc, that popula= te those nodes? > > > > > > > > > > > > > > > > Yes and I expect there will be a lot of DTs around with som= e changes for > > > > > > > > specific products. > > > > > > > > > > > > > > > > Also for example QEMU is also generating DT based on it's c= onfiguration and > > > > > > > > provide it to U-Boot. > > > > > > > > https://gitlab.com/qemu-project/qemu/-/blob/master/hw/arm/x= lnx-versal-virt.c#L91 > > > > > > > > When this patch is applied CI loop should fail for Versal. > > > > > > > > > > > > > > I am not sure how it helps us to drag this out. It is a break= ing > > > > > > > change, but a drawn-out process is just going to create a lot= of > > > > > > > confusion. People should be free to use the schema in Linux .= dts files > > > > > > > from now on, but if it is not immediately supported in U-Boot= then > > > > > > > they cannot. This is the most important point, after all. > > > > > > > > > > > > Now that we've had some of the external migration issues laid o= ut, what > > > > > > would it look like to have some sort of backwards compatible ho= ok here > > > > > > to fixup an older tree we've been passed? > > > > > > > > > > We can't do it for SPL, since the processing happens at built tim= e, > > > > > but for U-Boot proper we can do something like what Michal sugges= ts, > > > > > although perhaps with a warning rather than an error. Likely the > > > > > warning would have to be displayed later (if/when U-Boot starts u= p) > > > > > since the console may be one of the problem nodes. > > > > > > > > Right, if it's a build time thing, we should be able to ... somethi= ng. > > > > Maybe a detect and rename for now, detect and fail in a bit. But > > > > > > But we only have this problem with out-of-tree .dts files, so I'm not > > > sure what you are suggesting here. > > > > I'm suggesting that you add the logic to detect these cases and deal > > with it. We aren't talking about stuff that should have been upstreamed > > but wasn't, we're talking about tooling that generates valid dts files > > and needs time to update. >=20 > For runtime I think we can do something like what Michal suggested, > but more permissive. We can warn about it when U-Boot has started up. > There is no point in doing anything like that in the SPL phase as it > is too late. >=20 > But we can also add a build-time check, as you say. I think you are > saying that it should work correctly in that case, rather than just > fail? That is easy enough for U-Boot proper I think. For SPL I am not > sure. >=20 > I will take a look. For build time, if we're passed the old form, we should be able to detect it, and regex the input to be correct. And not for forever, but to give external (and yes, valid use case here!) tools time to catch up. --=20 Tom --nQZnqPKE7R0pcr6Z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPi/XIACgkQFHw5/5Y0 tyxtiQwAlCkBql3C3NWxJ8IZAguEQhw6YafTViBmv5X1ebZRSj1oVpU5QCUR5hX5 TTNLj8gOWE9fR2//9s6Bx/zrax03Sqrl8AMSb8ChW2kxqvdNlRdmyy9H85n7KYNG 5hZF9Gjw9uDdCX9TvY8MvKObpCmYr5kPpXnslRea5xVC0Z1ifrMGIJPqtBvS6Dvm XkVjpYu8/thPzPSeS/SkNqGzNLmkXwf+GtTRxZpZkJ1nwm9YfDHTBfdsFoNMvQO5 XDQSfnebrxY7aovU+Qa9Q8Q0A6F+6CWkXMgoEKCt8PD1XDSfswQ/C6YSKXlnd9BY 2HkolYQsiPA03EpICQN6wTjBhKK7q+xg+rdK+oRYqykMeyV/GfixKrU3CSrUPWA5 xDDW4c7YsXQ0suPO1B32oBz5QUsDDOQ9WIhHzOHpzr5Cg8cUg+9csR5M89WCsqtI u7tTDVeAPsEbBOlZfvJ5wTMYQpmCU+wLwRXrDY5xiyivtjEiNu/YBd21LyhRJMhD vy8HD7iu =vsEE -----END PGP SIGNATURE----- --nQZnqPKE7R0pcr6Z--