From patchwork Tue Apr 27 15:04:23 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 95450 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3RF4TP1023215 for ; Tue, 27 Apr 2010 15:04:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752318Ab0D0PE2 (ORCPT ); Tue, 27 Apr 2010 11:04:28 -0400 Received: from mail-pv0-f174.google.com ([74.125.83.174]:49955 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981Ab0D0PE1 (ORCPT ); Tue, 27 Apr 2010 11:04:27 -0400 Received: by pvg2 with SMTP id 2so1333731pvg.19 for ; Tue, 27 Apr 2010 08:04:26 -0700 (PDT) Received: by 10.142.9.10 with SMTP id 10mr2973979wfi.42.1272380666455; Tue, 27 Apr 2010 08:04:26 -0700 (PDT) Received: from localhost (deeprootsystems.com [216.254.16.51]) by mx.google.com with ESMTPS id 20sm5335523pzk.3.2010.04.27.08.04.24 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 Apr 2010 08:04:25 -0700 (PDT) To: Mike Turquette , Thara Gopinath Cc: "linux-omap\@vger.kernel.org" Subject: Re: [PATCH] OMAP3: PRCM interrupt: only check for enabled PRCM IRQs References: <1272320584-14244-1-git-send-email-khilman@deeprootsystems.com> <4BD631D3.4000800@ti.com> From: Kevin Hilman Organization: Deep Root Systems, LLC Date: Tue, 27 Apr 2010 08:04:23 -0700 In-Reply-To: <4BD631D3.4000800@ti.com> (Mike Turquette's message of "Mon\, 26 Apr 2010 19\:37\:39 -0500") Message-ID: <878w89rl6w.fsf@deeprootsystems.com> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 27 Apr 2010 15:04:29 +0000 (UTC) diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index fee2efb..c38016b 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -266,13 +266,16 @@ static int _prcm_int_handle_wakeup(void) */ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id) { - u32 irqstatus_mpu; + u32 irqenable_mpu, irqstatus_mpu; int c = 0; - do { - irqstatus_mpu = prm_read_mod_reg(OCP_MOD, - OMAP3_PRM_IRQSTATUS_MPU_OFFSET); + irqenable_mpu = prm_read_mod_reg(OCP_MOD, + OMAP3_PRM_IRQENABLE_MPU_OFFSET); + irqstatus_mpu = prm_read_mod_reg(OCP_MOD, + OMAP3_PRM_IRQSTATUS_MPU_OFFSET); + irqstatus_mpu &= irqenable_mpu; + do { if (irqstatus_mpu & (OMAP3430_WKUP_ST | OMAP3430_IO_ST)) { c = _prcm_int_handle_wakeup(); @@ -291,7 +294,11 @@ static irqreturn_t prcm_interrupt_handler (int irq, void *dev_id) prm_write_mod_reg(irqstatus_mpu, OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET); - } while (prm_read_mod_reg(OCP_MOD, OMAP3_PRM_IRQSTATUS_MPU_OFFSET)); + irqstatus_mpu = prm_read_mod_reg(OCP_MOD, + OMAP3_PRM_IRQSTATUS_MPU_OFFSET); + irqstatus_mpu &= irqenable_mpu; + + } while (irqstatus_mpu); return IRQ_HANDLED; }