Lines Matching full:dclk
49 struct hi6220_clk_divider *dclk = to_hi6220_clk_divider(hw); in hi6220_clkdiv_recalc_rate() local
51 val = readl_relaxed(dclk->reg) >> dclk->shift; in hi6220_clkdiv_recalc_rate()
52 val &= div_mask(dclk->width); in hi6220_clkdiv_recalc_rate()
54 return divider_recalc_rate(hw, parent_rate, val, dclk->table, in hi6220_clkdiv_recalc_rate()
55 CLK_DIVIDER_ROUND_CLOSEST, dclk->width); in hi6220_clkdiv_recalc_rate()
61 struct hi6220_clk_divider *dclk = to_hi6220_clk_divider(hw); in hi6220_clkdiv_round_rate() local
63 return divider_round_rate(hw, rate, prate, dclk->table, in hi6220_clkdiv_round_rate()
64 dclk->width, CLK_DIVIDER_ROUND_CLOSEST); in hi6220_clkdiv_round_rate()
73 struct hi6220_clk_divider *dclk = to_hi6220_clk_divider(hw); in hi6220_clkdiv_set_rate() local
75 value = divider_get_val(rate, parent_rate, dclk->table, in hi6220_clkdiv_set_rate()
76 dclk->width, CLK_DIVIDER_ROUND_CLOSEST); in hi6220_clkdiv_set_rate()
78 if (dclk->lock) in hi6220_clkdiv_set_rate()
79 spin_lock_irqsave(dclk->lock, flags); in hi6220_clkdiv_set_rate()
81 data = readl_relaxed(dclk->reg); in hi6220_clkdiv_set_rate()
82 data &= ~(div_mask(dclk->width) << dclk->shift); in hi6220_clkdiv_set_rate()
83 data |= value << dclk->shift; in hi6220_clkdiv_set_rate()
84 data |= dclk->mask; in hi6220_clkdiv_set_rate()
86 writel_relaxed(data, dclk->reg); in hi6220_clkdiv_set_rate()
88 if (dclk->lock) in hi6220_clkdiv_set_rate()
89 spin_unlock_irqrestore(dclk->lock, flags); in hi6220_clkdiv_set_rate()