clk: msm: gdsc: Check gdsc state before disabling the root clock
The regulator framework uses the is_enabled callback to decide
if the gdsc is on/off. In the case of the mmagic gdscs, since
they are left enabled before kernel boot, this call returns
true even though HLOS hasnt voted for the gdscs itself. This
leads to the next call to disable the gdsc to pass though the
regulator framework. The core clock is disabled in the gdsc
code having assumed that is was enabled during the gdsc enable
call which in reality never happened. This leads to falsely
turning off the core clock. Make a change to disable the clock
only if gdsc_enable was called prior to gdsc_disable.
In addition, make a separate voter for the mmssnoc_axi RPM
resource which the gdsc driver can use exclusively.
CRs-Fixed: 876297
Change-Id: I1c7af5046e599eb3ffecd9283ba9ebc4ed340703
Signed-off-by:
Deepak Katragadda <dkatraga@codeaurora.org>
Loading
Please register or sign in to comment