Skip to content

Commit

Permalink
ARM / shmobile: Return -EBUSY from A4LC power off if A3RV is active
Browse files Browse the repository at this point in the history
Since the A4LC should only be powered off if the A3RV is off, make
the A4LC's power down routine return -EBUSY if A3RV is not off to
indicate to the core that it doesn't want to power off the domain in
that case.  This will cause the core to regard A4LC as active, so
the pm_genpd_poweron() in pd_power_down_a3rv() is not necessary any
more.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
  • Loading branch information
Rafael J. Wysocki committed Jul 14, 2011
1 parent d280540 commit 5ca8081
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/arm/mach-shmobile/pm-sh7372.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ static int pd_power_down_a3rv(struct generic_pm_domain *genpd)
int ret = pd_power_down(genpd);

/* try to power down A4LC after A3RV is requested off */
pm_genpd_poweron(&sh7372_a4lc.genpd);
genpd_queue_power_off_work(&sh7372_a4lc.genpd);

return ret;
Expand All @@ -118,7 +117,7 @@ static int pd_power_down_a4lc(struct generic_pm_domain *genpd)
if (!(__raw_readl(PSTR) & (1 << sh7372_a3rv.bit_shift)))
return pd_power_down(genpd);

return 0;
return -EBUSY;
}

static bool pd_active_wakeup(struct device *dev)
Expand Down

0 comments on commit 5ca8081

Please sign in to comment.