From patchwork Fri Oct 16 10:49:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 54221 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9GB8hRV026877 for ; Fri, 16 Oct 2009 11:08:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758224AbZJPLEa (ORCPT ); Fri, 16 Oct 2009 07:04:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758223AbZJPLEa (ORCPT ); Fri, 16 Oct 2009 07:04:30 -0400 Received: from smtp.nokia.com ([192.100.122.230]:51342 "EHLO mgw-mx03.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756435AbZJPLE3 (ORCPT ); Fri, 16 Oct 2009 07:04:29 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9GB2WH6001694 for ; Fri, 16 Oct 2009 14:03:00 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Oct 2009 14:02:54 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Oct 2009 14:02:53 +0300 Received: from localhost.localdomain (sokoban.ntc.nokia.com [172.22.144.95]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9GB2fa3022261 for ; Fri, 16 Oct 2009 14:02:53 +0300 From: Tero Kristo To: linux-omap@vger.kernel.org Subject: [PATCH 09/17] OMAP3: PM: Ack pending interrupts before entering suspend Date: Fri, 16 Oct 2009 13:49:02 +0300 Message-Id: <1255690150-16853-10-git-send-email-tero.kristo@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1255690150-16853-9-git-send-email-tero.kristo@nokia.com> References: <> <1255690150-16853-1-git-send-email-tero.kristo@nokia.com> <1255690150-16853-2-git-send-email-tero.kristo@nokia.com> <1255690150-16853-3-git-send-email-tero.kristo@nokia.com> <1255690150-16853-4-git-send-email-tero.kristo@nokia.com> <1255690150-16853-5-git-send-email-tero.kristo@nokia.com> <1255690150-16853-6-git-send-email-tero.kristo@nokia.com> <1255690150-16853-7-git-send-email-tero.kristo@nokia.com> <1255690150-16853-8-git-send-email-tero.kristo@nokia.com> <1255690150-16853-9-git-send-email-tero.kristo@nokia.com> X-OriginalArrivalTime: 16 Oct 2009 11:02:53.0973 (UTC) FILETIME=[35C1E450:01CA4E50] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index aceedd8..4ed05e9 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -101,7 +101,7 @@ static int omap_check_spurious(unsigned int irq) } /* XXX: FIQ and additional INTC support (only MPU at the moment) */ -static void omap_ack_irq(unsigned int irq) +void omap_ack_irq(unsigned int irq) { intc_bank_write_reg(0x1, &irq_banks[0], INTC_CONTROL); } diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 5854fa7..6a41811 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -778,6 +778,8 @@ static int omap3_pm_suspend(void) omap_uart_prepare_suspend(); + /* Ack pending IRQs, as a pending IRQ will cause the suspend to fail */ + omap_ack_irq(0); regset_save_on_suspend = 1; omap_sram_idle(); regset_save_on_suspend = 0; diff --git a/arch/arm/plat-omap/include/mach/irqs.h b/arch/arm/plat-omap/include/mach/irqs.h index 2473910..d56be1c 100644 --- a/arch/arm/plat-omap/include/mach/irqs.h +++ b/arch/arm/plat-omap/include/mach/irqs.h @@ -483,6 +483,7 @@ #ifndef __ASSEMBLY__ extern void omap_init_irq(void); extern int omap_irq_pending(void); +extern void omap_ack_irq(unsigned int irq); void omap3_intc_save_context(void); void omap3_intc_restore_context(void); #endif