diff options
author | Jason Liu <r64343@freescale.com> | 2014-10-14 09:06:31 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2014-10-14 09:10:21 +0800 |
commit | 12832393ecb2558948abb2894c988ec16a2d10a0 (patch) | |
tree | 067858837cc270408d915c6032ba254518f58dd4 /arch | |
parent | 56c87a201946e4582de2f574c218e43c4db7fadb (diff) |
Revert "ARM: imx: fix .is_enabled() of shared gate clock"
This reverts commit 920fa48dd74b158e8a359cc546cf9f6cbfcd95a9.
[Beta2 release does not include Bug fix patches]
Signed-off-by: Jason Liu <r64343@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/clk-gate2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/clk-gate2.c b/arch/arm/mach-imx/clk-gate2.c index bf6a4ecbff2d..1627033d2f32 100644 --- a/arch/arm/mach-imx/clk-gate2.c +++ b/arch/arm/mach-imx/clk-gate2.c @@ -98,7 +98,7 @@ static int clk_gate2_is_enabled(struct clk_hw *hw) struct clk_gate2 *gate = to_clk_gate2(hw); if (gate->share_count) - return !!__clk_get_enable_count(hw->clk); + return !!(*gate->share_count); else return clk_gate2_reg_is_enabled(gate->reg, gate->bit_idx); } @@ -128,6 +128,10 @@ struct clk *clk_register_gate2(struct device *dev, const char *name, gate->bit_idx = bit_idx; gate->flags = clk_gate2_flags; gate->lock = lock; + + /* Initialize share_count per hardware state */ + if (share_count) + *share_count = clk_gate2_reg_is_enabled(reg, bit_idx) ? 1 : 0; gate->share_count = share_count; init.name = name; |