clk: meson: meson8b: make the CCF use the glitch-free mali mux
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Thu, 26 Dec 2019 19:12:23 +0000 (20:12 +0100)
committerJerome Brunet <jbrunet@baylibre.com>
Tue, 7 Jan 2020 10:30:50 +0000 (11:30 +0100)
commit8daeaea99caabe24a0929fac17977ebfb882fa86
treebe125acd04fd0b27b5658272a4b3bd546101a08f
parentc97fcd8546c0c2a9e8e0512f501b1ca9aa25efdc
clk: meson: meson8b: make the CCF use the glitch-free mali mux

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.

This fixes a potential hang when changing the GPU frequency at runtime.

Fixes: 74e1f2521f16ff ("clk: meson: meson8b: add the GPU clock tree")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
drivers/clk/meson/meson8b.c