All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] dm: pinctrl: fix for introduce PINCONF_RECURSIVE option
@ 2019-10-21 13:02 Patrick Delaunay
  2019-10-21 17:26 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Delaunay @ 2019-10-21 13:02 UTC (permalink / raw)
  To: u-boot

Correct the name of the define used CONFIG_IS_ENABLED which is
not aligned with Kconfig name: CONFIG_$(SPL_)PINCONF_RECURSIVE.

The recursive calls is conditional only for UCLASS_PINCONFIG
"pinconfig" driver.
It is always needed to call pinctrl_post_bind for UCLASS_PINCTRL
"pinctrl", the test CONFIG_IS_ENABLED(PINCONF_RECURSIVE) need to
be removed for this driver.

This correct a regression introduced because the same patch is
applied twice times in u-boot-dm branch:
- commit e878b53a79d1 ("dm: pinctrl: introduce PINCONF_RECURSIVE
  option")
- commit c20851b3d850 ("dm: pinctrl: introduce PINCONF_RECURSIVE
  option")

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
Hi,

This patch solve regression on stm32mp157c-ev1 board (boot failed)
on master branch since Merge tag 'dm-pull-15oct19' of
https://gitlab.denx.de/u-boot/custodians/u-boot-dm

The V1 patch was a partial solution, it solve the first issue
detected on sandbox.

Regards

Patrick

Changes in v2:
- update a second error after tests: don't remove post bind ops for
  pinctrl driver.

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

diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 0b1eb7fab4..761ee29f41 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -157,7 +157,7 @@ static int pinconfig_post_bind(struct udevice *dev)
 
 UCLASS_DRIVER(pinconfig) = {
 	.id = UCLASS_PINCONFIG,
-#if CONFIG_IS_ENABLED(PINCONFIG_RECURSIVE)
+#if CONFIG_IS_ENABLED(PINCONF_RECURSIVE)
 	.post_bind = pinconfig_post_bind,
 #endif
 	.name = "pinconfig",
@@ -426,9 +426,7 @@ static int __maybe_unused pinctrl_post_bind(struct udevice *dev)
 
 UCLASS_DRIVER(pinctrl) = {
 	.id = UCLASS_PINCTRL,
-#if CONFIG_IS_ENABLED(PINCONF_RECURSIVE)
 	.post_bind = pinctrl_post_bind,
-#endif
 	.flags = DM_UC_FLAG_SEQ_ALIAS,
 	.name = "pinctrl",
 };
-- 
2.17.1

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

* [U-Boot] [PATCH v2] dm: pinctrl: fix for introduce PINCONF_RECURSIVE option
  2019-10-21 13:02 [U-Boot] [PATCH v2] dm: pinctrl: fix for introduce PINCONF_RECURSIVE option Patrick Delaunay
@ 2019-10-21 17:26 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2019-10-21 17:26 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 21, 2019 at 03:02:40PM +0200, Patrick Delaunay wrote:

> Correct the name of the define used CONFIG_IS_ENABLED which is
> not aligned with Kconfig name: CONFIG_$(SPL_)PINCONF_RECURSIVE.
> 
> The recursive calls is conditional only for UCLASS_PINCONFIG
> "pinconfig" driver.
> It is always needed to call pinctrl_post_bind for UCLASS_PINCTRL
> "pinctrl", the test CONFIG_IS_ENABLED(PINCONF_RECURSIVE) need to
> be removed for this driver.
> 
> This correct a regression introduced because the same patch is
> applied twice times in u-boot-dm branch:
> - commit e878b53a79d1 ("dm: pinctrl: introduce PINCONF_RECURSIVE
>   option")
> - commit c20851b3d850 ("dm: pinctrl: introduce PINCONF_RECURSIVE
>   option")
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Applied to u-boot/master, thanks!

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

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

end of thread, other threads:[~2019-10-21 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21 13:02 [U-Boot] [PATCH v2] dm: pinctrl: fix for introduce PINCONF_RECURSIVE option Patrick Delaunay
2019-10-21 17:26 ` 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.