clk: sunxi-ng: fix PLL_CPUX adjusting on H3
authorOndrej Jirman <megous@megous.com>
Fri, 25 Nov 2016 00:28:47 +0000 (01:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Oct 2017 08:26:02 +0000 (10:26 +0200)
commitaa07a2ccc80d4a0fbb402e9eb2ba3912a45af807
treeea49e4b246405fb89748f2e76fc60877d347454d
parent299b924c1f20fc428221bce79c5318684af79347
clk: sunxi-ng: fix PLL_CPUX adjusting on H3

[ Upstream commit a43c96427e713bea94e9ef50e8be1f493afc0691 ]

When adjusting PLL_CPUX on H3, the PLL is temporarily driven
too high, and the system becomes unstable (oopses or hangs).

Add a notifier to avoid this situation by temporarily switching
to a known stable 24 MHz oscillator.

Signed-off-by: Ondrej Jirman <megous@megous.com>
Tested-by: Lutz Sammer <johns98@gmx.net>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/sunxi-ng/ccu-sun8i-h3.c