Lines Matching refs:clk

17 static ulong imxrt1020_clk_get_rate(struct clk *clk)  in imxrt1020_clk_get_rate()  argument
19 struct clk *c; in imxrt1020_clk_get_rate()
22 debug("%s(#%lu)\n", __func__, clk->id); in imxrt1020_clk_get_rate()
24 ret = clk_get_by_id(clk->id, &c); in imxrt1020_clk_get_rate()
31 static ulong imxrt1020_clk_set_rate(struct clk *clk, unsigned long rate) in imxrt1020_clk_set_rate() argument
33 struct clk *c; in imxrt1020_clk_set_rate()
36 debug("%s(#%lu), rate: %lu\n", __func__, clk->id, rate); in imxrt1020_clk_set_rate()
38 ret = clk_get_by_id(clk->id, &c); in imxrt1020_clk_set_rate()
45 static int __imxrt1020_clk_enable(struct clk *clk, bool enable) in __imxrt1020_clk_enable() argument
47 struct clk *c; in __imxrt1020_clk_enable()
50 debug("%s(#%lu) en: %d\n", __func__, clk->id, enable); in __imxrt1020_clk_enable()
52 ret = clk_get_by_id(clk->id, &c); in __imxrt1020_clk_enable()
64 static int imxrt1020_clk_disable(struct clk *clk) in imxrt1020_clk_disable() argument
66 return __imxrt1020_clk_enable(clk, 0); in imxrt1020_clk_disable()
69 static int imxrt1020_clk_enable(struct clk *clk) in imxrt1020_clk_enable() argument
71 return __imxrt1020_clk_enable(clk, 1); in imxrt1020_clk_enable()
186 struct clk *clk, *clk1; in imxrt1020_clk_probe() local
189 clk_get_by_id(IMXRT1020_CLK_SEMC_ALT_SEL, &clk); in imxrt1020_clk_probe()
190 clk_set_parent(clk1, clk); in imxrt1020_clk_probe()
193 clk_get_by_id(IMXRT1020_CLK_PLL3_USB_OTG, &clk); in imxrt1020_clk_probe()
194 clk_enable(clk); in imxrt1020_clk_probe()
195 clk_set_rate(clk, 480000000UL); in imxrt1020_clk_probe()
198 clk_set_parent(clk1, clk); in imxrt1020_clk_probe()
200 clk_get_by_id(IMXRT1020_CLK_PLL2_PFD3_297M, &clk); in imxrt1020_clk_probe()
201 clk_set_rate(clk, 297000000UL); in imxrt1020_clk_probe()
203 clk_get_by_id(IMXRT1020_CLK_PLL2_SYS, &clk); in imxrt1020_clk_probe()
204 clk_enable(clk); in imxrt1020_clk_probe()
205 clk_set_rate(clk, 528000000UL); in imxrt1020_clk_probe()
208 clk_set_parent(clk1, clk); in imxrt1020_clk_probe()