clk: meson: gxbb: Prepare the GPU clock tree to change at runtime
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 14 Apr 2020 19:50:30 +0000 (21:50 +0200)
committerJerome Brunet <jbrunet@baylibre.com>
Thu, 16 Apr 2020 10:23:05 +0000 (12:23 +0200)
commit5c2602e5fcefa5a581ce20521552d7d446a3a9aa
tree3ee05a0edbb96e51c1d761f76256eabcf4d0e0b8
parentf0e0884acf8a5cbd8862834bbd5b7a1db284966b
clk: meson: gxbb: Prepare the GPU clock tree to change at runtime

The "mali_0" or "mali_1" clock trees should not be updated while the
clock is running. Enforce this by setting CLK_SET_RATE_GATE on the
"mali_0" and "mali_1" gates. This makes the CCF switch to the "mali_1"
tree when "mali_0" is currently active and vice versa, which is exactly
what the vendor driver does when updating the frequency of the mali
clock.
Also propagate set_rate requests from the gate to the divider and from
the divider to the the mux so the GPU clock frequency can be updated at
runtime (which will be required for GPU DVFS). Don't propagate rate
changes to the mux parents because we don't want to change the MPLL
clocks (these are reserved for audio).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20200414195031.224021-2-martin.blumenstingl@googlemail.com
drivers/clk/meson/gxbb.c