* [PATCH 06/11] OMAP: UART: use non-locking versions of hwmod enable/idle functions
@ 2010-09-17 16:07 Govindraj.R
0 siblings, 0 replies; only message in thread
From: Govindraj.R @ 2010-09-17 16:07 UTC (permalink / raw)
To: linux-omap; +Cc: linux-arm-kernel, linux-serial, Kevin Hilman, Tony Lindgren
From: Kevin Hilman <khilman@deeprootsystems.com>
Since the UART enable/idle is done during the idle path (with
interrupts disabled), use the non-locking versions of the hwmod
enable/idle functions.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
arch/arm/mach-omap2/serial.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index b47194a..f03014f 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -105,10 +105,29 @@ struct omap_uart_state {
static LIST_HEAD(uart_list);
static u8 num_uarts;
+/*
+ * Since these idle/enable hooks are used in the idle path itself
+ * which has interrupts disabled, use the non-locking versions of
+ * the hwmod enable/disable functions.
+ */
+static int uart_idle_hwmod(struct omap_device *od)
+{
+ _omap_hwmod_idle(od->hwmods[0]);
+
+ return 0;
+}
+
+static int uart_enable_hwmod(struct omap_device *od)
+{
+ _omap_hwmod_enable(od->hwmods[0]);
+
+ return 0;
+}
+
static struct omap_device_pm_latency omap_uart_latency[] = {
{
- .deactivate_func = omap_device_idle_hwmods,
- .activate_func = omap_device_enable_hwmods,
+ .deactivate_func = uart_idle_hwmod,
+ .activate_func = uart_enable_hwmod,
.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
},
};
--
1.6.3.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-17 16:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17 16:07 [PATCH 06/11] OMAP: UART: use non-locking versions of hwmod enable/idle functions Govindraj.R
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).