clk: sunxi-ng: sun5i: Add clk_set_rate_parent to the CPU clock
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 21 Jul 2017 16:19:35 +0000 (18:19 +0200)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Mon, 24 Jul 2017 09:37:04 +0000 (11:37 +0200)
The current CPU clock is missing the option to change the rate of its
parents, leading to improper rates calculated by cpufreq, and eventually
crashes.

Cc: <stable@vger.kernel.org>
Fixes: 5e73761786d6 ("clk: sunxi-ng: Add sun5i CCU driver")
Reported-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/clk/sunxi-ng/ccu-sun5i.c

index 5372bf8..31d7ffd 100644 (file)
@@ -184,7 +184,7 @@ static struct ccu_mux cpu_clk = {
                .hw.init        = CLK_HW_INIT_PARENTS("cpu",
                                                      cpu_parents,
                                                      &ccu_mux_ops,
-                                                     CLK_IS_CRITICAL),
+                                                     CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
        }
 };