]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
clk: pistachio: Lock the PLL when enabled upon rate change
authorEzequiel Garcia <ezequiel.garcia@imgtec.com>
Tue, 26 May 2015 22:01:08 +0000 (19:01 -0300)
committerStephen Boyd <sboyd@codeaurora.org>
Thu, 4 Jun 2015 19:43:33 +0000 (12:43 -0700)
commite0b7a79524771ad368abefbbcbd73f130f8e500e
tree2cdb12e5ed2950199cd755ebfa5d36283eaaf0a2
parent4f4adfbf8e655914bb80daa0252c90b62fd27d78
clk: pistachio: Lock the PLL when enabled upon rate change

Currently, when the rate is changed, the driver makes sure the
PLL is enabled before doing so. This is done because the PLL
cannot be locked while disabled. Once locked, the drivers
returns the PLL to its previous enable/disable state.

This is a bit cumbersome, and can be simplified.

This commit reworks the .set_rate() functions for the integer
and fractional PLLs. Upon rate change, the PLL is now locked
only if it's already enabled.

Also, the driver locks the PLL on .enable(). This makes sure
the PLL is locked when enabled, and not locked when disabled.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/pistachio/clk-pll.c