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 8CAD3C433FE for ; Thu, 29 Sep 2022 15:24:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 65F1984963; Thu, 29 Sep 2022 17:24:48 +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="dwuSfOMk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 439E684BE8; Thu, 29 Sep 2022 17:24:46 +0200 (CEST) Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) (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 D3AD484963 for ; Thu, 29 Sep 2022 17:24:30 +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-x72a.google.com with SMTP id y2so1033745qkl.11 for ; Thu, 29 Sep 2022 08:24:30 -0700 (PDT) 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; bh=pZSsGX5CEEwXeRFWjrmoHNKPhCDqPPl4X5465GgFPBo=; b=dwuSfOMkIu+d6xymRCkkocVK3dQBNSmBwmM7/BTQDZSaidSy3hUi/rEKX0K0XpiCYD E93vY+t9Tt4csnswFa/3ngvSFsr036FBp/8yxMxtfpC3FwRa1U/ktSuHxhTlkClM0d9Y 20GzLhdpkETHZaZtmGS5iYT2VR6we2QWOY1xU= 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; bh=pZSsGX5CEEwXeRFWjrmoHNKPhCDqPPl4X5465GgFPBo=; b=nk3O+paXTmwodlzIGLX5hXFHRPhT32czVlJEptQKuk39Xm4J76vbFFJlBRtw0/U/GP pFqKwIf2JaEJWS+TVtFPrGIDcH7M8MvmFoecaVW2hjOY9pfGsYb1Oiq0v8nDegso7gGE QRieJVFc3h+W3IX0xqPw94hbMFePNEOJhBGFNnHgV6vWknuxoiL1/pDhWtZA55hGxCe7 MoDuYvJnSB1Odjnc1w1HK8i7Plxga2rKoDsGFdqZrE4LatCuAfMb7DQj9j4rhEL14+fw 4300P7O8pSwiywGW4jd4mIAI/5uEHrFdymVPjcZAke+M9/s2IUdrdcrWP+HYp0yk/X3h 3mXQ== X-Gm-Message-State: ACrzQf0QLfBkEdO2HQp1qLiSU/X6JdZ+VaGElzxH9twZ/+/RKVzekkkM gcIT6jKdA7r9d/KzUwpuVW6HPA== X-Google-Smtp-Source: AMsMyM5ZeA0MQR0c/WuoGmPL2zuoByZ28VslAlPsNuEmpWuP+jP7UJkw+Vexr43izQg2/CMIm+/8aw== X-Received: by 2002:a05:620a:4146:b0:6cf:837e:54a5 with SMTP id k6-20020a05620a414600b006cf837e54a5mr2656706qko.668.1664465069494; Thu, 29 Sep 2022 08:24:29 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-0186-ea3a-a82b-3964.res6.spectrum.com. [2603:6081:7b00:6400:186:ea3a:a82b:3964]) by smtp.gmail.com with ESMTPSA id u4-20020a05622a010400b00342e86b3bdasm6267455qtw.12.2022.09.29.08.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Sep 2022 08:24:29 -0700 (PDT) Date: Thu, 29 Sep 2022 11:24:27 -0400 From: Tom Rini To: quentin.schulz@theobroma-systems.com Cc: Marek Vasut , Quentin Schulz , sjg@chromium.org, u-boot@lists.denx.de Subject: Re: [PATCH] dm: automatically set DM_FLAG_PRE_RELOC based on device-tree property Message-ID: <20220929152427.GE3044094@bill-the-cat> References: <20220922134540.3268586-1-foss+uboot@0leil.net> <543fc751-a422-b78e-90ef-386b8c6b3a03@denx.de> <20220929143421.GB3044094@bill-the-cat> <1bade208-ab76-01af-61e3-c2307c4b27cb@theobroma-systems.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qojgPxTeg8qiMNPS" Content-Disposition: inline In-Reply-To: <1bade208-ab76-01af-61e3-c2307c4b27cb@theobroma-systems.com> 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 --qojgPxTeg8qiMNPS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 29, 2022 at 05:23:15PM +0200, quentin.schulz@theobroma-systems.= com wrote: > Hi Tom, >=20 > On 9/29/22 4:34 PM, Tom Rini 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 > > >> > > >> 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 de= vice > > >> 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 > > >> Signed-off-by: Quentin Schulz > > >> --- > > >> 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, ofnod= e 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 =3D true; > > >> if (devp) > > >> *devp =3D dev; > > > > > > Reviewed-by: Marek Vasut > > > > > > Tom, this does look like a bugfix for this release, but it would be g= ood to > > > have Simon look over this too. > >=20 > > Cycling back here, I would like to hear what Simon thinks here. > >=20 >=20 > This patch is superseded by https://lore.kernel.org/u-boot/20220922155326= =2E3293815-1-foss+uboot@0leil.net/, please abandon it. Done, thanks! --=20 Tom --qojgPxTeg8qiMNPS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmM1uKsACgkQFHw5/5Y0 tyw7Rwv8C1de9HVqiU4EW5tgVfZCne7u9QlizPkm3Gn+VpQK/CALV05yaGPZ4i2P NXrnBnpKZI4fvAC6GdH78tPYbexyIMmV/lM87kQyQYS/WFYMB1PCScszZEG1wHBg FvpZQLoWdAlUmjgcAYrCGvu/RQHLp1zMxcnlbOsfMIHuo69z8b9HkbTogQT1UfY8 PAAYLfD4ThKIC2+/PgJTVbYngahG8E3OC80E2XCEticyPDYaDzSX+p2OZx8YDFNh amuE1jKihN0tiDW7h004o9tYmki1hKzMVqA+1XPCDnJilp/ZGqCY4FSUvesScsZb z/8lA/ym9Ax+zJklLz0EN+cJMRUfbj4Jx7fvl1nrCROOly0PFPE6KX1519DEN8oz KOGVNHjomWzBTzjoXK8x3o5Z89hazDUpH9UEeKgHbC7OdP8oCDzu2JQOEQ19fDLA t6CEOUF0o7wBA6H2SIm5D5/0XeOOomFbZ0EOikv47Ehldg9K1jQBpywMLIMHnnwy YVNcOSrj =/V1b -----END PGP SIGNATURE----- --qojgPxTeg8qiMNPS--