[PATCH 2/7] OMAP2+: mux: Enable wakeup for wakeup enable requested pads
Varadarajan, Charulatha
charu at ti.com
Tue Mar 1 23:49:58 EST 2011
Govind,
Couple of minor comments.
On Mon, Feb 28, 2011 at 20:09, Govindraj.R <govindraj.raja at ti.com> wrote:
> For device pads which have OMAP_DEVICE_PAD_WAKEUP set (which means they
> are wakeup capable) enable the IO-daisy wakeup capability.
> During re-muxing avoid direct write with val as this can disturb if any
> mux done at bootloader level so read the pad then write back.
>
> Also add a api to fetch the wake-up status bit is set for given omap-hwmod
%s/a api/an API/
> device using available mux info which is added during omap_hwmod_mux_init.
> Wakeup status bit is needed for uart_resume_idle call from sram_idle path
> based on wake-up event has occurred for given uart we can enable clocks back.
>
> Signed-off-by: Rajendra Nayak <rnayak at ti.com>
> Signed-off-by: Govindraj.R <govindraj.raja at ti.com>
> ---
> arch/arm/mach-omap2/mux.c | 23 +++++++++++++++++++++++
> arch/arm/mach-omap2/mux.h | 13 +++++++++++++
> arch/arm/mach-omap2/omap_hwmod.c | 13 +++++++++++++
> arch/arm/plat-omap/include/plat/omap_hwmod.h | 1 +
> 4 files changed, 50 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
> index 98148b6..5338b93 100644
> --- a/arch/arm/mach-omap2/mux.c
> +++ b/arch/arm/mach-omap2/mux.c
> @@ -317,6 +317,24 @@ err1:
> return NULL;
> }
>
> +/* Gets the wakeup status of given pad from omap-hwmod */
> +int omap_hwmod_mux_wakeup(struct omap_hwmod_mux_info *hmux)
> +{
> + int i;
> + unsigned int val = -EINVAL;
> +
> + for (i = 0; i < hmux->nr_pads; i++) {
> + struct omap_device_pad *pad = &hmux->pads[i];
> +
> + val = omap_mux_read(pad->partition, pad->mux->reg_offset);
> + }
> +
> + if (val > 0 && val & OMAP_WAKEUP_EVENT)
> + return 1;
> + else
No need of else here.
> + return 0;
> +}
> +
- V Charulatha
More information about the linux-arm-kernel
mailing list