16 #include <linux/errno.h>
27 static int omap4_pwrdm_set_next_pwrst(
struct powerdomain *pwrdm,
u8 pwrst)
36 static int omap4_pwrdm_read_next_pwrst(
struct powerdomain *pwrdm)
48 static int omap4_pwrdm_read_pwrst(
struct powerdomain *pwrdm)
60 static int omap4_pwrdm_read_prev_pwrst(
struct powerdomain *pwrdm)
72 static int omap4_pwrdm_set_lowpwrstchange(
struct powerdomain *pwrdm)
81 static int omap4_pwrdm_clear_all_prev_pwrst(
struct powerdomain *pwrdm)
90 static int omap4_pwrdm_set_logic_retst(
struct powerdomain *pwrdm,
u8 pwrst)
102 static int omap4_pwrdm_set_mem_onst(
struct powerdomain *pwrdm,
u8 bank,
116 static int omap4_pwrdm_set_mem_retst(
struct powerdomain *pwrdm,
u8 bank,
130 static int omap4_pwrdm_read_logic_pwrst(
struct powerdomain *pwrdm)
142 static int omap4_pwrdm_read_logic_retst(
struct powerdomain *pwrdm)
167 static int omap4_pwrdm_read_prev_logic_pwrst(
struct powerdomain *pwrdm)
171 state = omap4_pwrdm_read_prev_pwrst(pwrdm);
179 return omap4_pwrdm_read_logic_retst(pwrdm);
182 static int omap4_pwrdm_read_mem_pwrst(
struct powerdomain *pwrdm,
u8 bank)
196 static int omap4_pwrdm_read_mem_retst(
struct powerdomain *pwrdm,
u8 bank)
224 static int omap4_pwrdm_read_prev_mem_pwrst(
struct powerdomain *pwrdm,
u8 bank)
228 state = omap4_pwrdm_read_prev_pwrst(pwrdm);
236 return omap4_pwrdm_read_mem_retst(pwrdm, bank);
239 static int omap4_pwrdm_wait_transition(
struct powerdomain *pwrdm)
258 pr_err(
"powerdomain: %s: waited too long to complete transition\n",
263 pr_debug(
"powerdomain: completed transition in %d loops\n", c);
269 .pwrdm_set_next_pwrst = omap4_pwrdm_set_next_pwrst,
270 .pwrdm_read_next_pwrst = omap4_pwrdm_read_next_pwrst,
271 .pwrdm_read_pwrst = omap4_pwrdm_read_pwrst,
272 .pwrdm_read_prev_pwrst = omap4_pwrdm_read_prev_pwrst,
273 .pwrdm_set_lowpwrstchange = omap4_pwrdm_set_lowpwrstchange,
274 .pwrdm_clear_all_prev_pwrst = omap4_pwrdm_clear_all_prev_pwrst,
275 .pwrdm_set_logic_retst = omap4_pwrdm_set_logic_retst,
276 .pwrdm_read_logic_pwrst = omap4_pwrdm_read_logic_pwrst,
277 .pwrdm_read_prev_logic_pwrst = omap4_pwrdm_read_prev_logic_pwrst,
278 .pwrdm_read_logic_retst = omap4_pwrdm_read_logic_retst,
279 .pwrdm_read_mem_pwrst = omap4_pwrdm_read_mem_pwrst,
280 .pwrdm_read_mem_retst = omap4_pwrdm_read_mem_retst,
281 .pwrdm_read_prev_mem_pwrst = omap4_pwrdm_read_prev_mem_pwrst,
282 .pwrdm_set_mem_onst = omap4_pwrdm_set_mem_onst,
283 .pwrdm_set_mem_retst = omap4_pwrdm_set_mem_retst,
284 .pwrdm_wait_transition = omap4_pwrdm_wait_transition,