clk: meson: meson8b: run from the XTAL when changing the CPU frequency
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Thu, 15 Nov 2018 22:40:47 +0000 (23:40 +0100)
committerNeil Armstrong <narmstrong@baylibre.com>
Fri, 23 Nov 2018 14:11:58 +0000 (15:11 +0100)
commit7dc7eeb8c0875c4bb7607509d9270ad3fd726b6b
tree03389d4cde5b28afbe2ed75a16c9d06c6ba2b0d4
parente36c7e9898f2ba34becf37bda37b70e984b0bf4e
clk: meson: meson8b: run from the XTAL when changing the CPU frequency

Changing the CPU clock requires changing various clocks including the
SYS PLL. The existing meson clk-pll and clk-regmap drivers can change
all of the relevant clocks already.
However, changing for exampe the SYS PLL is problematic because as long
as the CPU is running off a clock derived from SYS PLL changing the
latter results in a full system lockup.
Fix this system lockup by switching the CPU clock to run off the XTAL
while we are changing the any of the clocks in the CPU clock tree.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lkml.kernel.org/r/20181115224048.13511-6-martin.blumenstingl@googlemail.com
drivers/clk/meson/meson8b.c