[PATCH] dm: core: Create ofnode stubs when OF_REAL is disabled
Tom Rini
trini at konsulko.com
Sat Dec 27 15:48:00 CET 2025
On Sat, Dec 27, 2025 at 04:44:07AM -0700, Simon Glass wrote:
> Hi,
>
> On Mon, 1 Dec 2025 at 12:49, Simon Glass <sjg at chromium.org> wrote:
> >
> > When there is no device tree there is not point in trying to find nodes,
> > etc. since they will all be null.
> >
> > Add static inlines to skip the code in that case.
> >
> > Unfortunately this makes the file a little convoluted and there are
> > two inlines for ofnode_is_enabled() and ofnode_first/next_subnode(). But
> > it seems better than the alternative.
> >
> > We could also consider splitting up the header file.
> >
> > Also add a rule in drivers/Makefile to compile ofnode.o when OF_REAL is
> > enabled but DM is not (for kontron-sl-mx6ul) and move the
> > ofnode_for_each_compatible_node/prop() macros outside the OF_REAL
> > condition, since they only use functions that have stubs.
> >
> > Co-developed-by: Claude <noreply at anthropic.com>
> > Signed-off-by: Simon Glass <simon.glass at canonical.com>
> > ---
> >
> > drivers/Makefile | 4 +
> > drivers/core/Makefile | 3 +-
> > include/dm/ofnode.h | 714 +++++++++++++++++++++++++++++++++++++-----
> > 3 files changed, 641 insertions(+), 80 deletions(-)
>
> Any thoughts on this patch, please?
I'm not sure what you're expecting for AI-developed patches after we
talked on the community call about not doing that.
That absolute briefest review I can give is that it didn't solve the
problem either, and so you didn't test it correctly.
I was just planning to ignore this, rather than get in to another long
thread with you that I suspect few people would read.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251227/359a15ab/attachment.sig>
More information about the U-Boot
mailing list