Lines Matching refs:clk

69 aw_clk_m_init(struct clknode *clk, device_t dev)  in aw_clk_m_init()  argument
74 sc = clknode_get_softc(clk); in aw_clk_m_init()
78 DEVICE_LOCK(clk); in aw_clk_m_init()
79 READ4(clk, sc->offset, &val); in aw_clk_m_init()
80 DEVICE_UNLOCK(clk); in aw_clk_m_init()
85 clknode_init_parent_idx(clk, idx); in aw_clk_m_init()
90 aw_clk_m_set_gate(struct clknode *clk, bool enable) in aw_clk_m_set_gate() argument
95 sc = clknode_get_softc(clk); in aw_clk_m_set_gate()
100 DEVICE_LOCK(clk); in aw_clk_m_set_gate()
101 READ4(clk, sc->offset, &val); in aw_clk_m_set_gate()
106 WRITE4(clk, sc->offset, val); in aw_clk_m_set_gate()
107 DEVICE_UNLOCK(clk); in aw_clk_m_set_gate()
113 aw_clk_m_set_mux(struct clknode *clk, int index) in aw_clk_m_set_mux() argument
118 sc = clknode_get_softc(clk); in aw_clk_m_set_mux()
123 DEVICE_LOCK(clk); in aw_clk_m_set_mux()
124 READ4(clk, sc->offset, &val); in aw_clk_m_set_mux()
127 WRITE4(clk, sc->offset, val); in aw_clk_m_set_mux()
128 DEVICE_UNLOCK(clk); in aw_clk_m_set_mux()
161 aw_clk_m_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, in aw_clk_m_set_freq() argument
169 sc = clknode_get_softc(clk); in aw_clk_m_set_freq()
176 p_clk = clknode_get_parent(clk); in aw_clk_m_set_freq()
180 clknode_get_name(clk)); in aw_clk_m_set_freq()
206 DEVICE_LOCK(clk); in aw_clk_m_set_freq()
207 READ4(clk, sc->offset, &val); in aw_clk_m_set_freq()
213 WRITE4(clk, sc->offset, val); in aw_clk_m_set_freq()
214 DEVICE_UNLOCK(clk); in aw_clk_m_set_freq()
223 aw_clk_m_recalc(struct clknode *clk, uint64_t *freq) in aw_clk_m_recalc() argument
228 sc = clknode_get_softc(clk); in aw_clk_m_recalc()
230 DEVICE_LOCK(clk); in aw_clk_m_recalc()
231 READ4(clk, sc->offset, &val); in aw_clk_m_recalc()
232 DEVICE_UNLOCK(clk); in aw_clk_m_recalc()
257 struct clknode *clk; in aw_clk_m_register() local
260 clk = clknode_create(clkdom, &aw_m_clknode_class, &clkdef->clkdef); in aw_clk_m_register()
261 if (clk == NULL) in aw_clk_m_register()
264 sc = clknode_get_softc(clk); in aw_clk_m_register()
281 clknode_register(clkdom, clk); in aw_clk_m_register()