Lines Matching full:part

45  *   0x2 idle:     Module is in Idle mode (only OCP part). It is functional if
74 static u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx);
78 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
85 static u32 _clkctrl_idlest(u8 part, u16 inst, u16 clkctrl_offs) in _clkctrl_idlest() argument
87 u32 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs); in _clkctrl_idlest()
95 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
102 static bool _is_module_ready(u8 part, u16 inst, u16 clkctrl_offs) in _is_module_ready() argument
106 v = _clkctrl_idlest(part, inst, clkctrl_offs); in _is_module_ready()
113 static u32 omap4_cminst_read_inst_reg(u8 part, u16 inst, u16 idx) in omap4_cminst_read_inst_reg() argument
115 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || in omap4_cminst_read_inst_reg()
116 part == OMAP4430_INVALID_PRCM_PARTITION || in omap4_cminst_read_inst_reg()
117 !_cm_bases[part].va); in omap4_cminst_read_inst_reg()
118 return readl_relaxed(_cm_bases[part].va + inst + idx); in omap4_cminst_read_inst_reg()
122 static void omap4_cminst_write_inst_reg(u32 val, u8 part, u16 inst, u16 idx) in omap4_cminst_write_inst_reg() argument
124 BUG_ON(part >= OMAP4_MAX_PRCM_PARTITIONS || in omap4_cminst_write_inst_reg()
125 part == OMAP4430_INVALID_PRCM_PARTITION || in omap4_cminst_write_inst_reg()
126 !_cm_bases[part].va); in omap4_cminst_write_inst_reg()
127 writel_relaxed(val, _cm_bases[part].va + inst + idx); in omap4_cminst_write_inst_reg()
131 static u32 omap4_cminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, u16 inst, in omap4_cminst_rmw_inst_reg_bits() argument
136 v = omap4_cminst_read_inst_reg(part, inst, idx); in omap4_cminst_rmw_inst_reg_bits()
139 omap4_cminst_write_inst_reg(v, part, inst, idx); in omap4_cminst_rmw_inst_reg_bits()
144 static u32 omap4_cminst_set_inst_reg_bits(u32 bits, u8 part, u16 inst, s16 idx) in omap4_cminst_set_inst_reg_bits() argument
146 return omap4_cminst_rmw_inst_reg_bits(bits, bits, part, inst, idx); in omap4_cminst_set_inst_reg_bits()
149 static u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, u16 inst, in omap4_cminst_clear_inst_reg_bits() argument
152 return omap4_cminst_rmw_inst_reg_bits(bits, 0x0, part, inst, idx); in omap4_cminst_clear_inst_reg_bits()
155 static u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, u32 mask) in omap4_cminst_read_inst_reg_bits() argument
159 v = omap4_cminst_read_inst_reg(part, inst, idx); in omap4_cminst_read_inst_reg_bits()
173 * @part: PRCM partition ID that the CM_CLKSTCTRL register exists in
180 static void _clktrctrl_write(u8 c, u8 part, u16 inst, u16 cdoffs) in _clktrctrl_write() argument
184 v = omap4_cminst_read_inst_reg(part, inst, cdoffs + OMAP4_CM_CLKSTCTRL); in _clktrctrl_write()
187 omap4_cminst_write_inst_reg(v, part, inst, cdoffs + OMAP4_CM_CLKSTCTRL); in _clktrctrl_write()
192 * @part: PRCM partition ID that the CM_CLKSTCTRL register exists in
196 * Returns true if the clockdomain referred to by (@part, @inst, @cdoffs)
199 static bool omap4_cminst_is_clkdm_in_hwsup(u8 part, u16 inst, u16 cdoffs) in omap4_cminst_is_clkdm_in_hwsup() argument
203 v = omap4_cminst_read_inst_reg(part, inst, cdoffs + OMAP4_CM_CLKSTCTRL); in omap4_cminst_is_clkdm_in_hwsup()
212 * @part: PRCM partition ID that the clockdomain registers exist in
216 * Put a clockdomain referred to by (@part, @inst, @cdoffs) into
219 static void omap4_cminst_clkdm_enable_hwsup(u8 part, u16 inst, u16 cdoffs) in omap4_cminst_clkdm_enable_hwsup() argument
221 _clktrctrl_write(OMAP34XX_CLKSTCTRL_ENABLE_AUTO, part, inst, cdoffs); in omap4_cminst_clkdm_enable_hwsup()
226 * @part: PRCM partition ID that the clockdomain registers exist in
230 * Put a clockdomain referred to by (@part, @inst, @cdoffs) into
234 static void omap4_cminst_clkdm_disable_hwsup(u8 part, u16 inst, u16 cdoffs) in omap4_cminst_clkdm_disable_hwsup() argument
236 _clktrctrl_write(OMAP34XX_CLKSTCTRL_DISABLE_AUTO, part, inst, cdoffs); in omap4_cminst_clkdm_disable_hwsup()
241 * @part: PRCM partition ID that the clockdomain registers exist in
245 * Take a clockdomain referred to by (@part, @inst, @cdoffs) out of idle,
248 static void omap4_cminst_clkdm_force_wakeup(u8 part, u16 inst, u16 cdoffs) in omap4_cminst_clkdm_force_wakeup() argument
250 _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_WAKEUP, part, inst, cdoffs); in omap4_cminst_clkdm_force_wakeup()
257 static void omap4_cminst_clkdm_force_sleep(u8 part, u16 inst, u16 cdoffs) in omap4_cminst_clkdm_force_sleep() argument
259 _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_SLEEP, part, inst, cdoffs); in omap4_cminst_clkdm_force_sleep()
264 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
274 static int omap4_cminst_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, in omap4_cminst_wait_module_ready() argument
279 omap_test_timeout(_is_module_ready(part, inst, clkctrl_offs), in omap4_cminst_wait_module_ready()
288 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
297 static int omap4_cminst_wait_module_idle(u8 part, s16 inst, u16 clkctrl_offs, in omap4_cminst_wait_module_idle() argument
302 omap_test_timeout((_clkctrl_idlest(part, inst, clkctrl_offs) == in omap4_cminst_wait_module_idle()
312 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
318 static void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, in omap4_cminst_module_enable() argument
323 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs); in omap4_cminst_module_enable()
326 omap4_cminst_write_inst_reg(v, part, inst, clkctrl_offs); in omap4_cminst_module_enable()
331 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
337 static void omap4_cminst_module_disable(u8 part, u16 inst, u16 clkctrl_offs) in omap4_cminst_module_disable() argument
341 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs); in omap4_cminst_module_disable()
343 omap4_cminst_write_inst_reg(v, part, inst, clkctrl_offs); in omap4_cminst_module_disable()
476 static u32 omap4_cminst_xlate_clkctrl(u8 part, u16 inst, u16 offset) in omap4_cminst_xlate_clkctrl() argument
478 return _cm_bases[part].pa + inst + offset; in omap4_cminst_xlate_clkctrl()