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 <msucha...@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

Reply via email to