• Home
  • Raw
  • Download

Lines Matching refs:div

32 	struct iproc_asiu_div div;  member
92 val = readl(asiu->div_base + clk->div.offset); in iproc_asiu_clk_recalc_rate()
93 if ((val & (1 << clk->div.en_shift)) == 0) { in iproc_asiu_clk_recalc_rate()
99 div_h = (val >> clk->div.high_shift) & bit_mask(clk->div.high_width); in iproc_asiu_clk_recalc_rate()
101 div_l = (val >> clk->div.low_shift) & bit_mask(clk->div.low_width); in iproc_asiu_clk_recalc_rate()
114 unsigned int div; in iproc_asiu_clk_round_rate() local
122 div = DIV_ROUND_CLOSEST(*parent_rate, rate); in iproc_asiu_clk_round_rate()
123 if (div < 2) in iproc_asiu_clk_round_rate()
126 return *parent_rate / div; in iproc_asiu_clk_round_rate()
134 unsigned int div, div_h, div_l; in iproc_asiu_clk_set_rate() local
142 val = readl(asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
143 val &= ~(1 << clk->div.en_shift); in iproc_asiu_clk_set_rate()
144 writel(val, asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
148 div = DIV_ROUND_CLOSEST(parent_rate, rate); in iproc_asiu_clk_set_rate()
149 if (div < 2) in iproc_asiu_clk_set_rate()
152 div_h = div_l = div >> 1; in iproc_asiu_clk_set_rate()
156 val = readl(asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
157 val |= 1 << clk->div.en_shift; in iproc_asiu_clk_set_rate()
159 val &= ~(bit_mask(clk->div.high_width) in iproc_asiu_clk_set_rate()
160 << clk->div.high_shift); in iproc_asiu_clk_set_rate()
161 val |= div_h << clk->div.high_shift; in iproc_asiu_clk_set_rate()
163 val &= ~(bit_mask(clk->div.high_width) in iproc_asiu_clk_set_rate()
164 << clk->div.high_shift); in iproc_asiu_clk_set_rate()
167 val &= ~(bit_mask(clk->div.low_width) << clk->div.low_shift); in iproc_asiu_clk_set_rate()
168 val |= div_l << clk->div.low_shift; in iproc_asiu_clk_set_rate()
170 val &= ~(bit_mask(clk->div.low_width) << clk->div.low_shift); in iproc_asiu_clk_set_rate()
172 writel(val, asiu->div_base + clk->div.offset); in iproc_asiu_clk_set_rate()
186 const struct iproc_asiu_div *div, in iproc_asiu_setup() argument
193 if (WARN_ON(!gate || !div)) in iproc_asiu_setup()
232 asiu_clk->div = div[i]; in iproc_asiu_setup()