[PATCHv11 1/8] ARM: OMAP2+: hwmod: Add API to enable IO ring wakeup.

Paul Walmsley paul at pwsan.com
Tue Dec 13 16:33:43 EST 2011


Hi Govindraj, Tero,

another question about this patch:

On Tue, 13 Dec 2011, Paul Walmsley wrote:

> diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
> index 207a2ff..ec19841 100644
> --- a/arch/arm/mach-omap2/omap_hwmod.c
> +++ b/arch/arm/mach-omap2/omap_hwmod.c
> @@ -381,6 +381,43 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
>  }
>  
>  /**
> + * _set_ioring_wakeup - enable/disable IO pad wakeup flag for dynamic muxing
> + * @oh: struct omap_hwmod *
> + * @set_wake: bool value indicating to set (true) or clear (false) wakeup enable
> + *
> + * Set or clear the I/O pad wakeup flag in the dynamic mux entries for
> + * the hwmod @oh.  This function does not change anything in the
> + * hardware.  Rather, the @oh->mux->pads_dynamic array is changed, and
> + * these settings are later written to the SCM PADCTRL registers when
> + * the hwmod is enabled or idled.  No return value.
> + *
> + * XXX Shouldn't the dynamic pad changes affect hwmod shutdown as
> + * well?
> + * XXX Shouldn't this function update the hardware SCM PADCONF registers if
> + * anything has changed?
> + */
> +static void _set_ioring_wakeup(struct omap_hwmod *oh, bool set_wake)
> +{
> +	struct omap_device_pad *pad;
> +	int j;
> +
> +	if (!oh->mux || !oh->mux->enabled)
> +		return;
> +
> +	for (j = 0; j < oh->mux->nr_pads_dynamic; j++) {
> +		pad = oh->mux->pads_dynamic[j];
> +
> +		if (!(pad->flags & OMAP_DEVICE_PAD_WAKEUP))
> +			continue;
> +
> +		if (set_wake)
> +			pad->idle |= OMAP_WAKEUP_EN;
> +		else
> +			pad->idle &= ~OMAP_WAKEUP_EN;
> +	}
> +}

It appears that this loop only affects dynamic mux entries.  Should it 
also affect static mux entries?


- Paul



More information about the linux-arm-kernel mailing list