Lines Matching +full:clk +full:- +full:csr
1 // SPDX-License-Identifier: GPL-2.0+
11 #include <linux/clk-provider.h>
17 #include "clk.h"
52 u32 csr; in clk_pllv4_wait_lock() local
54 return readl_poll_timeout(pll->base + PLL_CSR_OFFSET, in clk_pllv4_wait_lock()
55 csr, csr & PLL_VLD, 0, LOCK_TIMEOUT_US); in clk_pllv4_wait_lock()
62 if (readl_relaxed(pll->base) & PLL_EN) in clk_pllv4_is_prepared()
75 mult = readl_relaxed(pll->base + PLL_CFG_OFFSET); in clk_pllv4_recalc_rate()
79 mfn = readl_relaxed(pll->base + PLL_NUM_OFFSET); in clk_pllv4_recalc_rate()
80 mfd = readl_relaxed(pll->base + PLL_DENOM_OFFSET); in clk_pllv4_recalc_rate()
114 temp64 = (u64)(rate - round_rate); in clk_pllv4_round_rate()
158 return -EINVAL; in clk_pllv4_set_rate()
163 temp64 = (u64)(rate - mult * parent_rate); in clk_pllv4_set_rate()
168 val = readl_relaxed(pll->base + PLL_CFG_OFFSET); in clk_pllv4_set_rate()
171 writel_relaxed(val, pll->base + PLL_CFG_OFFSET); in clk_pllv4_set_rate()
173 writel_relaxed(mfn, pll->base + PLL_NUM_OFFSET); in clk_pllv4_set_rate()
174 writel_relaxed(mfd, pll->base + PLL_DENOM_OFFSET); in clk_pllv4_set_rate()
184 val = readl_relaxed(pll->base); in clk_pllv4_prepare()
186 writel_relaxed(val, pll->base); in clk_pllv4_prepare()
196 val = readl_relaxed(pll->base); in clk_pllv4_unprepare()
198 writel_relaxed(val, pll->base); in clk_pllv4_unprepare()
220 return ERR_PTR(-ENOMEM); in imx_clk_hw_pllv4()
222 pll->base = base; in imx_clk_hw_pllv4()
230 pll->hw.init = &init; in imx_clk_hw_pllv4()
232 hw = &pll->hw; in imx_clk_hw_pllv4()