summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/serial.c
diff options
context:
space:
mode:
authorTero Kristo <tero.kristo@nokia.com>2009-03-05 15:32:23 +0100
committerKevin Hilman <khilman@deeprootsystems.com>2009-08-05 18:10:53 +0200
commit2466211e5debd205fc550d871fe0ab9b9a6d02ed (patch)
treec4c0c9e44a9a36c3695bf1c13444093263df2a81 /arch/arm/mach-omap2/serial.c
parentOMAP4: UART: cleanup special case IRQ handling (diff)
downloadlinux-2466211e5debd205fc550d871fe0ab9b9a6d02ed.tar.xz
linux-2466211e5debd205fc550d871fe0ab9b9a6d02ed.zip
OMAP3: Fixed crash bug with serial + suspend
It was possible for an unhandled interrupt to occur if there was incoming serial traffic during wakeup from suspend. This was caused by the code in arch-arm/mach-omap2/serial.c keeping interrupt enabled all the time, but not acking its interrupts. Applies on top of PM branch. Use the PM begin/end hooks to ensure that the "serial idle" interrupts are disabled during the suspend path. Also, since begin/end hooks are now used, use the suspend_state that is passed in the begin hook instead of the enter hook as per the platform_suspend_ops docs. Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r--arch/arm/mach-omap2/serial.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index c82ec95cd79e..5352d05b42d6 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -435,6 +435,20 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
WARN_ON(ret);
}
+void omap_uart_enable_irqs(int enable)
+{
+ int ret;
+ struct omap_uart_state *uart;
+
+ list_for_each_entry(uart, &uart_list, node) {
+ if (enable)
+ ret = request_irq(uart->p->irq, omap_uart_interrupt,
+ IRQF_SHARED, "serial idle", (void *)uart);
+ else
+ free_irq(uart->p->irq, (void *)uart);
+ }
+}
+
static ssize_t sleep_timeout_show(struct kobject *kobj,
struct kobj_attribute *attr,
char *buf)