diff options
-rw-r--r-- | arch/arm/mach-omap2/pm-debug.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/powerdomain.h | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c index 8baa30d2acfb..860b755d2220 100644 --- a/arch/arm/mach-omap2/pm-debug.c +++ b/arch/arm/mach-omap2/pm-debug.c | |||
@@ -326,7 +326,7 @@ int pm_dbg_regset_save(int reg_set) | |||
326 | return 0; | 326 | return 0; |
327 | } | 327 | } |
328 | 328 | ||
329 | static const char pwrdm_state_names[][4] = { | 329 | static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = { |
330 | "OFF", | 330 | "OFF", |
331 | "RET", | 331 | "RET", |
332 | "INA", | 332 | "INA", |
@@ -381,7 +381,7 @@ static int pwrdm_dbg_show_counter(struct powerdomain *pwrdm, void *user) | |||
381 | 381 | ||
382 | seq_printf(s, "%s (%s)", pwrdm->name, | 382 | seq_printf(s, "%s (%s)", pwrdm->name, |
383 | pwrdm_state_names[pwrdm->state]); | 383 | pwrdm_state_names[pwrdm->state]); |
384 | for (i = 0; i < 4; i++) | 384 | for (i = 0; i < PWRDM_MAX_PWRSTS; i++) |
385 | seq_printf(s, ",%s:%d", pwrdm_state_names[i], | 385 | seq_printf(s, ",%s:%d", pwrdm_state_names[i], |
386 | pwrdm->state_counter[i]); | 386 | pwrdm->state_counter[i]); |
387 | 387 | ||
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 41472670e4b4..1dd1a3817e8b 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -158,7 +158,7 @@ static __init void _pwrdm_setup(struct powerdomain *pwrdm) | |||
158 | { | 158 | { |
159 | int i; | 159 | int i; |
160 | 160 | ||
161 | for (i = 0; i < 4; i++) | 161 | for (i = 0; i < PWRDM_MAX_PWRSTS; i++) |
162 | pwrdm->state_counter[i] = 0; | 162 | pwrdm->state_counter[i] = 0; |
163 | 163 | ||
164 | pwrdm_wait_transition(pwrdm); | 164 | pwrdm_wait_transition(pwrdm); |
diff --git a/arch/arm/plat-omap/include/plat/powerdomain.h b/arch/arm/plat-omap/include/plat/powerdomain.h index 3d45ee1d3cf4..5a80ddb4bb7e 100644 --- a/arch/arm/plat-omap/include/plat/powerdomain.h +++ b/arch/arm/plat-omap/include/plat/powerdomain.h | |||
@@ -28,6 +28,8 @@ | |||
28 | #define PWRDM_POWER_INACTIVE 0x2 | 28 | #define PWRDM_POWER_INACTIVE 0x2 |
29 | #define PWRDM_POWER_ON 0x3 | 29 | #define PWRDM_POWER_ON 0x3 |
30 | 30 | ||
31 | #define PWRDM_MAX_PWRSTS 4 | ||
32 | |||
31 | /* Powerdomain allowable state bitfields */ | 33 | /* Powerdomain allowable state bitfields */ |
32 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ | 34 | #define PWRSTS_OFF_ON ((1 << PWRDM_POWER_OFF) | \ |
33 | (1 << PWRDM_POWER_ON)) | 35 | (1 << PWRDM_POWER_ON)) |
@@ -118,11 +120,11 @@ struct powerdomain { | |||
118 | struct list_head node; | 120 | struct list_head node; |
119 | 121 | ||
120 | int state; | 122 | int state; |
121 | unsigned state_counter[4]; | 123 | unsigned state_counter[PWRDM_MAX_PWRSTS]; |
122 | 124 | ||
123 | #ifdef CONFIG_PM_DEBUG | 125 | #ifdef CONFIG_PM_DEBUG |
124 | s64 timer; | 126 | s64 timer; |
125 | s64 state_timer[4]; | 127 | s64 state_timer[PWRDM_MAX_PWRSTS]; |
126 | #endif | 128 | #endif |
127 | }; | 129 | }; |
128 | 130 | ||