diff options
author | Roger Quadros <rogerq@ti.com> | 2017-03-17 10:58:18 +0200 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2017-03-23 13:19:59 -0700 |
commit | 8ff42da411474893ae373d4280ea88954fa97fcc (patch) | |
tree | cdf50dc9abaa194cb004790436290566512d4d66 /arch/arm/mach-omap2/omap_hwmod.c | |
parent | 390c06828dd22549706946113a0783cb8e2a3240 (diff) | |
download | linux-8ff42da411474893ae373d4280ea88954fa97fcc.tar.bz2 |
ARM: OMAP2+ hwmod: Allow modules to disable HW_AUTO
Introduce HWMOD_CLKDM_NOAUTO flag that allows the hwmod's
clockdomain to be prevented from HW_AUTO while the hwmod is active.
This is needed to workaround some modules which don't function
correctly with HW_AUTO. e.g. DCAN on DRA7.
Signed-off-by: Roger Quadros <rogerq@ti.com>
[nsekhar@ti.com: rebased to v4.9 kernel]
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 8a4039325845..8bcea0d83fa0 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -2027,7 +2027,7 @@ static int _enable(struct omap_hwmod *oh) r = (soc_ops.wait_target_ready) ? soc_ops.wait_target_ready(oh) : -EINVAL; - if (oh->clkdm) + if (oh->clkdm && !(oh->flags & HWMOD_CLKDM_NOAUTO)) clkdm_allow_idle(oh->clkdm); if (!r) { @@ -2084,7 +2084,12 @@ static int _idle(struct omap_hwmod *oh) _idle_sysc(oh); _del_initiator_dep(oh, mpu_oh); - if (oh->clkdm) + /* + * If HWMOD_CLKDM_NOAUTO is set then we don't + * deny idle the clkdm again since idle was already denied + * in _enable() + */ + if (oh->clkdm && !(oh->flags & HWMOD_CLKDM_NOAUTO)) clkdm_deny_idle(oh->clkdm); if (oh->flags & HWMOD_BLOCK_WFI) |