[PATCH 05/11] OMAP2+: clockdomains: split the clkdm hwsup enable/disable function

Kevin Hilman khilman at deeprootsystems.com
Wed Dec 8 18:12:26 EST 2010


Paul Walmsley <paul at pwsan.com> writes:

> Split _omap2_clkdm_set_hwsup() into _disable_hwsup() and _enable_hwsup().
>
> While here, also document that the autodeps are deprecated and that they
> should be removed at the earliest opportunity.
>
> Signed-off-by: Paul Walmsley <paul at pwsan.com>
[...]

> @@ -222,28 +231,50 @@ static void _clkdm_del_autodeps(struct clockdomain *clkdm)
>  	}
>  }
>  
> -/*
> - * _omap2_clkdm_set_hwsup - set the hwsup idle transition bit
> +/**
> + * _enable_hwsup - set the hwsup idle transition bit
> + * @clkdm: struct clockdomain *
> + *
> + * XXX fix doco

hmm, 'doco' must be a new lingo I haven't learned yet.

> + * Internal helper for actually switching the bit that controls hwsup
> + * idle transitions for clkdm.
> + */
> +static void _enable_hwsup(struct clockdomain *clkdm)
> +{
> +	u32 bits, v;
> +
> +	if (cpu_is_omap24xx())
> +		bits = OMAP24XX_CLKSTCTRL_ENABLE_AUTO;
> +	else if (cpu_is_omap34xx() || cpu_is_omap44xx())
> +		bits = OMAP34XX_CLKSTCTRL_ENABLE_AUTO;
> +	else
> +		BUG();
> +
> +	bits = bits << __ffs(clkdm->clktrctrl_mask);
> +
> +	v = __raw_readl(clkdm->clkstctrl_reg);
> +	v &= ~(clkdm->clktrctrl_mask);
> +	v |= bits;
> +	__raw_writel(v, clkdm->clkstctrl_reg);
> +
> +}
> +
> +/**
> + * _disable_hwsup - set the hwsup idle transition bit
>   * @clkdm: struct clockdomain *
> - * @enable: int 0 to disable, 1 to enable
>   *
> + * XXX fix doco

here too

Kevin



More information about the linux-arm-kernel mailing list