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

Skip to content
Commit b7f6a688 authored by Stephen Boyd's avatar Stephen Boyd
Browse files

msm: clock: Support clk_prepare/unprepare()



Fill in the boiler plate prepare()/unprepare() code. Add a
prepare count and a prepare lock to protect the prepare/unprepare
paths. Also handle the parent/child relationship similarly to how
enable/disable is done.

In particular, WARN() whenever a driver calls clk_enable() before
calling clk_prepare() and whenever a driver calls clk_unprepare()
before calling clk_disable(). This should catch a few bugs even
though it's technically not SMP safe if an enable call is racing
with an unprepare call for example.

We also mark PLLs and XOs as already warned since those are
mostly internal clocks that driver authors aren't aware of. The
markings will be removed when the local clock driver is updated
to handle prepare/unprepare in another patch.

Change-Id: I41dd39d27a279f3477c6e1cef292ac5308d65243
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 3bbf3462ee55a3a0ad48c50214f6263401fc9265)

Conflicts:

	arch/arm/mach-msm/clock-7x30.c
	arch/arm/mach-msm/clock-8960.c
	arch/arm/mach-msm/clock-8x60.c
	arch/arm/mach-msm/clock-9615.c
	arch/arm/mach-msm/clock-debug.c
	arch/arm/mach-msm/clock-rpm.h
	arch/arm/mach-msm/clock.c
	arch/arm/mach-msm/clock.h
parent af4a9e55
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