Skip to content

Commit

Permalink
power: pmic: rk8xx: Workaround pmic failure when probed before
Browse files Browse the repository at this point in the history
relocation

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@suse.de>
  • Loading branch information
hramrach committed Aug 8, 2022
1 parent 0e37bd0 commit 4d09da1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/pmic/rk8xx.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 4d09da1

Please sign in to comment.