From patchwork Mon Jul 16 21:21:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1202361 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1B6323FC33 for ; Mon, 16 Jul 2012 21:31:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754221Ab2GPVaw (ORCPT ); Mon, 16 Jul 2012 17:30:52 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:43080 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754127Ab2GPV2n (ORCPT ); Mon, 16 Jul 2012 17:28:43 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id E13211D82DA; Mon, 16 Jul 2012 23:25:36 +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 04269-05; Mon, 16 Jul 2012 23:24:49 +0200 (CEST) Received: from ferrari.rjw.lan (62-121-64-87.home.aster.pl [62.121.64.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id A05051D8178; Mon, 16 Jul 2012 23:24:28 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM list Subject: [RFC][PATCH 5/14] ARM: shmobile: Use domain names when adding subdomains to power domains Date: Mon, 16 Jul 2012 23:21:56 +0200 User-Agent: KMail/1.13.6 (Linux/3.5.0-rc5+; KDE/4.6.0; x86_64; ; ) Cc: Mark Brown , LKML , Matthew Garrett , Magnus Damm , Arnd Bergmann , Grant Likely , "Linux-sh list" References: <201207032302.17805.rjw@sisk.pl> <201207052217.48086.rjw@sisk.pl> <201207162315.49073.rjw@sisk.pl> In-Reply-To: <201207162315.49073.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201207162321.57198.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 From: Rafael J. Wysocki Make the power management code under arch/arm/mach-shmobile/ use pm_genpd_add_subdomain_names() for adding subdomains to power domains, which makes it possible to drop rmobile_pm_add_subdomain() and will allow us to carry out those operations for domain objects stored in tables in a straightforward way. Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/include/mach/pm-rmobile.h | 3 --- arch/arm/mach-shmobile/pm-rmobile.c | 6 ------ arch/arm/mach-shmobile/setup-r8a7740.c | 2 +- arch/arm/mach-shmobile/setup-sh7372.c | 8 ++++---- 4 files changed, 5 insertions(+), 14 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/arch/arm/mach-shmobile/include/mach/pm-rmobile.h =================================================================== --- linux.orig/arch/arm/mach-shmobile/include/mach/pm-rmobile.h +++ linux/arch/arm/mach-shmobile/include/mach/pm-rmobile.h @@ -33,12 +33,9 @@ struct rmobile_pm_domain *to_rmobile_pd( extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd); extern void rmobile_add_device_to_domain(const char *domain_name, struct platform_device *pdev); -extern void rmobile_pm_add_subdomain(struct rmobile_pm_domain *rmobile_pd, - struct rmobile_pm_domain *rmobile_sd); #else #define rmobile_init_pm_domain(pd) do { } while (0) #define rmobile_add_device_to_domain(name, pdev) do { } while (0) -#define rmobile_pm_add_subdomain(pd, sd) do { } while (0) #endif /* CONFIG_PM */ #endif /* PM_RMOBILE_H */ Index: linux/arch/arm/mach-shmobile/pm-rmobile.c =================================================================== --- linux.orig/arch/arm/mach-shmobile/pm-rmobile.c +++ linux/arch/arm/mach-shmobile/pm-rmobile.c @@ -158,10 +158,4 @@ void rmobile_add_device_to_domain(const if (pm_clk_no_clocks(dev)) pm_clk_add(dev, NULL); } - -void rmobile_pm_add_subdomain(struct rmobile_pm_domain *rmobile_pd, - struct rmobile_pm_domain *rmobile_sd) -{ - pm_genpd_add_subdomain(&rmobile_pd->genpd, &rmobile_sd->genpd); -} #endif /* CONFIG_PM */ Index: linux/arch/arm/mach-shmobile/setup-r8a7740.c =================================================================== --- linux.orig/arch/arm/mach-shmobile/setup-r8a7740.c +++ linux/arch/arm/mach-shmobile/setup-r8a7740.c @@ -678,7 +678,7 @@ void __init r8a7740_add_standard_devices rmobile_init_pm_domain(&r8a7740_pd_a3sp); rmobile_init_pm_domain(&r8a7740_pd_a4lc); - rmobile_pm_add_subdomain(&r8a7740_pd_a4s, &r8a7740_pd_a3sp); + pm_genpd_add_subdomain_names("A4S", "A3SP"); /* add devices */ platform_add_devices(r8a7740_early_devices, Index: linux/arch/arm/mach-shmobile/setup-sh7372.c =================================================================== --- linux.orig/arch/arm/mach-shmobile/setup-sh7372.c +++ linux/arch/arm/mach-shmobile/setup-sh7372.c @@ -1011,11 +1011,11 @@ void __init sh7372_add_standard_devices( rmobile_init_pm_domain(&sh7372_pd_a3sp); rmobile_init_pm_domain(&sh7372_pd_a3sg); - rmobile_pm_add_subdomain(&sh7372_pd_a4lc, &sh7372_pd_a3rv); - rmobile_pm_add_subdomain(&sh7372_pd_a4r, &sh7372_pd_a4lc); + pm_genpd_add_subdomain_names("A4LC", "A3RV"); + pm_genpd_add_subdomain_names("A4R", "A4LC"); - rmobile_pm_add_subdomain(&sh7372_pd_a4s, &sh7372_pd_a3sg); - rmobile_pm_add_subdomain(&sh7372_pd_a4s, &sh7372_pd_a3sp); + pm_genpd_add_subdomain_names("A4S", "A3SG"); + pm_genpd_add_subdomain_names("A4S", "A3SP"); platform_add_devices(sh7372_early_devices, ARRAY_SIZE(sh7372_early_devices));