Stéphan Rafin ac95330b96 clk: sunxi: Fix M factor computation for APB1
commit cfa636886033 ("clk: sunxi: factors: Consolidate get_factors
parameters into a struct") introduced a regression for m factor
computation in sun4i_get_apb1_factors function.

The old code reassigned the "parent_rate" parameter to the targeted
divisor value and was buggy for the returned frequency but not for the
computed factors. Now, returned frequency is good but m factor is
incorrectly computed (its max value 31 is always set resulting in a
significantly slower frequency than the requested one...)

This patch simply restores the original proper computation for m while
keeping the good changes for returned rate.

Fixes: cfa636886033 ("clk: sunxi: factors: Consolidate get_factors parameters into a struct")
Signed-off-by: Stéphan Rafin <stephan@soliotek.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2016-11-04 08:49:46 +01:00
..
2016-09-20 17:03:04 -07:00
2016-10-07 21:16:16 -07:00
2016-10-07 21:34:49 -07:00
2016-10-07 21:23:40 -07:00
2016-03-02 17:44:59 -08:00
2016-09-16 16:19:50 -07:00
2016-04-15 16:50:04 -07:00
2016-03-02 17:46:55 -08:00
2016-08-01 18:37:45 -04:00
2016-07-12 11:24:07 +02:00
2016-03-02 17:48:26 -08:00
2016-07-06 17:55:31 -07:00
2016-09-14 13:54:35 -07:00