Lines Matching refs:clkctl

366 	struct bhnd_core_clkctl		*clkctl;  in bhnd_generic_alloc_pmu()  local
382 clkctl = bhnd_get_pmu_info(child); in bhnd_generic_alloc_pmu()
386 if (clkctl != NULL) { in bhnd_generic_alloc_pmu()
469 clkctl = bhnd_alloc_core_clkctl(child, pmu_dev, r, pmu_regs, in bhnd_generic_alloc_pmu()
471 if (clkctl == NULL) { in bhnd_generic_alloc_pmu()
477 bhnd_set_pmu_info(child, clkctl); in bhnd_generic_alloc_pmu()
488 struct bhnd_core_clkctl *clkctl; in bhnd_generic_release_pmu() local
499 clkctl = bhnd_get_pmu_info(child); in bhnd_generic_release_pmu()
500 if (clkctl == NULL) in bhnd_generic_release_pmu()
507 if (!bhnd_is_hw_suspended(clkctl->cc_dev)) { in bhnd_generic_release_pmu()
508 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_release_pmu()
511 BHND_CLKCTL_SET_4(clkctl, 0x0, BHND_CCS_FORCE_MASK | in bhnd_generic_release_pmu()
514 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_release_pmu()
522 r = clkctl->cc_res; in bhnd_generic_release_pmu()
523 pmu_dev = clkctl->cc_pmu_dev; in bhnd_generic_release_pmu()
526 bhnd_free_core_clkctl(clkctl); in bhnd_generic_release_pmu()
544 struct bhnd_core_clkctl *clkctl; in bhnd_generic_get_clock_latency() local
549 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_get_clock_latency()
552 return (bhnd_pmu_get_clock_latency(clkctl->cc_pmu_dev, clock, latency)); in bhnd_generic_get_clock_latency()
562 struct bhnd_core_clkctl *clkctl; in bhnd_generic_get_clock_freq() local
567 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_get_clock_freq()
570 return (bhnd_pmu_get_clock_freq(clkctl->cc_pmu_dev, clock, freq)); in bhnd_generic_get_clock_freq()
580 struct bhnd_core_clkctl *clkctl; in bhnd_generic_request_clock() local
590 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_request_clock()
593 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_request_clock()
614 device_get_nameunit(clkctl->cc_dev), clock); in bhnd_generic_request_clock()
618 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_request_clock()
621 BHND_CLKCTL_SET_4(clkctl, req, BHND_CCS_FORCE_MASK); in bhnd_generic_request_clock()
624 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_request_clock()
626 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_request_clock()
638 struct bhnd_core_clkctl *clkctl; in bhnd_generic_enable_clocks() local
648 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_enable_clocks()
651 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_enable_clocks()
680 device_get_nameunit(clkctl->cc_dev), clocks); in bhnd_generic_enable_clocks()
684 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_enable_clocks()
687 BHND_CLKCTL_SET_4(clkctl, req, BHND_CCS_AREQ_MASK); in bhnd_generic_enable_clocks()
690 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_enable_clocks()
692 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_enable_clocks()
704 struct bhnd_core_clkctl *clkctl; in bhnd_generic_request_ext_rsrc() local
714 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_request_ext_rsrc()
717 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_request_ext_rsrc()
727 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_request_ext_rsrc()
730 BHND_CLKCTL_SET_4(clkctl, req, req); in bhnd_generic_request_ext_rsrc()
733 error = bhnd_core_clkctl_wait(clkctl, avail, avail); in bhnd_generic_request_ext_rsrc()
735 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_request_ext_rsrc()
747 struct bhnd_core_clkctl *clkctl; in bhnd_generic_release_ext_rsrc() local
755 if ((clkctl = bhnd_get_pmu_info(child)) == NULL) in bhnd_generic_release_ext_rsrc()
758 BHND_ASSERT_CLKCTL_AVAIL(clkctl); in bhnd_generic_release_ext_rsrc()
768 BHND_CLKCTL_LOCK(clkctl); in bhnd_generic_release_ext_rsrc()
769 BHND_CLKCTL_SET_4(clkctl, 0x0, mask); in bhnd_generic_release_ext_rsrc()
770 BHND_CLKCTL_UNLOCK(clkctl); in bhnd_generic_release_ext_rsrc()