Lines Matching full:clkctl
176 * Device table entries for core-specific CLKCTL quirk lookup.
184 /** ChipCommon CLKCTL quirks */
186 /* HTAVAIL/ALPAVAIL are bitswapped in chipc's CLKCTL */
192 /** PCMCIA CLKCTL quirks */
194 /* HTAVAIL/ALPAVAIL are bitswapped in pcmcia's CLKCTL */
1053 * Allocate and return a new per-core PMU clock control/status (clkctl)
1060 * returned clkctl instance.
1064 * lifetime of the returned clkctl instance.
1078 struct bhnd_core_clkctl *clkctl; in bhnd_alloc_core_clkctl() local
1080 clkctl = malloc(sizeof(*clkctl), M_BHND, M_ZERO | M_NOWAIT); in bhnd_alloc_core_clkctl()
1081 if (clkctl == NULL) in bhnd_alloc_core_clkctl()
1084 clkctl->cc_dev = dev; in bhnd_alloc_core_clkctl()
1085 clkctl->cc_pmu_dev = pmu_dev; in bhnd_alloc_core_clkctl()
1086 clkctl->cc_res = r; in bhnd_alloc_core_clkctl()
1087 clkctl->cc_res_offset = offset; in bhnd_alloc_core_clkctl()
1088 clkctl->cc_max_latency = max_latency; in bhnd_alloc_core_clkctl()
1089 clkctl->cc_quirks = bhnd_device_quirks(dev, bhnd_clkctl_devices, in bhnd_alloc_core_clkctl()
1092 BHND_CLKCTL_LOCK_INIT(clkctl); in bhnd_alloc_core_clkctl()
1094 return (clkctl); in bhnd_alloc_core_clkctl()
1098 * Free a clkctl instance previously allocated via bhnd_alloc_core_clkctl().
1100 * @param clkctl The clkctl instance to be freed.
1103 bhnd_free_core_clkctl(struct bhnd_core_clkctl *clkctl) in bhnd_free_core_clkctl() argument
1105 BHND_CLKCTL_LOCK_DESTROY(clkctl); in bhnd_free_core_clkctl()
1107 free(clkctl, M_BHND); in bhnd_free_core_clkctl()
1114 * @param clkctl Per-core clkctl state to be queryied.
1123 bhnd_core_clkctl_wait(struct bhnd_core_clkctl *clkctl, uint32_t value, in bhnd_core_clkctl_wait() argument
1128 BHND_CLKCTL_LOCK_ASSERT(clkctl, MA_OWNED); in bhnd_core_clkctl_wait()
1131 if (clkctl->cc_quirks & BHND_CLKCTL_QUIRK_CCS0) { in bhnd_core_clkctl_wait()
1151 for (u_int i = 0; i < clkctl->cc_max_latency; i += 10) { in bhnd_core_clkctl_wait()
1152 clkst = bhnd_bus_read_4(clkctl->cc_res, clkctl->cc_res_offset); in bhnd_core_clkctl_wait()
1159 device_printf(clkctl->cc_dev, "clkst wait timeout (value=%#x, " in bhnd_core_clkctl_wait()