From patchwork Wed Nov 20 18:08:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 3214371 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CAE509F3A0 for ; Wed, 20 Nov 2013 18:10:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C549A2077E for ; Wed, 20 Nov 2013 18:10:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A66CB20778 for ; Wed, 20 Nov 2013 18:10:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754651Ab3KTSK3 (ORCPT ); Wed, 20 Nov 2013 13:10:29 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:51650 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754465Ab3KTSK2 (ORCPT ); Wed, 20 Nov 2013 13:10:28 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id rAKIA3Ra020341; Wed, 20 Nov 2013 12:10:03 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAKIA2Wh013344; Wed, 20 Nov 2013 12:10:03 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.2.342.3; Wed, 20 Nov 2013 12:10:02 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id rAKIA1Vq015851; Wed, 20 Nov 2013 12:10:02 -0600 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Felipe Balbi Subject: [RFT/RFC/PATCH 12/31] arm: omap: irq: add suspend/resume methods Date: Wed, 20 Nov 2013 12:08:59 -0600 Message-ID: <1384970958-4118-13-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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 there is a generic way to suspend/resume irqchips, let's use that instead of our homebrew version. Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/irq.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 45c5acc..6dfa6cf 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -150,6 +150,18 @@ static void omap_mask_ack_irq(struct irq_data *d) omap_ack_irq(d); } +static void omap_suspend_irq(struct irq_data *d) +{ + omap3_intc_prepare_idle(); + omap_intc_save_context(); +} + +static void omap_resume_irq(struct irq_data *d) +{ + omap_intc_restore_context(); + omap3_intc_resume_idle(); +} + static void __init omap_irq_soft_reset(void) { unsigned long tmp; @@ -199,6 +211,8 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) ct->chip.irq_ack = omap_mask_ack_irq; ct->chip.irq_mask = irq_gc_mask_disable_reg; ct->chip.irq_unmask = irq_gc_unmask_enable_reg; + ct->chip.irq_suspend = omap_suspend_irq; + ct->chip.irq_resume = omap_resume_irq; ct->chip.flags |= IRQCHIP_SKIP_SET_WAKE; ct->regs.enable = INTC_MIR_CLEAR0;