Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ddc25e71 authored by Matt Wagantall's avatar Matt Wagantall Committed by Stephen Boyd
Browse files

msm: clock: Rewrite clock handoff support



The previous handoff implementation had two limitations:

 1) Handed-off clocks are left in the prepared state forever since
    only the enable count is handed-off during clk_enable().

 2) The clock will turn off when the first driver that uses it
    calls clk_disable(). This is a problem if two drivers share
    a clock and both depend on it being enabled they have
    initialized and asserted their own votes for it.

Resolve both of these with a new handoff implementation that
leaves all clocks that were handed off (ex. handoff functions
returned HANDOFF_ENABLED_CLK) both prepared and enabled until
lateinit. As a consequence, handed-off clocks cannot be disabled
until then.

To avoid causing problems for the GFX2D cores, CLKFLAG_SKIP_HANDOFF
is introduced to prevent handoff of GFX2D clocks. This is required
because the footswitch-8x60 driver requires these clocks be off at
some points during boot while it asserts asynchronous resets to
the cores. If handoff was allowed to hold these clocks on, these
resets would fail.

Change-Id: I1ca7af6bed58e595cdad77923ea0614f456617ab
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent 71a2b208
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment