From ceeb24e663b1d419a018c031fed1fc415e958d32 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Tue, 7 Aug 2012 01:13:37 +0200 Subject: [PATCH] --- yaml --- r: 328693 b: refs/heads/master c: 7b5674075b7c7ddb0c4da18b1f104e1db774ce82 h: refs/heads/master i: 328691: 029519d29983b4b590997bd72ab7180f9dd85779 v: v3 --- [refs] | 2 +- .../arm/mach-shmobile/include/mach/r8a7740.h | 6 +-- trunk/arch/arm/mach-shmobile/pm-r8a7740.c | 42 +++++++++++-------- trunk/arch/arm/mach-shmobile/setup-r8a7740.c | 7 +--- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/[refs] b/[refs] index 9adb3961d5ba..afc2ec5f5ded 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e7e59a4b55706b0bbaba1cd8af46495553b6e876 +refs/heads/master: 7b5674075b7c7ddb0c4da18b1f104e1db774ce82 diff --git a/trunk/arch/arm/mach-shmobile/include/mach/r8a7740.h b/trunk/arch/arm/mach-shmobile/include/mach/r8a7740.h index 7143147780df..59d252f4cf97 100644 --- a/trunk/arch/arm/mach-shmobile/include/mach/r8a7740.h +++ b/trunk/arch/arm/mach-shmobile/include/mach/r8a7740.h @@ -607,9 +607,9 @@ enum { }; #ifdef CONFIG_PM -extern struct rmobile_pm_domain r8a7740_pd_a4s; -extern struct rmobile_pm_domain r8a7740_pd_a3sp; -extern struct rmobile_pm_domain r8a7740_pd_a4lc; +extern void __init r8a7740_init_pm_domains(void); +#else +static inline void r8a7740_init_pm_domains(void) {} #endif /* CONFIG_PM */ #endif /* __ASM_R8A7740_H__ */ diff --git a/trunk/arch/arm/mach-shmobile/pm-r8a7740.c b/trunk/arch/arm/mach-shmobile/pm-r8a7740.c index 893504d012a6..21e5316d2d88 100644 --- a/trunk/arch/arm/mach-shmobile/pm-r8a7740.c +++ b/trunk/arch/arm/mach-shmobile/pm-r8a7740.c @@ -21,14 +21,6 @@ static int r8a7740_pd_a4s_suspend(void) return -EBUSY; } -struct rmobile_pm_domain r8a7740_pd_a4s = { - .genpd.name = "A4S", - .bit_shift = 10, - .gov = &pm_domain_always_on_gov, - .no_debug = true, - .suspend = r8a7740_pd_a4s_suspend, -}; - static int r8a7740_pd_a3sp_suspend(void) { /* @@ -38,17 +30,31 @@ static int r8a7740_pd_a3sp_suspend(void) return console_suspend_enabled ? 0 : -EBUSY; } -struct rmobile_pm_domain r8a7740_pd_a3sp = { - .genpd.name = "A3SP", - .bit_shift = 11, - .gov = &pm_domain_always_on_gov, - .no_debug = true, - .suspend = r8a7740_pd_a3sp_suspend, +static struct rmobile_pm_domain r8a7740_pm_domains[] = { + { + .genpd.name = "A4S", + .bit_shift = 10, + .gov = &pm_domain_always_on_gov, + .no_debug = true, + .suspend = r8a7740_pd_a4s_suspend, + }, + { + .genpd.name = "A3SP", + .bit_shift = 11, + .gov = &pm_domain_always_on_gov, + .no_debug = true, + .suspend = r8a7740_pd_a3sp_suspend, + }, + { + .genpd.name = "A4LC", + .bit_shift = 1, + }, }; -struct rmobile_pm_domain r8a7740_pd_a4lc = { - .genpd.name = "A4LC", - .bit_shift = 1, -}; +void __init r8a7740_init_pm_domains(void) +{ + rmobile_init_domains(r8a7740_pm_domains, ARRAY_SIZE(r8a7740_pm_domains)); + pm_genpd_add_subdomain_names("A4S", "A3SP"); +} #endif /* CONFIG_PM */ diff --git a/trunk/arch/arm/mach-shmobile/setup-r8a7740.c b/trunk/arch/arm/mach-shmobile/setup-r8a7740.c index a18892d4d985..11bb1d984197 100644 --- a/trunk/arch/arm/mach-shmobile/setup-r8a7740.c +++ b/trunk/arch/arm/mach-shmobile/setup-r8a7740.c @@ -673,12 +673,7 @@ void __init r8a7740_add_standard_devices(void) r8a7740_i2c_workaround(&i2c0_device); r8a7740_i2c_workaround(&i2c1_device); - /* PM domain */ - rmobile_init_pm_domain(&r8a7740_pd_a4s); - rmobile_init_pm_domain(&r8a7740_pd_a3sp); - rmobile_init_pm_domain(&r8a7740_pd_a4lc); - - pm_genpd_add_subdomain_names("A4S", "A3SP"); + r8a7740_init_pm_domains(); /* add devices */ platform_add_devices(r8a7740_early_devices,