Thread (18 messages) 18 messages, 5 authors, 2011-03-04
STALE5574d

Re: [PATCH 2/7] OMAP2+: mux: Enable wakeup for wakeup enable requested pads

From: Varadarajan, Charulatha <hidden>
Date: 2011-03-02 04:49:58
Also in: linux-arm-kernel, linux-omap

Govind,

Couple of minor comments.

On Mon, Feb 28, 2011 at 20:09, Govindraj.R [off-list ref] 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/
quoted hunk ↗ jump to hunk
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 <redacted>
Signed-off-by: Govindraj.R <redacted>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help