From patchwork Sun Jul 10 20:47:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 962622 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6AKlqGD011006 for ; Sun, 10 Jul 2011 20:47:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756641Ab1GJUrc (ORCPT ); Sun, 10 Jul 2011 16:47:32 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:43413 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756636Ab1GJUr2 (ORCPT ); Sun, 10 Jul 2011 16:47:28 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 934981B4EDD; Sun, 10 Jul 2011 22:20:31 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09816-05; Sun, 10 Jul 2011 22:20:08 +0200 (CEST) Received: from ferrari.rjw.lan (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 03A7F1B5006; Sun, 10 Jul 2011 22:20:08 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM mailing list Subject: [PATCH 2/2] ARM / shmobile: Use pm_genpd_poweroff_unused() Date: Sun, 10 Jul 2011 22:47:44 +0200 User-Agent: KMail/1.13.6 (Linux/3.0.0-rc6+; KDE/4.6.0; x86_64; ; ) Cc: Magnus Damm , LKML , "Linux-SH" References: <201107102246.05107.rjw@sisk.pl> In-Reply-To: <201107102246.05107.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201107102247.45034.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 10 Jul 2011 20:47:52 +0000 (UTC) From: Rafael J. Wysocki 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 --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/arch/arm/mach-shmobile/include/mach/common.h =================================================================== --- linux-2.6.orig/arch/arm/mach-shmobile/include/mach/common.h +++ linux-2.6/arch/arm/mach-shmobile/include/mach/common.h @@ -12,7 +12,6 @@ extern struct platform_suspend_ops shmob 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); Index: linux-2.6/arch/arm/mach-shmobile/pm-sh7372.c =================================================================== --- linux-2.6.orig/arch/arm/mach-shmobile/pm-sh7372.c +++ linux-2.6/arch/arm/mach-shmobile/pm-sh7372.c @@ -126,17 +126,6 @@ static bool pd_active_wakeup(struct devi 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 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, Index: linux-2.6/arch/arm/mach-shmobile/pm_runtime.c =================================================================== --- linux-2.6.orig/arch/arm/mach-shmobile/pm_runtime.c +++ linux-2.6/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(voi } 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);