All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"
@ 2019-01-09 22:05 Lukasz Majewski
  2019-01-10 12:57 ` Simon Glass
  2019-01-12 20:13 ` [U-Boot] " Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Lukasz Majewski @ 2019-01-09 22:05 UTC (permalink / raw)
  To: u-boot

This reverts commit a7f4b4b344396590845e6552c82829ef68ef9f89.

As reported by Alex Kiernan the above optimization introduces a
regression in the below use case where:

1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node)

2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux
pins are NOT probed/configured in MLO/SPL).

3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case
the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't
configure pins (as it thinks that those were initialized in MLO/SPL).

As we are very close to release - please revert this commit.

Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Lukasz Majewski <lukma@denx.de>

---

 drivers/pinctrl/pinctrl-uclass.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 29c910c55f..6db0445067 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -117,9 +117,9 @@ static int pinconfig_post_bind(struct udevice *dev)
 	int ret;
 
 	dev_for_each_subnode(node, dev) {
-		if (pre_reloc_only ^ ofnode_pre_reloc(node))
+		if (pre_reloc_only &&
+		    !ofnode_pre_reloc(node))
 			continue;
-
 		/*
 		 * If this node has "compatible" property, this is not
 		 * a pin configuration node, but a normal device. skip.
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"
  2019-01-09 22:05 [U-Boot] [PATCH] Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation" Lukasz Majewski
@ 2019-01-10 12:57 ` Simon Glass
  2019-01-12 20:13 ` [U-Boot] " Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2019-01-10 12:57 UTC (permalink / raw)
  To: u-boot

On Wed, 9 Jan 2019 at 15:05, Lukasz Majewski <lukma@denx.de> wrote:
>
> This reverts commit a7f4b4b344396590845e6552c82829ef68ef9f89.
>
> As reported by Alex Kiernan the above optimization introduces a
> regression in the below use case where:
>
> 1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node)
>
> 2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux
> pins are NOT probed/configured in MLO/SPL).
>
> 3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case
> the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't
> configure pins (as it thinks that those were initialized in MLO/SPL).
>
> As we are very close to release - please revert this commit.
>
> Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
>
> ---
>
>  drivers/pinctrl/pinctrl-uclass.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation"
  2019-01-09 22:05 [U-Boot] [PATCH] Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation" Lukasz Majewski
  2019-01-10 12:57 ` Simon Glass
@ 2019-01-12 20:13 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2019-01-12 20:13 UTC (permalink / raw)
  To: u-boot

On Wed, Jan 09, 2019 at 11:05:02PM +0100, Lukasz Majewski wrote:

> This reverts commit a7f4b4b344396590845e6552c82829ef68ef9f89.
> 
> As reported by Alex Kiernan the above optimization introduces a
> regression in the below use case where:
> 
> 1. Device has defined 'u-boot,dm-spl' property (@ eMMC DTS node)
> 
> 2. The device downloads its MLO/SPL via UART (not eMMC - the eMMC pinmux
> pins are NOT probed/configured in MLO/SPL).
> 
> 3. The loaded via UART MLO/SPL wants to load Linux from eMMC. In this case
> the DM core and pinctrl uclass checks 'u-boot,dm-spl' and don't
> configure pins (as it thinks that those were initialized in MLO/SPL).
> 
> As we are very close to release - please revert this commit.
> 
> Reported-by: Alex Kiernan <alex.kiernan@gmail.com>
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190112/34a86891/attachment.sig>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-12 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-09 22:05 [U-Boot] [PATCH] Revert "dm: pinctrl: Prevent (re-)configuring pins when already done before relocation" Lukasz Majewski
2019-01-10 12:57 ` Simon Glass
2019-01-12 20:13 ` [U-Boot] " Tom Rini

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.