[PATCH] power: pmic: rk8xx: Workaround pmic failure when probed before relocation

Michal Suchanek msuchanek at suse.de
Fri Aug 5 13:32:19 CEST 2022


When the sysreset is added as child of the pmic the pmic is probed
before relocation. That probe fails, and subsequent attempts to probe
after reloaction fail as well.

As a workaround do not bind the sysreset before relocation.

Signed-off-by: Michal Suchanek <msuchanek at suse.de>
---
 drivers/power/pmic/rk8xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/pmic/rk8xx.c b/drivers/power/pmic/rk8xx.c
index a239a18674..d12263c4f2 100644
--- a/drivers/power/pmic/rk8xx.c
+++ b/drivers/power/pmic/rk8xx.c
@@ -131,7 +131,7 @@ static int rk8xx_read(struct udevice *dev, uint reg, uint8_t *buff, int len)
 
 static int rk8xx_bind(struct udevice *dev)
 {
-	if (CONFIG_IS_ENABLED(SYSRESET)) {
+	if (CONFIG_IS_ENABLED(SYSRESET) && (gd->flags & GD_FLG_RELOC)) {
 		device_bind_driver(dev, "rk8xx_sysreset",
 				   "rk8xx_sysreset", NULL);
 	}
-- 
2.37.1



More information about the U-Boot mailing list