]> git.baikalelectronics.ru Git - kernel.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)
commita809a2a34268ea1332ce79a03b0d3e6b88f2b9da
tree2cdb12e5ed2950199cd755ebfa5d36283eaaf0a2
parent154113a0e665a430f3ca4810724da42adbb11fc0
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