clk: sunxi-ng: mux: split out the pre-divider computation code
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 17 May 2017 07:40:34 +0000 (09:40 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 7 Jun 2017 13:32:13 +0000 (15:32 +0200)
commitea8edcded581ed9bd935ef7c575b0bf58eb56c82
treeb83d69391cfe1359b0653e775e7a39b7374c72c7
parent73e3e04fc009973d55a523ece1a7261ef7a089be
clk: sunxi-ng: mux: split out the pre-divider computation code

The pre-divider retrieval code was merged into the function to apply the
current pre-divider onto the parent clock rate so that we can use that
adjusted value to do our factors computation.

However, since we'll need to do the reverse operation, we need to split out
that code into a function that will be shared.

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