From: Simon Glass <sjg@chromium.org>
To: Tom Rini <trini@konsulko.com>
Cc: Michal Simek <michal.simek@amd.com>,
u-boot@lists.denx.de,
U-Boot Custodians <u-boot-custodians@lists.denx.de>
Subject: Re: [PATCH v3 6/8] dm: treewide: Complete migration to new driver model schema
Date: Tue, 7 Feb 2023 14:43:49 -0700 [thread overview]
Message-ID: <CAPnjgZ0qr8pf8r5kmYKJET1b=_Yp0WE6Lfxnc2UpTOemTzr+5g@mail.gmail.com> (raw)
In-Reply-To: <Y+K9YbpfG3KMhIl9@bill-the-cat>
Hi Tom,
On Tue, 7 Feb 2023 at 14:06, Tom Rini <trini@konsulko.com> 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 <michal.simek@amd.com> wrote:
> > >
> > >
> > >
> > > On 2/6/23 15:44, Tom Rini wrote:
> > > > On Mon, Feb 06, 2023 at 01:22:48PM +0100, Michal Simek wrote:
> > > >> 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 <sjg@chromium.org>
> > > >>> ---
> > > >>>
> > > >>> (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/ofnode.c
> > > >>> index 4d56b1a7675..5249a60639b 100644
> > > >>> --- a/drivers/core/ofnode.c
> > > >>> +++ b/drivers/core/ofnode.c
> > > >>> @@ -1265,22 +1265,22 @@ bool ofnode_pre_reloc(ofnode node)
> > > >>> {
> > > >>> #if defined(CONFIG_SPL_BUILD) || defined(CONFIG_TPL_BUILD)
> > > >>> /* for SPL and TPL the remaining nodes after the fdtgrep 1st pass
> > > >>> - * had property dm-pre-reloc or u-boot,dm-spl/tpl.
> > > >>> + * had property bootph-all or bootph-pre-sram/bootph-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 handling 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 likely 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 releases 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 platforms that
> > > > maintain a dts externally, via tooling / etc, that populate those nodes?
> > >
> > > Yes and I expect there will be a lot of DTs around with some changes for
> > > specific products.
> > >
> > > Also for example QEMU is also generating DT based on it's configuration and
> > > provide it to U-Boot.
> > > https://gitlab.com/qemu-project/qemu/-/blob/master/hw/arm/xlnx-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 breaking
> > 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 out, what
> would it look like to have some sort of backwards compatible hook here
> to fixup an older tree we've been passed?
We can't do it for SPL, since the processing happens at built time,
but for U-Boot proper we can do something like what Michal suggests,
although perhaps with a warning rather than an error. Likely the
warning would have to be displayed later (if/when U-Boot starts up)
since the console may be one of the problem nodes.
Regards,
Simon
next prev parent reply other threads:[~2023-02-07 21:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-01 22:54 [PATCH v3 0/8] dm: Move to new driver model schema for device tree tags Simon Glass
2023-02-01 22:54 ` [PATCH v3 1/8] schemas: Add schema for U-Boot driver model 'phase tags' Simon Glass
2023-02-01 22:54 ` [PATCH v3 2/8] dm: dts: Convert driver model tags to use new schema Simon Glass
2023-02-01 22:54 ` [PATCH v3 3/8] dm: doc: Update device tree binding docs for " Simon Glass
2023-02-01 22:54 ` [PATCH v3 4/8] dm: doc: Update documentation for new driver model schema Simon Glass
2023-02-02 0:30 ` Heinrich Schuchardt
2023-02-02 2:25 ` Simon Glass
2023-02-01 22:54 ` [PATCH v3 5/8] dm: doc: Move to " Simon Glass
2023-02-01 22:54 ` [PATCH v3 6/8] dm: treewide: Complete migration " Simon Glass
2023-02-06 12:22 ` Michal Simek
2023-02-06 14:44 ` Tom Rini
2023-02-06 14:56 ` Michal Simek
2023-02-06 17:12 ` Simon Glass
2023-02-07 13:13 ` Michal Simek
2023-02-07 13:38 ` Simon Glass
2023-02-07 15:20 ` Michal Simek
2023-02-07 15:35 ` Peter Maydell
2023-02-07 18:39 ` Simon Glass
2023-02-07 21:06 ` Tom Rini
2023-02-07 21:43 ` Simon Glass [this message]
2023-02-07 21:46 ` Tom Rini
2023-02-07 22:25 ` Simon Glass
2023-02-08 0:15 ` Tom Rini
2023-02-08 1:32 ` Simon Glass
2023-02-08 1:40 ` Tom Rini
2023-02-10 16:05 ` Simon Glass
2023-02-01 22:54 ` [PATCH v3 7/8] checkpatch: Add a warning for pre-schema driver model tags Simon Glass
2023-02-01 22:54 ` [PATCH v3 8/8] CI: Add a check " Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPnjgZ0qr8pf8r5kmYKJET1b=_Yp0WE6Lfxnc2UpTOemTzr+5g@mail.gmail.com' \
--to=sjg@chromium.org \
--cc=michal.simek@amd.com \
--cc=trini@konsulko.com \
--cc=u-boot-custodians@lists.denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).