[PATCH 06/11] ARM: OMAP3: CM/PM: add API for forcing IVA2 clk enable/disable

Paul Walmsley paul at pwsan.com
Sat Oct 19 13:30:28 EDT 2013


On Fri, 11 Oct 2013, Tero Kristo wrote:

> OMAP3 PM code directly writes to CM register space to enable/disable IVA2
> clock during boot during the IVA2 reset. Direct access shall be avoided,
> thus implement an API call for this, and change the PM core to use this.
> 
> Signed-off-by: Tero Kristo <t-kristo at ti.com>
> ---
>  arch/arm/mach-omap2/cm3xxx.c |   10 ++++++++++
>  arch/arm/mach-omap2/cm3xxx.h |    1 +
>  arch/arm/mach-omap2/pm34xx.c |    7 +++----
>  3 files changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/cm3xxx.c b/arch/arm/mach-omap2/cm3xxx.c
> index f13742b..55bf939 100644
> --- a/arch/arm/mach-omap2/cm3xxx.c
> +++ b/arch/arm/mach-omap2/cm3xxx.c
> @@ -686,6 +686,16 @@ u32 omap3_cm_write_module_clken(s16 module, u8 regs, bool fck, u32 val)
>  	return omap3_cm_access_module_clken(module, regs, fck, val, true);
>  }
>  
> +void omap3_cm_force_iva_clk(bool enable)
> +{
> +	u32 val = 0;
> +
> +	if (enable)
> +		val = OMAP3430_CM_FCLKEN_IVA2_EN_IVA2_MASK;
> +
> +	omap2_cm_write_mod_reg(val, OMAP3430_IVA2_MOD, CM_FCLKEN);
> +}
> +

Please implement this as a generic clockdomain API that can be called for 
any clockdomain.


- Paul



More information about the linux-arm-kernel mailing list