clk: sunxi-ng: mux: Re-adjust parent rate
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 17 May 2017 07:40:36 +0000 (09:40 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 7 Jun 2017 13:32:14 +0000 (15:32 +0200)
commitabea24218aa9e40e504d89ac1b7c6b4588a6cd9b
tree2398c6300d531288c1babade1ab3be3ea91c11fb
parentd754b15951ffe3c85e2581eaa244ed4a82080970
clk: sunxi-ng: mux: Re-adjust parent rate

Currently, the parent rate given back to the clock framework in our
request is the original parent rate we calculated before trying to round
the rate of our clock.

This works fine unless our clock also changes its parent rate, in which
case we will simply ignore that change and still use the previous parent
rate.

Create a new function to re-adjust the parent rate to take the pre-dividers
into account, and give that back to the clock framework.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
drivers/clk/sunxi-ng/ccu_mux.c