clk: meson: g12a: Prepare the GPU clock tree to change at runtime
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 14 Apr 2020 19:50:31 +0000 (21:50 +0200)
committerJerome Brunet <jbrunet@baylibre.com>
Thu, 16 Apr 2020 10:23:05 +0000 (12:23 +0200)
commit6dde0ae30a9a883778154f8377ed50a2c7752211
tree4ba361323e1f992b22078b735d58141564349216
parent5c2602e5fcefa5a581ce20521552d7d446a3a9aa
clk: meson: g12a: 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-3-martin.blumenstingl@googlemail.com
drivers/clk/meson/g12a.c