clk: sunxi: Propagate rate changes to parent for mux clocks
authorChen-Yu Tsai <wens@csie.org>
Tue, 6 Jan 2015 02:35:12 +0000 (10:35 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 6 Jan 2015 16:00:15 +0000 (17:00 +0100)
The cpu clock on sunxi machines is just a mux clock, which is normally
fed by the main PLL, but can be muxed to the main or low power oscillator.

Make the mux clock propagate rate changes to its parent, so we can
change the clock rate of the PLL, and thus actually implement rate
changing on the cpu clock.

This patch also removes the no reparenting limit.

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

index 9ba2c5ff2aeb9fa5f52e69be4fc7ac8a10bdf4b7..04e0b334c678c4b7324cf71fadb44cef5c7194ea 100644 (file)
@@ -778,7 +778,7 @@ static void __init sunxi_mux_clk_setup(struct device_node *node,
        of_property_read_string(node, "clock-output-names", &clk_name);
 
        clk = clk_register_mux(NULL, clk_name, parents, i,
-                              CLK_SET_RATE_NO_REPARENT, reg,
+                              CLK_SET_RATE_PARENT, reg,
                               data->shift, SUNXI_MUX_GATE_WIDTH,
                               0, &clk_lock);