Commit graph

4 commits

Author SHA1 Message Date
Jernej Škrabec 1d42460a49 clk: sunxi-ng: Wait for lock when using fractional mode
Currently ccu_frac_helper_set_rate() doesn't wait for a lock bit to be
set before returning. Because of that, unstable clock may be used.

Add a wait for lock in the helper function.

Fixes: 89a3dfb787 ("clk: sunxi-ng: Add fractional lib")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-01 10:18:23 +08:00
Jernej Škrabec b655f36e20 clk: sunxi-ng: Make fractional helper less chatty
ccu_frac_helper_read_rate() prints some info which is not really
helpful except during debugging.

Replace printk() with pr_debug().

Fixes: 89a3dfb787 ("clk: sunxi-ng: Add fractional lib")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2017-08-01 10:18:23 +08:00
Maxime Ripard a501a14e38 clk: sunxi-ng: Rename the internal structures
Rename the structures meant to be embedded in other structures to make it
consistent with the mux structure name

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
2016-10-20 19:24:20 +02:00
Maxime Ripard 89a3dfb787 clk: sunxi-ng: Add fractional lib
Some clocks can be switched to a mode called fractional that have two fixed
output rate you can choose from.

Add a small library to deal with those clocks.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/20160629190535.11855-4-maxime.ripard@free-electrons.com
2016-07-08 18:04:35 -07:00