From 796204142a98b6e0e71b494e808d1b6ee62cc75f Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Wed, 13 Jul 2011 12:32:07 +0200 Subject: 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 Acked-by: Magnus Damm --- arch/arm/mach-shmobile/include/mach/common.h | 1 - arch/arm/mach-shmobile/pm-sh7372.c | 13 ------------- arch/arm/mach-shmobile/pm_runtime.c | 6 ++---- 3 files changed, 2 insertions(+), 18 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h index 73a76d75ccb..06aecb31d9c 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; struct cpuidle_device; extern void (*shmobile_cpuidle_modes[])(void); extern void (*shmobile_cpuidle_setup)(struct cpuidle_device *dev); -extern void (*shmobile_runtime_pm_late_init)(void); extern void sh7367_init_irq(void); 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 71400eae2b6..f47281a57d4 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) return true; } -static void sh7372_late_pm_domain_off(void) -{ - /* request power down of unused pm domains */ - queue_work(pm_wq, &sh7372_a4lc.genpd.power_off_work); - queue_work(pm_wq, &sh7372_a4mp.genpd.power_off_work); - queue_work(pm_wq, &sh7372_d4.genpd.power_off_work); - queue_work(pm_wq, &sh7372_a3rv.genpd.power_off_work); - queue_work(pm_wq, &sh7372_a3ri.genpd.power_off_work); - queue_work(pm_wq, &sh7372_a3sg.genpd.power_off_work); -} - void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) { struct generic_pm_domain *genpd = &sh7372_pd->genpd; @@ -157,8 +146,6 @@ void sh7372_init_pm_domain(struct sh7372_pm_domain *sh7372_pd) genpd->power_on = pd_power_up; } genpd->power_on(&sh7372_pd->genpd); - - shmobile_runtime_pm_late_init = sh7372_late_pm_domain_off; } 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 2f6ded5712e..6ec454e1e06 100644 --- a/arch/arm/mach-shmobile/pm_runtime.c +++ b/arch/arm/mach-shmobile/pm_runtime.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -57,12 +58,9 @@ static int __init sh_pm_runtime_init(void) } core_initcall(sh_pm_runtime_init); -void (*shmobile_runtime_pm_late_init)(void); - static int __init sh_pm_runtime_late_init(void) { - if (shmobile_runtime_pm_late_init) - shmobile_runtime_pm_late_init(); + pm_genpd_poweroff_unused(); return 0; } late_initcall(sh_pm_runtime_late_init); -- cgit v1.2.3