Lines Matching refs:clkctl
367 struct bhnd_core_clkctl *clkctl; in bhnd_generic_alloc_pmu() local
383 clkctl = bhnd_get_pmu_info(child); in bhnd_generic_alloc_pmu()
387 if (clkctl != NULL) { in bhnd_generic_alloc_pmu()
470 clkctl = bhnd_alloc_core_clkctl(child, pmu_dev, r, pmu_regs, in bhnd_generic_alloc_pmu()
472 if (clkctl == NULL) { in bhnd_generic_alloc_pmu()
478 bhnd_set_pmu_info(child, clkctl); in bhnd_generic_alloc_pmu()
489 struct bhnd_core_clkctl *clkctl; in bhnd_generic_release_pmu() local
500 clkctl = bhnd_get_pmu_info(child); in bhnd_generic_release_pmu()
501 if (clkctl == NULL) in bhnd_generic_release_pmu()
508 if (!bhnd_is_hw_suspended(clkctl->cc_dev)) { in bhnd_generic_release_pmu()
509 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_release_pmu()
512 BHND_CLKCTL_SET_4(clkctl, 0x0, BHND_CCS_FORCE_MASK | in bhnd_generic_release_pmu()
515 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_release_pmu()
523 r = clkctl->cc_res; in bhnd_generic_release_pmu()
524 pmu_dev = clkctl->cc_pmu_dev; in bhnd_generic_release_pmu()
527 bhnd_free_core_clkctl(clkctl); in bhnd_generic_release_pmu()
545 struct bhnd_core_clkctl *clkctl; in bhnd_generic_get_clock_latency() local
550 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_get_clock_latency()
553 return (bhnd_pmu_get_clock_latency(clkctl->cc_pmu_dev, clock, latency)); in bhnd_generic_get_clock_latency()
563 struct bhnd_core_clkctl *clkctl; in bhnd_generic_get_clock_freq() local
568 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_get_clock_freq()
571 return (bhnd_pmu_get_clock_freq(clkctl->cc_pmu_dev, clock, freq)); in bhnd_generic_get_clock_freq()
581 struct bhnd_core_clkctl *clkctl; in bhnd_generic_request_clock() local
591 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_request_clock()
594 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_request_clock()
615 device_get_nameunit(clkctl->cc_dev), clock); in bhnd_generic_request_clock()
619 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_request_clock()
622 BHND_CLKCTL_SET_4(clkctl, req, BHND_CCS_FORCE_MASK); in bhnd_generic_request_clock()
625 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_request_clock()
627 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_request_clock()
639 struct bhnd_core_clkctl *clkctl; in bhnd_generic_enable_clocks() local
649 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_enable_clocks()
652 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_enable_clocks()
681 device_get_nameunit(clkctl->cc_dev), clocks); in bhnd_generic_enable_clocks()
685 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_enable_clocks()
688 BHND_CLKCTL_SET_4(clkctl, req, BHND_CCS_AREQ_MASK); in bhnd_generic_enable_clocks()
691 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_enable_clocks()
693 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_enable_clocks()
705 struct bhnd_core_clkctl *clkctl; in bhnd_generic_request_ext_rsrc() local
715 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_request_ext_rsrc()
718 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_request_ext_rsrc()
728 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_request_ext_rsrc()
731 BHND_CLKCTL_SET_4(clkctl, req, req); in bhnd_generic_request_ext_rsrc()
734 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_request_ext_rsrc()
736 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_request_ext_rsrc()
748 struct bhnd_core_clkctl *clkctl; in bhnd_generic_release_ext_rsrc() local
756 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_release_ext_rsrc()
760 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_release_ext_rsrc()
770 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_release_ext_rsrc()
771 BHND_CLKCTL_SET_4(clkctl, 0x0, mask); in bhnd_generic_release_ext_rsrc()
772 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_release_ext_rsrc()