[PATCH 03/16] clk: sunxi-ng: Add fixed factor clock support

Jean-Francois Moine moinejf at free.fr
Mon May 16 06:15:01 PDT 2016


On Mon, 9 May 2016 18:05:20 +0800
Chen-Yu Tsai <wens at csie.org> wrote:

> > +}
> > +
> > +static long ccu_fixed_factor_round_rate(struct clk_hw *hw,
> > +                                       unsigned long rate,
> > +                                       unsigned long *parent_rate)
> > +{
> > +       struct ccu_fixed_factor *fix = hw_to_ccu_fixed_factor(hw);
> > +
> > +       return *parent_rate / fix->div * fix->mult;
> 
> Why is this the other way around? With integer math it shouldn't be
> interchangeable. (Though it seems clk_fixed_factor does the same...)
> 
> Also, clk_fixed_factor handles CLK_SET_RATE_PARENT. Do we need to do the
> same here?

Agree. Otherwise, sound in the H3 does not work.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/



More information about the linux-arm-kernel mailing list