public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] dm: pinctrl: Prevent (re-)configuring pins when already done before relocation
@ 2018-12-18 11:30 Lukasz Majewski
  2018-12-27 15:47 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Lukasz Majewski @ 2018-12-18 11:30 UTC (permalink / raw)
  To: u-boot

This commit prevents from re-configuring pins if those were configured
before relocation.

Some pins - like UART or DDR must be setup before relocation
(as they have 'u-boot,dm-pre-reloc' property set in DTS). Without this
change, those pins are re-configured after relocation (pre_reloc_only = 0,
so we do not "continue").
Such behavior may be a problem for DDR PAD configuration, as they might
be already leveled/tuned with original setup).

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 6db0445067..29c910c55f 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] 9+ messages in thread

end of thread, other threads:[~2019-01-16 21:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-18 11:30 [U-Boot] [PATCH] dm: pinctrl: Prevent (re-)configuring pins when already done before relocation Lukasz Majewski
2018-12-27 15:47 ` [U-Boot] " Tom Rini
2019-01-08 17:49   ` Alex Kiernan
2019-01-08 22:52     ` Lukasz Majewski
2019-01-08 23:13       ` Alex Kiernan
2019-01-08 23:24         ` Lukasz Majewski
2019-01-12  9:30           ` Alex Kiernan
2019-01-12 21:45             ` Lukasz Majewski
2019-01-16 21:35               ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox