msm: clock: Move voltage scaling to prepare/unprepare
Move the voltage calls to a sleepable context so we can avoid spinning for hundreds of microseconds with interrupts disabled waiting for a regulator to increase. This change also paves the way to making the clock driver into a real regulator consumer that uses the proper regulator APIs instead of the MSM specific rpm_vreg API. Doing this also requires us to make clk_set_rate() a sleeping call so that concurrent clk_prepare() and clk_set_rate() calls are synchronized. Making clk_set_rate() sleepable also necessitates moving the clk_set_rate() call in clock-voter.c to a sleepable context. Do that by having clock-voter aggregate and update the rate in prepare/unprepare instead of enable/disable (note that enable/disable of voter clocks implicitly calls enable/disable on the parent via generic clock code). Now that clk_set_rate() is sleeping, call clk_prepare() and clk_unprepare() in the clock-local code when a rate change requires reparenting the clock. This cleans up a problem we have where sources may be left unprepared by a clock rate switch (hence the default true warned flag for PLLs and crystals). Signed-off-by:Stephen Boyd <sboyd@codeaurora.org> (cherry picked from commit d86d1f2d) Conflicts: arch/arm/mach-msm/clock-local2.c Change-Id: Ie5bbb17537d5b33de92f8ea1c2da6070b18c14f1 Signed-off-by:
Sudhir Sharma <sudsha@codeaurora.org>
Loading
Please sign in to comment