diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2012-04-24 10:05:26 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-05-03 14:00:50 -0400 |
commit | d0d133d9599042355da2896456299e1571709db5 (patch) | |
tree | 4802b5fbf4f81a22a017cb9f184a4590c291094f /arch/arm/mach-omap2/cpuidle44xx.c | |
parent | cc6ae020d651900ef6bd872d0097118e5a605c3d (diff) |
ARM: OMAP4: cpuidle - Initialize omap4_idle_data at compile time
We initialize the omap4_idle_data variable at compile time allowing us
to remove in the next patch the initialization done at boot time.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Jean Pihet <j-pihet@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/cpuidle44xx.c')
-rw-r--r-- | arch/arm/mach-omap2/cpuidle44xx.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index 38ecd270a4a8..9e3effa59b9a 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
@@ -31,9 +31,24 @@ struct omap4_idle_statedata { | |||
31 | u32 mpu_state; | 31 | u32 mpu_state; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | #define OMAP4_NUM_STATES 3 | 34 | static struct omap4_idle_statedata omap4_idle_data[] = { |
35 | { | ||
36 | .cpu_state = PWRDM_POWER_ON, | ||
37 | .mpu_state = PWRDM_POWER_ON, | ||
38 | .mpu_logic_state = PWRDM_POWER_RET, | ||
39 | }, | ||
40 | { | ||
41 | .cpu_state = PWRDM_POWER_OFF, | ||
42 | .mpu_state = PWRDM_POWER_RET, | ||
43 | .mpu_logic_state = PWRDM_POWER_RET, | ||
44 | }, | ||
45 | { | ||
46 | .cpu_state = PWRDM_POWER_OFF, | ||
47 | .mpu_state = PWRDM_POWER_RET, | ||
48 | .mpu_logic_state = PWRDM_POWER_OFF, | ||
49 | }, | ||
50 | }; | ||
35 | 51 | ||
36 | static struct omap4_idle_statedata omap4_idle_data[OMAP4_NUM_STATES]; | ||
37 | static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd; | 52 | static struct powerdomain *mpu_pd, *cpu0_pd, *cpu1_pd; |
38 | 53 | ||
39 | /** | 54 | /** |
@@ -152,7 +167,7 @@ struct cpuidle_driver omap4_idle_driver = { | |||
152 | .desc = "MPUSS OSWR", | 167 | .desc = "MPUSS OSWR", |
153 | }, | 168 | }, |
154 | }, | 169 | }, |
155 | .state_count = OMAP4_NUM_STATES, | 170 | .state_count = ARRAY_SIZE(omap4_idle_data), |
156 | .safe_state_index = 0, | 171 | .safe_state_index = 0, |
157 | }; | 172 | }; |
158 | 173 | ||