diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-13 06:32:07 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-13 06:32:07 -0400 |
commit | 796204142a98b6e0e71b494e808d1b6ee62cc75f (patch) | |
tree | f23c361d73b53633ee3106f6f68927d5550289df /arch/arm/mach-shmobile | |
parent | 5125bbf3880755419eff68672623cde49c4f31e8 (diff) |
ARM / shmobile: Use pm_genpd_poweroff_unused()
Make shmobile use pm_genpd_poweroff_unused() instead of the
open-coded powering off PM domains without devices in use.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pm-sh7372.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pm_runtime.c | 6 |
3 files changed, 2 insertions, 18 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 73a76d75ccbc..06aecb31d9c7 100644 --- a/arch/arm/mach-shmobile/include/mach/common.h +++ b/arch/arm/mach-shmobile/include/mach/common.h | |||
@@ -12,7 +12,6 @@ extern struct platform_suspend_ops shmobile_suspend_ops; | |||
12 | struct cpuidle_device; | 12 | struct cpuidle_device; |
13 | extern void (*shmobile_cpuidle_modes[])(void); | 13 | extern void (*shmobile_cpuidle_modes[])(void); |
14 | extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev); | 14 | extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev); |
15 | extern void (*shmobile_runtime_pm_late_init)(void); | ||
16 | 15 | ||
17 | extern void sh7367_init_irq(void); | 16 | extern void sh7367_init_irq(void); |
18 | extern void sh7367_add_early_devices(void); | 17 | extern void sh7367_add_early_devices(void); |
diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c index 71400eae2b68..f47281a57d43 100644 --- a/arch/arm/mach-shmobile/pm-sh7372.c +++ b/arch/arm/mach-shmobile/pm-sh7372.c | |||
@@ -126,17 +126,6 @@ static bool pd_active_wakeup(struct device *dev) | |||
126 | return true; | 126 | return true; |
127 | } | 127 | } |
128 | 128 | ||
129 | static void sh7372_late_pm_domain_off(void) | ||
130 | { | ||
131 | /* request power down of unused pm domains */ | ||
132 | queue_work(pm_wq, &sh7372_a4lc.genpd.power_off_work); | ||
133 | queue_work(pm_wq, &sh7372_a4mp.genpd.power_off_work); | ||
134 | queue_work(pm_wq, &sh7372_d4.genpd.power_off_work); | ||
135 | queue_work(pm_wq, &sh7372_a3rv.genpd.power_off_work); | ||
136 | queue_work(pm_wq, &sh7372_a3ri.genpd.power_off_work); | ||
137 | queue_work(pm_wq, &sh7372_a3sg.genpd.power_off_work); | ||
138 | } | ||
139 | |||
140 | void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) | 129 | void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) |
141 | { | 130 | { |
142 | struct generic_pm_domain *genpd = &sh7372_pd->genpd; | 131 | struct generic_pm_domain *genpd = &sh7372_pd->genpd; |
@@ -157,8 +146,6 @@ void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) | |||
157 | genpd->power_on = pd_power_up; | 146 | genpd->power_on = pd_power_up; |
158 | } | 147 | } |
159 | genpd->power_on(&sh7372_pd->genpd); | 148 | genpd->power_on(&sh7372_pd->genpd); |
160 | |||
161 | shmobile_runtime_pm_late_init = sh7372_late_pm_domain_off; | ||
162 | } | 149 | } |
163 | 150 | ||
164 | void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, | 151 | void sh7372_add_device_to_domain(struct sh7372_pm_domain *sh7372_pd, |
diff --git a/arch/arm/mach-shmobile/pm_runtime.c b/arch/arm/mach-shmobile/pm_runtime.c index 2f6ded5712ee..6ec454e1e063 100644 --- a/arch/arm/mach-shmobile/pm_runtime.c +++ b/arch/arm/mach-shmobile/pm_runtime.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/pm_runtime.h> | 16 | #include <linux/pm_runtime.h> |
17 | #include <linux/pm_domain.h> | ||
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/clk.h> | 19 | #include <linux/clk.h> |
19 | #include <linux/sh_clk.h> | 20 | #include <linux/sh_clk.h> |
@@ -57,12 +58,9 @@ static int __init sh_pm_runtime_init(void) | |||
57 | } | 58 | } |
58 | core_initcall(sh_pm_runtime_init); | 59 | core_initcall(sh_pm_runtime_init); |
59 | 60 | ||
60 | void (*shmobile_runtime_pm_late_init)(void); | ||
61 | |||
62 | static int __init sh_pm_runtime_late_init(void) | 61 | static int __init sh_pm_runtime_late_init(void) |
63 | { | 62 | { |
64 | if (shmobile_runtime_pm_late_init) | 63 | pm_genpd_poweroff_unused(); |
65 | shmobile_runtime_pm_late_init(); | ||
66 | return 0; | 64 | return 0; |
67 | } | 65 | } |
68 | late_initcall(sh_pm_runtime_late_init); | 66 | late_initcall(sh_pm_runtime_late_init); |