From patchwork Wed Nov 20 18:09:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 3215121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 99E89C045B for ; Wed, 20 Nov 2013 19:32:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8323420776 for ; Wed, 20 Nov 2013 19:32:41 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E97220775 for ; Wed, 20 Nov 2013 19:32:40 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjCJ2-0004ee-HX; Wed, 20 Nov 2013 18:15:16 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjCIz-0001QD-OX; Wed, 20 Nov 2013 18:15:13 +0000 Received: from bear.ext.ti.com ([192.94.94.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjCEf-0000yL-Si for linux-arm-kernel@lists.infradead.org; Wed, 20 Nov 2013 18:10:51 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id rAKIASqh001484; Wed, 20 Nov 2013 12:10:28 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAKIAR3C010344; Wed, 20 Nov 2013 12:10:28 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Wed, 20 Nov 2013 12:10:27 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAKIAQuh009387; Wed, 20 Nov 2013 12:10:27 -0600 From: Felipe Balbi To: Tony Lindgren Subject: [RFT/RFC/PATCH 27/31] arm: omap: irq: drop omap_pending_irq() Date: Wed, 20 Nov 2013 12:09:14 -0600 Message-ID: <1384970958-4118-28-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.8.4.GIT In-Reply-To: <1384970958-4118-1-git-send-email-balbi@ti.com> References: <1384970958-4118-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131120_131046_151138_492649E0 X-CRM114-Status: GOOD ( 15.64 ) X-Spam-Score: -7.5 (-------) Cc: Linux OMAP Mailing List , Felipe Balbi , Linux ARM Kernel Mailing List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We already ack pending IRQs during suspend, which renders the check for pending IRQs quite unnecessary. Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/common.h | 1 - arch/arm/mach-omap2/cpuidle34xx.c | 2 +- arch/arm/mach-omap2/irq.c | 11 ----------- arch/arm/mach-omap2/pm24xx.c | 11 ----------- arch/arm/mach-omap2/pm34xx.c | 3 --- 5 files changed, 1 insertion(+), 27 deletions(-) diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 427160b..f44a410 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -198,7 +198,6 @@ extern struct device *omap4_get_dsp_device(void); void omap2_init_irq(void); void omap3_init_irq(void); void ti81xx_init_irq(void); -extern int omap_irq_pending(void); void omap_gic_of_init(void); #ifdef CONFIG_CACHE_L2X0 diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index e18709d..96cced3 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -112,7 +112,7 @@ static int omap3_enter_idle(struct cpuidle_device *dev, { struct omap3_idle_statedata *cx = &omap3_idle_data[index]; - if (omap_irq_pending() || need_resched()) + if (need_resched()) goto return_sleep_time; /* Deny idle for C1 */ diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 5425258..397157a 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -186,17 +186,6 @@ static void __init omap_irq_soft_reset(void) intc_writel(INTC_SYSCONFIG, 1 << 0); } -int omap_irq_pending(void) -{ - int irq; - - for (irq = 0; irq < omap_nr_irqs; irq += 32) - if (intc_readl(INTC_PENDING_IRQ0 + - ((irq >> 5) << 5))) - return 1; - return 0; -} - static __init void omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) { diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 8c07594..33ea27c 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c @@ -88,17 +88,11 @@ static int omap2_enter_full_retention(void) omap2_gpio_prepare_for_idle(0); - /* One last check for pending IRQs to avoid extra latency due - * to sleeping unnecessarily. */ - if (omap_irq_pending()) - goto no_sleep; - /* Jump to SRAM suspend code */ omap2_sram_suspend(sdrc_read_reg(SDRC_DLLA_CTRL), OMAP_SDRC_REGADDR(SDRC_DLLA_CTRL), OMAP_SDRC_REGADDR(SDRC_POWER)); -no_sleep: omap2_gpio_resume_after_idle(); clk_enable(osc_ck); @@ -181,15 +175,10 @@ static int omap2_can_sleep(void) static void omap2_pm_idle(void) { if (!omap2_can_sleep()) { - if (omap_irq_pending()) - return; omap2_enter_mpu_retention(); return; } - if (omap_irq_pending()) - return; - omap2_enter_full_retention(); } diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 2764796..7c43fa0 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -338,9 +338,6 @@ void omap_sram_idle(void) static void omap3_pm_idle(void) { - if (omap_irq_pending()) - return; - trace_cpu_idle(1, smp_processor_id()); omap_sram_idle();