diff mbox

clk: sunxi-ng: sun5i: Add clk_set_rate_parent to the CPU clock

Message ID 20170721161935.18411-1-maxime.ripard@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maxime Ripard July 21, 2017, 4:19 p.m. UTC
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>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 drivers/clk/sunxi-ng/ccu-sun5i.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chen-Yu Tsai July 22, 2017, 2:23 a.m. UTC | #1
On Sat, Jul 22, 2017 at 12:19 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> 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>
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Acked-by: Chen-Yu Tsai <wens@csie.org>
Maxime Ripard July 24, 2017, 9:37 a.m. UTC | #2
On Sat, Jul 22, 2017 at 10:23:19AM +0800, Chen-Yu Tsai wrote:
> On Sat, Jul 22, 2017 at 12:19 AM, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > 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>
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> 
> Acked-by: Chen-Yu Tsai <wens@csie.org>

Applied as a fix, thanks!
Maxime
diff mbox

Patch

diff --git a/drivers/clk/sunxi-ng/ccu-sun5i.c b/drivers/clk/sunxi-ng/ccu-sun5i.c
index 5372bf8be5e6..31d7ffda9aab 100644
--- a/drivers/clk/sunxi-ng/ccu-sun5i.c
+++ b/drivers/clk/sunxi-ng/ccu-sun5i.c
@@ -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),
 	}
 };