summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Liu <r64343@freescale.com>2014-10-14 09:06:31 +0800
committerJason Liu <r64343@freescale.com>2014-10-14 09:10:21 +0800
commit12832393ecb2558948abb2894c988ec16a2d10a0 (patch)
tree067858837cc270408d915c6032ba254518f58dd4
parent56c87a201946e4582de2f574c218e43c4db7fadb (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>
-rw-r--r--arch/arm/mach-imx/clk-gate2.c6
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;