Lines Matching refs:aux

12 #define pr_fmt(fmt) "clk-aux-synth: " fmt
47 struct clk_aux *aux = to_clk_aux(hw);
48 struct aux_rate_tbl *rtbl = aux->rtbl;
58 struct clk_aux *aux = to_clk_aux(hw);
62 aux->rtbl_cnt, &unused);
68 struct clk_aux *aux = to_clk_aux(hw);
72 if (aux->lock)
73 spin_lock_irqsave(aux->lock, flags);
75 val = readl_relaxed(aux->reg);
77 if (aux->lock)
78 spin_unlock_irqrestore(aux->lock, flags);
80 eqn = (val >> aux->masks->eq_sel_shift) & aux->masks->eq_sel_mask;
81 if (eqn == aux->masks->eq1_mask)
85 num = (val >> aux->masks->xscale_sel_shift) &
86 aux->masks->xscale_sel_mask;
89 den *= (val >> aux->masks->yscale_sel_shift) &
90 aux->masks->yscale_sel_mask;
98 /* Configures new clock rate of aux */
102 struct clk_aux *aux = to_clk_aux(hw);
103 struct aux_rate_tbl *rtbl = aux->rtbl;
107 clk_round_rate_index(hw, drate, prate, aux_calc_rate, aux->rtbl_cnt,
110 if (aux->lock)
111 spin_lock_irqsave(aux->lock, flags);
113 val = readl_relaxed(aux->reg) &
114 ~(aux->masks->eq_sel_mask << aux->masks->eq_sel_shift);
115 val |= (rtbl[i].eq & aux->masks->eq_sel_mask) <<
116 aux->masks->eq_sel_shift;
117 val &= ~(aux->masks->xscale_sel_mask << aux->masks->xscale_sel_shift);
118 val |= (rtbl[i].xscale & aux->masks->xscale_sel_mask) <<
119 aux->masks->xscale_sel_shift;
120 val &= ~(aux->masks->yscale_sel_mask << aux->masks->yscale_sel_shift);
121 val |= (rtbl[i].yscale & aux->masks->yscale_sel_mask) <<
122 aux->masks->yscale_sel_shift;
123 writel_relaxed(val, aux->reg);
125 if (aux->lock)
126 spin_unlock_irqrestore(aux->lock, flags);
142 struct clk_aux *aux;
151 aux = kzalloc(sizeof(*aux), GFP_KERNEL);
152 if (!aux)
157 aux->masks = &default_aux_masks;
159 aux->masks = masks;
161 aux->reg = reg;
162 aux->rtbl = rtbl;
163 aux->rtbl_cnt = rtbl_cnt;
164 aux->lock = lock;
165 aux->hw.init = &init;
173 clk = clk_register(NULL, &aux->hw);
182 aux->masks->enable_bit, 0, lock);
193 kfree(aux);