diff options
-rw-r--r-- | arch/arm/mach-shmobile/pm-sh7372.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 78c98a847433..1ec35ebe2376 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -107,9 +107,8 @@ static int pd_power_down(struct generic_pm_domain *genpd) | |||
107 | return 0; | 107 | return 0; |
108 | } | 108 | } |
109 | 109 | ||
110 | static int pd_power_up(struct generic_pm_domain *genpd) | 110 | static int __pd_power_up(struct sh7372_pm_domain *sh7372_pd, bool do_resume) |
111 | { | 111 | { |
112 | struct sh7372_pm_domain *sh7372_pd = to_sh7372_pd(genpd); | ||
113 | unsigned int mask = 1 << sh7372_pd->bit_shift; | 112 | unsigned int mask = 1 << sh7372_pd->bit_shift; |
114 | unsigned int retry_count; | 113 | unsigned int retry_count; |
115 | int ret = 0; | 114 | int ret = 0; |
@@ -138,12 +137,17 @@ static int pd_power_up(struct generic_pm_domain *genpd) | |||
138 | mask, __raw_readl(PSTR)); | 137 | mask, __raw_readl(PSTR)); |
139 | 138 | ||
140 | out: | 139 | out: |
141 | if (ret == 0 && sh7372_pd->resume) | 140 | if (ret == 0 && sh7372_pd->resume && do_resume) |
142 | sh7372_pd->resume(); | 141 | sh7372_pd->resume(); |
143 | 142 | ||
144 | return ret; | 143 | return ret; |
145 | } | 144 | } |
146 | 145 | ||
146 | static int pd_power_up(struct generic_pm_domain *genpd) | ||
147 | { | ||
148 | return __pd_power_up(to_sh7372_pd(genpd), true); | ||
149 | } | ||
150 | |||
147 | static void sh7372_a4r_suspend(void) | 151 | static void sh7372_a4r_suspend(void) |
148 | { | 152 | { |
149 | sh7372_intcs_suspend(); | 153 | sh7372_intcs_suspend(); |
@@ -175,7 +179,7 @@ void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) | |||
175 | genpd->active_wakeup = pd_active_wakeup; | 179 | genpd->active_wakeup = pd_active_wakeup; |
176 | genpd->power_off = pd_power_down; | 180 | genpd->power_off = pd_power_down; |
177 | genpd->power_on = pd_power_up; | 181 | genpd->power_on = pd_power_up; |
178 | genpd->power_on(&sh7372_pd->genpd); | 182 | __pd_power_up(sh7372_pd, false); |
179 | } | 183 | } |
180 | 184 | ||
181 | void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, | 185 | void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, |