]> git.baikalelectronics.ru Git - kernel.git/commit
clk: tegra: Fix disable unused for clocks sharing enable bit
authorPeter De Schrijver <pdeschrijver@nvidia.com>
Thu, 2 Mar 2017 13:22:05 +0000 (15:22 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 20 Mar 2017 13:13:52 +0000 (14:13 +0100)
commitefb61c52f32233d84bfb7dcf1edd457dfa42558f
tree00cf3a65beb868160656d2d73e9bbd5256aa26a2
parent69f5d8114769681daf0f6d9acd3487f9a0eaf7f6
clk: tegra: Fix disable unused for clocks sharing enable bit

In case 2 clocks share an enable bit and one of them is enabled by a
driver and the other one is not, CCF will think it's enabled because it
will only look at the HW state. Therefore it will disable the clock and
thus also disable the other clock which was enabled. Solve this by
reading the initial state of the enable bit and incrementing the
refcount if it's set.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/clk/tegra/clk-periph-gate.c