All of lore.kernel.org
 help / color / mirror / Atom feed
From: quentin.schulz@theobroma-systems.com
To: Tom Rini <trini@konsulko.com>, Marek Vasut <marex@denx.de>,
	Quentin Schulz <foss+uboot@0leil.net>,
	sjg@chromium.org, u-boot@lists.denx.de
Subject: Re: [PATCH] dm: automatically set DM_FLAG_PRE_RELOC based on device-tree property
Date: Thu, 29 Sep 2022 17:23:15 +0200	[thread overview]
Message-ID: <1bade208-ab76-01af-61e3-c2307c4b27cb@theobroma-systems.com> (raw)
In-Reply-To: <20220929143421.GB3044094@bill-the-cat>

Hi Tom,

On 9/29/22 4:34 PM, Tom Rini <trini@konsulko.com> wrote:
> On Thu, Sep 22, 2022 at 03:53:46PM +0200, Marek Vasut wrote:
> > On 9/22/22 15:45, Quentin Schulz wrote:
> >> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> >>
> >> One needs to set u-boot,dm-pre-reloc in a device Device Tree node so
> >> that it is kept in SPL/TPL variant of the device tree. However, a device
> >> is automatically probed only if it's flagged with DM_FLAG_PRE_RELOC,
> >> regardless of u-boot,dm-pre-reloc DT property presence. This flag is
> >> currently only set by drivers directly.
> >>
> >> However, this flag should be allowed to be set on a per-device basis
> >> even if the driver does not hardcode it so that the device will be
> >> probed in SPL/TPL regardless of the driver's defaults.
> >>
> >> This sets the DM_FLAG_PRE_RELOC for all U_BOOT_CLASS devices whose DT
> >> node contains the u-boot,dm-pre-reloc property.
> >>
> >> Cc: Quentin Schulz <foss+uboot@0leil.net>
> >> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
> >> ---
> >>    drivers/core/lists.c | 3 +++
> >>    1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/core/lists.c b/drivers/core/lists.c
> >> index c49695b24f..86b75ffede 100644
> >> --- a/drivers/core/lists.c
> >> +++ b/drivers/core/lists.c
> >> @@ -260,6 +260,9 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
> >>    				ret);
> >>    			return log_msg_ret("bind", ret);
> >>    		} else {
> >> +			if (ofnode_pre_reloc(node))
> >> +				dev_or_flags(dev, DM_FLAG_PRE_RELOC);
> >> +
> >>    			found = true;
> >>    			if (devp)
> >>    				*devp = dev;
> >
> > Reviewed-by: Marek Vasut <marex@denx.de>
> >
> > Tom, this does look like a bugfix for this release, but it would be good to
> > have Simon look over this too.
> 
> Cycling back here, I would like to hear what Simon thinks here.
> 

This patch is superseded by https://lore.kernel.org/u-boot/20220922155326.3293815-1-foss+uboot@0leil.net/, please abandon it.

Cheers,
Quentin

  reply	other threads:[~2022-09-29 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 13:45 [PATCH] dm: automatically set DM_FLAG_PRE_RELOC based on device-tree property Quentin Schulz
2022-09-22 13:53 ` Marek Vasut
2022-09-29 14:34   ` Tom Rini
2022-09-29 15:23     ` quentin.schulz [this message]
2022-09-29 15:24       ` Tom Rini
2022-09-22 15:55 ` Quentin Schulz

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=1bade208-ab76-01af-61e3-c2307c4b27cb@theobroma-systems.com \
    --to=quentin.schulz@theobroma-systems.com \
    --cc=foss+uboot@0leil.net \
    --cc=marex@denx.de \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.