Lines Matching refs:clkdm
297 static int am33xx_clkdm_sleep(struct clockdomain *clkdm)
299 am33xx_cm_clkdm_force_sleep(clkdm->cm_inst, clkdm->clkdm_offs);
303 static int am33xx_clkdm_wakeup(struct clockdomain *clkdm)
305 am33xx_cm_clkdm_force_wakeup(clkdm->cm_inst, clkdm->clkdm_offs);
309 static void am33xx_clkdm_allow_idle(struct clockdomain *clkdm)
311 am33xx_cm_clkdm_enable_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
314 static void am33xx_clkdm_deny_idle(struct clockdomain *clkdm)
316 am33xx_cm_clkdm_disable_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
319 static int am33xx_clkdm_clk_enable(struct clockdomain *clkdm)
321 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
322 return am33xx_clkdm_wakeup(clkdm);
327 static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm)
331 hwsup = am33xx_cm_is_clkdm_in_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
333 if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
334 am33xx_clkdm_sleep(clkdm);
346 * @clkdm: The clockdomain pointer whose context needs to be saved
350 static int am33xx_clkdm_save_context(struct clockdomain *clkdm)
352 clkdm->context = am33xx_cm_read_reg_bits(clkdm->cm_inst,
353 clkdm->clkdm_offs,
361 * @clkdm: The clockdomain pointer whose context needs to be restored
365 static int am33xx_clkdm_restore_context(struct clockdomain *clkdm)
367 switch (clkdm->context) {
369 am33xx_clkdm_deny_idle(clkdm);
372 am33xx_clkdm_sleep(clkdm);
375 am33xx_clkdm_wakeup(clkdm);
378 am33xx_clkdm_allow_idle(clkdm);