diff options
author | Lukasz Majewski <lukma@denx.de> | 2018-12-18 12:30:50 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-26 21:21:07 -0500 |
commit | a7f4b4b344396590845e6552c82829ef68ef9f89 (patch) | |
tree | 4fdf691e0f332c17ff2bd22e7e6f2bf9a43e8046 | |
parent | a1702746dfd985f69c1c32ae9618f066443e43a9 (diff) |
dm: pinctrl: Prevent (re-)configuring pins when already done before relocation
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>
-rw-r--r-- | drivers/pinctrl/pinctrl-uclass.c | 4 |
1 files 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. |