Lines Matching +full:level +full:- +full:low
1 // SPDX-License-Identifier: GPL-2.0-only
25 * cm_ll_data: function pointers to SoC-specific implementations of
41 * cm_split_idlest_reg - split CM_IDLEST reg addr into its components
48 * via the @prcm_inst and @idlest_reg_id. Returns -EINVAL upon error,
56 if (!cm_ll_data->split_idlest_reg) { in cm_split_idlest_reg()
57 WARN_ONCE(1, "cm: %s: no low-level function defined\n", in cm_split_idlest_reg()
59 return -EINVAL; in cm_split_idlest_reg()
62 ret = cm_ll_data->split_idlest_reg(idlest_reg, prcm_inst, in cm_split_idlest_reg()
64 *prcm_inst -= cm_base.offset; in cm_split_idlest_reg()
69 * omap_cm_wait_module_ready - wait for a module to leave idle or standby
77 * success, -EBUSY if the module doesn't enable in time, or -EINVAL if
78 * no per-SoC wait_module_ready() function pointer has been registered
84 if (!cm_ll_data->wait_module_ready) { in omap_cm_wait_module_ready()
85 WARN_ONCE(1, "cm: %s: no low-level function defined\n", in omap_cm_wait_module_ready()
87 return -EINVAL; in omap_cm_wait_module_ready()
90 return cm_ll_data->wait_module_ready(part, prcm_mod, idlest_reg, in omap_cm_wait_module_ready()
95 * omap_cm_wait_module_idle - wait for a module to enter idle or standby
103 * 0 upon success, -EBUSY if the module doesn't enable in time, or
104 * -EINVAL if no per-SoC wait_module_idle() function pointer has been
110 if (!cm_ll_data->wait_module_idle) { in omap_cm_wait_module_idle()
111 WARN_ONCE(1, "cm: %s: no low-level function defined\n", in omap_cm_wait_module_idle()
113 return -EINVAL; in omap_cm_wait_module_idle()
116 return cm_ll_data->wait_module_idle(part, prcm_mod, idlest_reg, in omap_cm_wait_module_idle()
121 * omap_cm_module_enable - enable a module
128 * making its IO space accessible. Return 0 upon success, -EINVAL if no
129 * per-SoC module_enable() function pointer has been registered.
133 if (!cm_ll_data->module_enable) { in omap_cm_module_enable()
134 WARN_ONCE(1, "cm: %s: no low-level function defined\n", in omap_cm_module_enable()
136 return -EINVAL; in omap_cm_module_enable()
139 cm_ll_data->module_enable(mode, part, inst, clkctrl_offs); in omap_cm_module_enable()
144 * omap_cm_module_disable - disable a module
150 * makings its IO space inaccessible. Return 0 upon success, -EINVAL if
151 * no per-SoC module_disable() function pointer has been registered.
155 if (!cm_ll_data->module_disable) { in omap_cm_module_disable()
156 WARN_ONCE(1, "cm: %s: no low-level function defined\n", in omap_cm_module_disable()
158 return -EINVAL; in omap_cm_module_disable()
161 cm_ll_data->module_disable(part, inst, clkctrl_offs); in omap_cm_module_disable()
167 if (!cm_ll_data->xlate_clkctrl) { in omap_cm_xlate_clkctrl()
168 WARN_ONCE(1, "cm: %s: no low-level function defined\n", in omap_cm_xlate_clkctrl()
172 return cm_ll_data->xlate_clkctrl(part, inst, clkctrl_offs); in omap_cm_xlate_clkctrl()
176 * cm_register - register per-SoC low-level data with the CM
177 * @cld: low-level per-SoC OMAP CM data & function pointers to register
179 * Register per-SoC low-level OMAP CM data and function pointers with
182 * it returns successfully. Returns 0 upon success, -EINVAL if @cld
183 * is NULL, or -EEXIST if cm_register() has already been called
189 return -EINVAL; in cm_register()
192 return -EEXIST; in cm_register()
200 * cm_unregister - unregister per-SoC low-level data & function pointers
201 * @cld: low-level per-SoC OMAP CM data & function pointers to unregister
203 * Unregister per-SoC low-level OMAP CM data and function pointers
207 * -EINVAL if @cld is NULL or if @cld does not match the struct
213 return -EINVAL; in cm_unregister()
251 .offset = -OMAP3430_IVA2_MOD,
273 { .compatible = "ti,omap2-prcm", .data = &omap2_prcm_data },
276 { .compatible = "ti,omap3-cm", .data = &omap3_cm_data },
279 { .compatible = "ti,omap4-cm1", .data = &cm_data },
280 { .compatible = "ti,omap4-cm2", .data = &cm2_data },
283 { .compatible = "ti,omap5-cm-core-aon", .data = &cm_data },
284 { .compatible = "ti,omap5-cm-core", .data = &cm2_data },
287 { .compatible = "ti,dra7-cm-core-aon", .data = &cm_data },
288 { .compatible = "ti,dra7-cm-core", .data = &cm2_data },
291 { .compatible = "ti,am3-prcm", .data = &am3_prcm_data },
294 { .compatible = "ti,am4-prcm", .data = &am4_prcm_data },
297 { .compatible = "ti,dm814-prcm", .data = &am3_prcm_data },
298 { .compatible = "ti,dm816-prcm", .data = &am3_prcm_data },
304 * omap2_cm_base_init - initialize iomappings for the CM drivers
320 data = (struct omap_prcm_init_data *)match->data; in omap2_cm_base_init()
328 if (data->index == TI_CLKM_CM) in omap2_cm_base_init()
331 if (data->index == TI_CLKM_CM2) in omap2_cm_base_init()
334 data->mem = ioremap(res.start, resource_size(&res)); in omap2_cm_base_init()
337 mem->pa = res.start + data->offset; in omap2_cm_base_init()
338 mem->va = data->mem + data->offset; in omap2_cm_base_init()
339 mem->offset = data->offset; in omap2_cm_base_init()
342 data->np = np; in omap2_cm_base_init()
344 if (data->init && (data->flags & CM_SINGLE_INSTANCE || in omap2_cm_base_init()
346 data->init(data); in omap2_cm_base_init()
353 * omap_cm_init - low level init for the CM drivers
355 * Initializes the low level clock infrastructure for CM drivers.
366 data = match->data; in omap_cm_init()
368 if (data->flags & CM_NO_CLOCKS) in omap_cm_init()
371 ret = omap2_clk_provider_init(np, data->index, NULL, data->mem); in omap_cm_init()