From patchwork Wed Nov 20 18:09:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 3215141 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 B1E90C045B for ; Wed, 20 Nov 2013 19:35:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CB5CD20778 for ; Wed, 20 Nov 2013 19:35:48 +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 A04ED20777 for ; Wed, 20 Nov 2013 19:35:47 +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 1VjCIA-0003v2-8b; Wed, 20 Nov 2013 18:14:23 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjCHS-0001K3-Ph; Wed, 20 Nov 2013 18:13:38 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjCEI-0000rg-Jm for linux-arm-kernel@lists.infradead.org; Wed, 20 Nov 2013 18:10:32 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id rAKIA42l020347; Wed, 20 Nov 2013 12:10:04 -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 rAKIA4sl009949; Wed, 20 Nov 2013 12:10:04 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Wed, 20 Nov 2013 12:10:04 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAKIA3LY006055; Wed, 20 Nov 2013 12:10:03 -0600 From: Felipe Balbi To: Tony Lindgren Subject: [RFT/RFC/PATCH 13/31] arm: omap: irq: remove last bits of our homebrew irqchip pm Date: Wed, 20 Nov 2013 12:09:00 -0600 Message-ID: <1384970958-4118-14-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_131023_116609_ABBBFDA5 X-CRM114-Status: GOOD ( 12.51 ) 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 completely move towards generic irqchip PM. Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/common.h | 5 ----- arch/arm/mach-omap2/irq.c | 21 +++++++++------------ arch/arm/mach-omap2/pm34xx.c | 10 ---------- 3 files changed, 9 insertions(+), 27 deletions(-) diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index f7644fe..4d90328 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -199,11 +199,6 @@ void omap2_init_irq(void); void omap3_init_irq(void); void ti81xx_init_irq(void); extern int omap_irq_pending(void); -void omap_intc_save_context(void); -void omap_intc_restore_context(void); -void omap3_intc_suspend(void); -void omap3_intc_prepare_idle(void); -void omap3_intc_resume_idle(void); void omap2_intc_handle_irq(struct pt_regs *regs); void omap3_intc_handle_irq(struct pt_regs *regs); void omap_intc_of_init(void); diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 6dfa6cf..f290f16 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -83,7 +83,7 @@ static u32 intc_readl(u32 reg) return readl_relaxed(omap_irq_base + reg); } -void omap_intc_save_context(void) +static void omap_intc_save_context(void) { int i; @@ -104,7 +104,7 @@ void omap_intc_save_context(void) intc_readl(INTC_MIR0 + (0x20 * i)); } -void omap_intc_restore_context(void) +static void omap_intc_restore_context(void) { int i; @@ -123,7 +123,7 @@ void omap_intc_restore_context(void) /* MIRs are saved and restore with other PRCM registers */ } -void omap3_intc_prepare_idle(void) +static void omap_intc_prepare_idle(void) { /* * Disable autoidle as it can stall interrupt controller, @@ -132,7 +132,7 @@ void omap3_intc_prepare_idle(void) intc_writel(INTC_SYSCONFIG, 0); } -void omap3_intc_resume_idle(void) +static void omap_intc_resume_idle(void) { /* Re-enable autoidle */ intc_writel(INTC_SYSCONFIG, 1); @@ -152,14 +152,17 @@ static void omap_mask_ack_irq(struct irq_data *d) static void omap_suspend_irq(struct irq_data *d) { - omap3_intc_prepare_idle(); + omap_intc_prepare_idle(); omap_intc_save_context(); + + /* A pending interrupt would prevent OMAP from entering suspend */ + omap_ack_irq(NULL); } static void omap_resume_irq(struct irq_data *d) { omap_intc_restore_context(); - omap3_intc_resume_idle(); + omap_intc_resume_idle(); } static void __init omap_irq_soft_reset(void) @@ -193,12 +196,6 @@ int omap_irq_pending(void) return 0; } -void omap3_intc_suspend(void) -{ - /* A pending interrupt would prevent OMAP from entering suspend */ - omap_ack_irq(NULL); -} - static __init void omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) { diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 93b80e5..2764796 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c @@ -82,8 +82,6 @@ static void omap3_core_save_context(void) omap_ctrl_writel(omap_ctrl_readl(OMAP343X_PADCONF_ETK_D14), OMAP343X_CONTROL_MEM_WKUP + 0x2a0); - /* Save the Interrupt controller context */ - omap_intc_save_context(); /* Save the GPMC context */ omap3_gpmc_save_context(); /* Save the system control module context, padconf already save above*/ @@ -97,8 +95,6 @@ static void omap3_core_restore_context(void) omap3_control_restore_context(); /* Restore the GPMC context */ omap3_gpmc_restore_context(); - /* Restore the interrupt controller context */ - omap_intc_restore_context(); omap_dma_global_context_restore(); } @@ -288,8 +284,6 @@ void omap_sram_idle(void) } } - omap3_intc_prepare_idle(); - /* * On EMU/HS devices ROM code restores a SRDC value * from scratchpad which has automatic self refresh on timeout @@ -335,8 +329,6 @@ void omap_sram_idle(void) OMAP3430_GR_MOD, OMAP3_PRM_VOLTCTRL_OFFSET); } - omap3_intc_resume_idle(); - pwrdm_post_transition(NULL); /* PER */ @@ -373,8 +365,6 @@ static int omap3_pm_suspend(void) goto restore; } - omap3_intc_suspend(); - omap_sram_idle(); restore: