From patchwork Tue Apr 21 15:01:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 6249511 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 83217BF4A6 for ; Tue, 21 Apr 2015 15:00:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA44D202AE for ; Tue, 21 Apr 2015 14:59:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C7C7A200FF for ; Tue, 21 Apr 2015 14:59:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755083AbbDUO7z (ORCPT ); Tue, 21 Apr 2015 10:59:55 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34934 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754206AbbDUO7w (ORCPT ); Tue, 21 Apr 2015 10:59:52 -0400 Received: by pabtp1 with SMTP id tp1so243403138pab.2; Tue, 21 Apr 2015 07:59:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=iX8SoQpZoPm/Y2xYUW6bFUfCLjPiiKKhVeiaz8VMqW0=; b=PAOO/lXBgcrQYLns8HbQdZ09ZL1vj/aVF/UBEwb0QvIJcptho3kaApxkAUB4Sk2yWb Oc526/R27c6Pi8S4oR9tf98fxt4V4FvOXqCMv3bg+ndbV1OFLSod9ZxEthGmNFRSPJiE 2zHd17tx/sf6wYeWj2Z5xgA26VwJpfOe+hpLi9XQ2AjskBV30wsfvDmMgxyHw6tEVRoy 2N5V2WDnHqHmp6Fwy/0yNv99HvhWFJRISdsjhLB++TCdn5tcKyavi4eE9AVyfksrILKg cgc8J4P7p25hYQPiMYlQulkdRpRZSalNq5y8LgVDlDSrQlw4RSt8EfFCJmD01TtleIDx 9yoA== X-Received: by 10.69.27.77 with SMTP id je13mr36238532pbd.169.1429628391775; Tue, 21 Apr 2015 07:59:51 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id ux4sm2284624pbc.61.2015.04.21.07.59.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2015 07:59:50 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: jason@lakedaemon.net, geert+renesas@glider.be, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, horms@verge.net.au, Magnus Damm , tglx@linutronix.de Date: Wed, 22 Apr 2015 00:01:26 +0900 Message-Id: <20150421150126.14288.6375.sendpatchset@little-apple> In-Reply-To: <20150421150115.14288.88519.sendpatchset@little-apple> References: <20150421150115.14288.88519.sendpatchset@little-apple> Subject: [PATCH/RFC 01/03] irqchip: renesas-irqc: Add irq_enable() and irq_disable() Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Magnus Damm Hook up ->irq_enable() and ->irq_disable() together with ->irq_mask() and ->irq_unmask(). This should not adjust any code behaviour at all. Signed-off-by: Magnus Damm --- drivers/irqchip/irq-renesas-irqc.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/irqchip/irq-renesas-irqc.c +++ work/drivers/irqchip/irq-renesas-irqc.c 2015-04-21 23:09:53.116371520 +0900 @@ -76,24 +76,34 @@ static void irqc_dbg(struct irqc_irq *i, str, i->requested_irq, i->hw_irq, i->domain_irq); } -static void irqc_irq_enable(struct irq_data *d) +static void irqc_irq_unmask(struct irq_data *d) { struct irqc_priv *p = irq_data_get_irq_chip_data(d); int hw_irq = irqd_to_hwirq(d); - irqc_dbg(&p->irq[hw_irq], "enable"); + irqc_dbg(&p->irq[hw_irq], "unmask"); iowrite32(BIT(hw_irq), p->cpu_int_base + IRQC_EN_SET); } -static void irqc_irq_disable(struct irq_data *d) +static void irqc_irq_mask(struct irq_data *d) { struct irqc_priv *p = irq_data_get_irq_chip_data(d); int hw_irq = irqd_to_hwirq(d); - irqc_dbg(&p->irq[hw_irq], "disable"); + irqc_dbg(&p->irq[hw_irq], "mask"); iowrite32(BIT(hw_irq), p->cpu_int_base + IRQC_EN_STS); } +static void irqc_irq_enable(struct irq_data *d) +{ + irqc_irq_unmask(d); +} + +static void irqc_irq_disable(struct irq_data *d) +{ + irqc_irq_mask(d); +} + static unsigned char irqc_sense[IRQ_TYPE_SENSE_MASK + 1] = { [IRQ_TYPE_LEVEL_LOW] = 0x01, [IRQ_TYPE_LEVEL_HIGH] = 0x02, @@ -244,8 +254,10 @@ static int irqc_probe(struct platform_de irq_chip = &p->irq_chip; irq_chip->name = name; - irq_chip->irq_mask = irqc_irq_disable; - irq_chip->irq_unmask = irqc_irq_enable; + irq_chip->irq_enable = irqc_irq_enable; + irq_chip->irq_disable = irqc_irq_disable; + irq_chip->irq_mask = irqc_irq_mask; + irq_chip->irq_unmask = irqc_irq_unmask; irq_chip->irq_set_type = irqc_irq_set_type; irq_chip->irq_set_wake = irqc_irq_set_wake; irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND;