Lines Matching full:pfd
15 * struct clk_pfd - IMX PFD clock
17 * @reg: PFD register address
18 * @idx: the index of PFD encoded in the register
20 * PFD clock found on i.MX6 series. Each register for PFD has 4 clk_pfd
38 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_enable() local
40 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + CLR); in clk_pfd_enable()
47 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_disable() local
49 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + SET); in clk_pfd_disable()
55 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_recalc_rate() local
57 u8 frac = (readl_relaxed(pfd->reg) >> (pfd->idx * 8)) & 0x3f; in clk_pfd_recalc_rate()
88 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_set_rate() local
100 writel_relaxed(0x3f << (pfd->idx * 8), pfd->reg + CLR); in clk_pfd_set_rate()
101 writel_relaxed(frac << (pfd->idx * 8), pfd->reg + SET); in clk_pfd_set_rate()
108 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_is_enabled() local
110 if (readl_relaxed(pfd->reg) & (1 << ((pfd->idx + 1) * 8 - 1))) in clk_pfd_is_enabled()
128 struct clk_pfd *pfd; in imx_clk_hw_pfd() local
133 pfd = kzalloc(sizeof(*pfd), GFP_KERNEL); in imx_clk_hw_pfd()
134 if (!pfd) in imx_clk_hw_pfd()
137 pfd->reg = reg; in imx_clk_hw_pfd()
138 pfd->idx = idx; in imx_clk_hw_pfd()
146 pfd->hw.init = &init; in imx_clk_hw_pfd()
147 hw = &pfd->hw; in imx_clk_hw_pfd()
151 kfree(pfd); in imx_clk_hw_pfd()