Merge "msm: clock: Fix hardware clock gating detection for mdp_axi_clk" into msm-3.4
diff --git a/arch/arm/mach-msm/clock-debug.c b/arch/arm/mach-msm/clock-debug.c
index 7263512..9ebba2b 100644
--- a/arch/arm/mach-msm/clock-debug.c
+++ b/arch/arm/mach-msm/clock-debug.c
@@ -58,7 +58,7 @@
int ret, is_hw_gated;
/* Check to see if the clock is in hardware gating mode */
- if (clock->flags & CLKFLAG_HWCG)
+ if (clock->ops->in_hwcg_mode)
is_hw_gated = clock->ops->in_hwcg_mode(clock);
else
is_hw_gated = 0;
@@ -134,7 +134,10 @@
static int clock_debug_hwcg_get(void *data, u64 *val)
{
struct clk *clock = data;
- *val = !!(clock->flags & CLKFLAG_HWCG);
+ if (clock->ops->in_hwcg_mode)
+ *val = !!clock->ops->in_hwcg_mode(clock);
+ else
+ *val = 0;
return 0;
}
diff --git a/arch/arm/mach-msm/clock-local.c b/arch/arm/mach-msm/clock-local.c
index 51e5703..2df1cd1 100644
--- a/arch/arm/mach-msm/clock-local.c
+++ b/arch/arm/mach-msm/clock-local.c
@@ -563,11 +563,8 @@
{
if (!branch_in_hwcg_mode(b)) {
b->hwcg_mask = 0;
- c->flags &= ~CLKFLAG_HWCG;
if (b->ctl_reg && readl_relaxed(b->ctl_reg) & b->en_mask)
return HANDOFF_ENABLED_CLK;
- } else {
- c->flags |= CLKFLAG_HWCG;
}
return HANDOFF_DISABLED_CLK;
}
diff --git a/arch/arm/mach-msm/clock.h b/arch/arm/mach-msm/clock.h
index d236e13..ff0e973 100644
--- a/arch/arm/mach-msm/clock.h
+++ b/arch/arm/mach-msm/clock.h
@@ -29,7 +29,6 @@
#define CLKFLAG_NOINVERT 0x00000002
#define CLKFLAG_NONEST 0x00000004
#define CLKFLAG_NORESET 0x00000008
-#define CLKFLAG_HWCG 0x00000020
#define CLKFLAG_RETAIN 0x00000040
#define CLKFLAG_NORETAIN 0x00000080
#define CLKFLAG_SKIP_HANDOFF 0x00000100