From patchwork Fri Oct 16 10:49:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 54220 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 n9GB8hRU026877 for ; Fri, 16 Oct 2009 11:08:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758189AbZJPLEZ (ORCPT ); Fri, 16 Oct 2009 07:04:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756435AbZJPLEZ (ORCPT ); Fri, 16 Oct 2009 07:04:25 -0400 Received: from smtp.nokia.com ([192.100.122.233]:32271 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756905AbZJPLEZ (ORCPT ); Fri, 16 Oct 2009 07:04:25 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n9GB2f4c011809 for ; Fri, 16 Oct 2009 14:02:56 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Oct 2009 14:02:52 +0300 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 16 Oct 2009 14:02:52 +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 n9GB2fa2022261 for ; Fri, 16 Oct 2009 14:02:51 +0300 From: Tero Kristo To: linux-omap@vger.kernel.org Subject: [PATCH 08/17] OMAP2/3: GPTIMER: Clear pending interrupts when entering suspend Date: Fri, 16 Oct 2009 13:49:01 +0300 Message-Id: <1255690150-16853-9-git-send-email-tero.kristo@nokia.com> X-Mailer: git-send-email 1.5.4.3 In-Reply-To: <1255690150-16853-8-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> X-OriginalArrivalTime: 16 Oct 2009 11:02:52.0755 (UTC) FILETIME=[35080A30: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/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 9c056ff..c9d47bb 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c @@ -92,9 +92,21 @@ static void omap2_gp_timer_set_mode(enum clock_event_mode mode, case CLOCK_EVT_MODE_ONESHOT: break; case CLOCK_EVT_MODE_UNUSED: - case CLOCK_EVT_MODE_SHUTDOWN: case CLOCK_EVT_MODE_RESUME: break; + case CLOCK_EVT_MODE_SHUTDOWN: + /* + * Wait for min period x 2 to make sure that timer is + * stopped + */ + udelay(evt->min_delta_ns / 500); + /* + * Clear possibly pending interrupt, this will occasionally + * generate spurious timer IRQs during suspend but this + * is okay, as another option is not to enter suspend at all + */ + omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW); + break; } }