Lines Matching refs:clkdm
305 static int am33xx_clkdm_sleep(struct clockdomain *clkdm)
307 am33xx_cm_clkdm_force_sleep(clkdm->cm_inst, clkdm->clkdm_offs);
311 static int am33xx_clkdm_wakeup(struct clockdomain *clkdm)
313 am33xx_cm_clkdm_force_wakeup(clkdm->cm_inst, clkdm->clkdm_offs);
317 static void am33xx_clkdm_allow_idle(struct clockdomain *clkdm)
319 am33xx_cm_clkdm_enable_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
322 static void am33xx_clkdm_deny_idle(struct clockdomain *clkdm)
324 am33xx_cm_clkdm_disable_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
327 static int am33xx_clkdm_clk_enable(struct clockdomain *clkdm)
329 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
330 return am33xx_clkdm_wakeup(clkdm);
335 static int am33xx_clkdm_clk_disable(struct clockdomain *clkdm)
339 hwsup = am33xx_cm_is_clkdm_in_hwsup(clkdm->cm_inst, clkdm->clkdm_offs);
341 if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
342 am33xx_clkdm_sleep(clkdm);
354 * @clkdm: The clockdomain pointer whose context needs to be saved
358 static int am33xx_clkdm_save_context(struct clockdomain *clkdm)
360 clkdm->context = am33xx_cm_read_reg_bits(clkdm->cm_inst,
361 clkdm->clkdm_offs,
369 * @clkdm: The clockdomain pointer whose context needs to be restored
373 static int am33xx_clkdm_restore_context(struct clockdomain *clkdm)
375 switch (clkdm->context) {
377 am33xx_clkdm_deny_idle(clkdm);
380 am33xx_clkdm_sleep(clkdm);
383 am33xx_clkdm_wakeup(clkdm);
386 am33xx_clkdm_allow_idle(clkdm);