diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-08-06 19:09:31 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-09-03 19:44:56 -0400 |
commit | 7fcb304792649e763e460c47abc4c53085bffaee (patch) | |
tree | 6957aa41304b185780296b09b0b0c931b6cebedb /arch/arm | |
parent | 8e0e7aaef3c98c52e85f5640b73ffa82058abcfd (diff) |
ARM: shmobile: Use domain names when adding subdomains to power domains
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 <rjw@sisk.pl>
Acked-by: Magnus Damm <damm@opensource.se>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/pm-rmobile.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/pm-rmobile.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7740.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7372.c | 8 |
4 files changed, 5 insertions, 14 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h b/arch/arm/mach-shmobile/include/mach/pm-rmobile.h index 0c25fc982686..7e2487790122 100644 --- a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h +++ b/arch/arm/mach-shmobile/include/mach/pm-rmobile.h | |||
@@ -33,12 +33,9 @@ struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d) | |||
33 | extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd); | 33 | extern void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd); |
34 | extern void rmobile_add_device_to_domain(const char *domain_name, | 34 | extern void rmobile_add_device_to_domain(const char *domain_name, |
35 | struct platform_device *pdev); | 35 | struct platform_device *pdev); |
36 | extern void rmobile_pm_add_subdomain(struct rmobile_pm_domain *rmobile_pd, | ||
37 | struct rmobile_pm_domain *rmobile_sd); | ||
38 | #else | 36 | #else |
39 | #define rmobile_init_pm_domain(pd) do { } while (0) | 37 | #define rmobile_init_pm_domain(pd) do { } while (0) |
40 | #define rmobile_add_device_to_domain(name, pdev) do { } while (0) | 38 | #define rmobile_add_device_to_domain(name, pdev) do { } while (0) |
41 | #define rmobile_pm_add_subdomain(pd, sd) do { } while (0) | ||
42 | #endif /* CONFIG_PM */ | 39 | #endif /* CONFIG_PM */ |
43 | 40 | ||
44 | #endif /* PM_RMOBILE_H */ | 41 | #endif /* PM_RMOBILE_H */ |
diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c index c94056d6a029..6c47843c511b 100644 --- a/arch/arm/mach-shmobile/pm-rmobile.c +++ b/arch/arm/mach-shmobile/pm-rmobile.c | |||
@@ -158,10 +158,4 @@ void rmobile_add_device_to_domain(const char *domain_name, | |||
158 | if (pm_clk_no_clocks(dev)) | 158 | if (pm_clk_no_clocks(dev)) |
159 | pm_clk_add(dev, NULL); | 159 | pm_clk_add(dev, NULL); |
160 | } | 160 | } |
161 | |||
162 | void rmobile_pm_add_subdomain(struct rmobile_pm_domain *rmobile_pd, | ||
163 | struct rmobile_pm_domain *rmobile_sd) | ||
164 | { | ||
165 | pm_genpd_add_subdomain(&rmobile_pd->genpd, &rmobile_sd->genpd); | ||
166 | } | ||
167 | #endif /* CONFIG_PM */ | 161 | #endif /* CONFIG_PM */ |
diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c index db7af5685540..a18892d4d985 100644 --- a/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/arch/arm/mach-shmobile/setup-r8a7740.c | |||
@@ -678,7 +678,7 @@ void __init r8a7740_add_standard_devices(void) | |||
678 | rmobile_init_pm_domain(&r8a7740_pd_a3sp); | 678 | rmobile_init_pm_domain(&r8a7740_pd_a3sp); |
679 | rmobile_init_pm_domain(&r8a7740_pd_a4lc); | 679 | rmobile_init_pm_domain(&r8a7740_pd_a4lc); |
680 | 680 | ||
681 | rmobile_pm_add_subdomain(&r8a7740_pd_a4s, &r8a7740_pd_a3sp); | 681 | pm_genpd_add_subdomain_names("A4S", "A3SP"); |
682 | 682 | ||
683 | /* add devices */ | 683 | /* add devices */ |
684 | platform_add_devices(r8a7740_early_devices, | 684 | platform_add_devices(r8a7740_early_devices, |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 95f06c8fb855..a2e1eeafd1a1 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -1011,11 +1011,11 @@ void __init sh7372_add_standard_devices(void) | |||
1011 | rmobile_init_pm_domain(&sh7372_pd_a3sp); | 1011 | rmobile_init_pm_domain(&sh7372_pd_a3sp); |
1012 | rmobile_init_pm_domain(&sh7372_pd_a3sg); | 1012 | rmobile_init_pm_domain(&sh7372_pd_a3sg); |
1013 | 1013 | ||
1014 | rmobile_pm_add_subdomain(&sh7372_pd_a4lc, &sh7372_pd_a3rv); | 1014 | pm_genpd_add_subdomain_names("A4LC", "A3RV"); |
1015 | rmobile_pm_add_subdomain(&sh7372_pd_a4r, &sh7372_pd_a4lc); | 1015 | pm_genpd_add_subdomain_names("A4R", "A4LC"); |
1016 | 1016 | ||
1017 | rmobile_pm_add_subdomain(&sh7372_pd_a4s, &sh7372_pd_a3sg); | 1017 | pm_genpd_add_subdomain_names("A4S", "A3SG"); |
1018 | rmobile_pm_add_subdomain(&sh7372_pd_a4s, &sh7372_pd_a3sp); | 1018 | pm_genpd_add_subdomain_names("A4S", "A3SP"); |
1019 | 1019 | ||
1020 | platform_add_devices(sh7372_early_devices, | 1020 | platform_add_devices(sh7372_early_devices, |
1021 | ARRAY_SIZE(sh7372_early_devices)); | 1021 | ARRAY_SIZE(sh7372_early_devices)); |