diff options
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.h')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.h | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.h b/arch/arm/mach-omap2/powerdomain.h index 8f88d65c46ea..baee90608d11 100644 --- a/arch/arm/mach-omap2/powerdomain.h +++ b/arch/arm/mach-omap2/powerdomain.h | |||
@@ -67,9 +67,9 @@ | |||
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Maximum number of clockdomains that can be associated with a powerdomain. | 69 | * Maximum number of clockdomains that can be associated with a powerdomain. |
70 | * CORE powerdomain on OMAP4 is the worst case | 70 | * PER powerdomain on AM33XX is the worst case |
71 | */ | 71 | */ |
72 | #define PWRDM_MAX_CLKDMS 9 | 72 | #define PWRDM_MAX_CLKDMS 11 |
73 | 73 | ||
74 | /* XXX A completely arbitrary number. What is reasonable here? */ | 74 | /* XXX A completely arbitrary number. What is reasonable here? */ |
75 | #define PWRDM_TRANSITION_BAILOUT 100000 | 75 | #define PWRDM_TRANSITION_BAILOUT 100000 |
@@ -92,6 +92,15 @@ struct powerdomain; | |||
92 | * @pwrdm_clkdms: Clockdomains in this powerdomain | 92 | * @pwrdm_clkdms: Clockdomains in this powerdomain |
93 | * @node: list_head linking all powerdomains | 93 | * @node: list_head linking all powerdomains |
94 | * @voltdm_node: list_head linking all powerdomains in a voltagedomain | 94 | * @voltdm_node: list_head linking all powerdomains in a voltagedomain |
95 | * @pwrstctrl_offs: (AM33XX only) XXX_PWRSTCTRL reg offset from prcm_offs | ||
96 | * @pwrstst_offs: (AM33XX only) XXX_PWRSTST reg offset from prcm_offs | ||
97 | * @logicretstate_mask: (AM33XX only) mask for logic retention bitfield | ||
98 | * in @pwrstctrl_offs | ||
99 | * @mem_on_mask: (AM33XX only) mask for mem on bitfield in @pwrstctrl_offs | ||
100 | * @mem_ret_mask: (AM33XX only) mask for mem ret bitfield in @pwrstctrl_offs | ||
101 | * @mem_pwrst_mask: (AM33XX only) mask for mem state bitfield in @pwrstst_offs | ||
102 | * @mem_retst_mask: (AM33XX only) mask for mem retention state bitfield | ||
103 | * in @pwrstctrl_offs | ||
95 | * @state: | 104 | * @state: |
96 | * @state_counter: | 105 | * @state_counter: |
97 | * @timer: | 106 | * @timer: |
@@ -121,6 +130,14 @@ struct powerdomain { | |||
121 | unsigned ret_logic_off_counter; | 130 | unsigned ret_logic_off_counter; |
122 | unsigned ret_mem_off_counter[PWRDM_MAX_MEM_BANKS]; | 131 | unsigned ret_mem_off_counter[PWRDM_MAX_MEM_BANKS]; |
123 | 132 | ||
133 | const u8 pwrstctrl_offs; | ||
134 | const u8 pwrstst_offs; | ||
135 | const u32 logicretstate_mask; | ||
136 | const u32 mem_on_mask[PWRDM_MAX_MEM_BANKS]; | ||
137 | const u32 mem_ret_mask[PWRDM_MAX_MEM_BANKS]; | ||
138 | const u32 mem_pwrst_mask[PWRDM_MAX_MEM_BANKS]; | ||
139 | const u32 mem_retst_mask[PWRDM_MAX_MEM_BANKS]; | ||
140 | |||
124 | #ifdef CONFIG_PM_DEBUG | 141 | #ifdef CONFIG_PM_DEBUG |
125 | s64 timer; | 142 | s64 timer; |
126 | s64 state_timer[PWRDM_MAX_PWRSTS]; | 143 | s64 state_timer[PWRDM_MAX_PWRSTS]; |
@@ -213,8 +230,8 @@ bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm); | |||
213 | int pwrdm_wait_transition(struct powerdomain *pwrdm); | 230 | int pwrdm_wait_transition(struct powerdomain *pwrdm); |
214 | 231 | ||
215 | int pwrdm_state_switch(struct powerdomain *pwrdm); | 232 | int pwrdm_state_switch(struct powerdomain *pwrdm); |
216 | int pwrdm_pre_transition(void); | 233 | int pwrdm_pre_transition(struct powerdomain *pwrdm); |
217 | int pwrdm_post_transition(void); | 234 | int pwrdm_post_transition(struct powerdomain *pwrdm); |
218 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); | 235 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm); |
219 | int pwrdm_get_context_loss_count(struct powerdomain *pwrdm); | 236 | int pwrdm_get_context_loss_count(struct powerdomain *pwrdm); |
220 | bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm); | 237 | bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm); |
@@ -222,10 +239,12 @@ bool pwrdm_can_ever_lose_context(struct powerdomain *pwrdm); | |||
222 | extern void omap242x_powerdomains_init(void); | 239 | extern void omap242x_powerdomains_init(void); |
223 | extern void omap243x_powerdomains_init(void); | 240 | extern void omap243x_powerdomains_init(void); |
224 | extern void omap3xxx_powerdomains_init(void); | 241 | extern void omap3xxx_powerdomains_init(void); |
242 | extern void am33xx_powerdomains_init(void); | ||
225 | extern void omap44xx_powerdomains_init(void); | 243 | extern void omap44xx_powerdomains_init(void); |
226 | 244 | ||
227 | extern struct pwrdm_ops omap2_pwrdm_operations; | 245 | extern struct pwrdm_ops omap2_pwrdm_operations; |
228 | extern struct pwrdm_ops omap3_pwrdm_operations; | 246 | extern struct pwrdm_ops omap3_pwrdm_operations; |
247 | extern struct pwrdm_ops am33xx_pwrdm_operations; | ||
229 | extern struct pwrdm_ops omap4_pwrdm_operations; | 248 | extern struct pwrdm_ops omap4_pwrdm_operations; |
230 | 249 | ||
231 | /* Common Internal functions used across OMAP rev's */ | 250 | /* Common Internal functions used across OMAP rev's */ |