From patchwork Wed Dec 10 10:50:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RWRkaWUgSHVhbmcgKOm7g+aZuuWCkSk=?= X-Patchwork-Id: 5467961 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 9DB1BBEEA8 for ; Wed, 10 Dec 2014 10:55:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CBBA92012B for ; Wed, 10 Dec 2014 10:55:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00D1A20125 for ; Wed, 10 Dec 2014 10:55:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xyetc-0006yT-Tf; Wed, 10 Dec 2014 10:53:28 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XyesG-0005w6-FX for linux-arm-kernel@lists.infradead.org; Wed, 10 Dec 2014 10:52:05 +0000 X-Listener-Flag: 11101 Received: from mtkhts07.mediatek.inc [(172.21.101.69)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1675061046; Wed, 10 Dec 2014 18:51:37 +0800 Received: from mtkslt208.mediatek.inc (10.21.15.95) by mtkhts07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.181.6; Wed, 10 Dec 2014 18:51:36 +0800 From: Eddie Huang To: Matthias Brugger , Rob Herring , Jason Cooper Subject: [PATCH 2/4] irqchip: mediatek: Add support for mt8173 Date: Wed, 10 Dec 2014 18:50:00 +0800 Message-ID: <1418208602-35584-3-git-send-email-eddie.huang@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1418208602-35584-1-git-send-email-eddie.huang@mediatek.com> References: <1418208602-35584-1-git-send-email-eddie.huang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141210_025204_762482_8D979FB7 X-CRM114-Status: GOOD ( 10.35 ) X-Spam-Score: 1.3 (+) Cc: Mark Rutland , devicetree@vger.kernel.org, srv_heupstream@mediatek.com, Pawel Moll , Ian Campbell , Catalin Marinas , Mark Brown , Will Deacon , linux-kernel@vger.kernel.org, Robert Richter , Sascha Hauer , Kumar Gala , Olof Johansson , "Joe.C" , Thomas Gleixner , Eddie Huang , linux-arm-kernel@lists.infradead.org, yh.chen@mediatek.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, T_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 From: Yingjoe Chen MT8173 intpol have 32 more irq pins, add support to it. Signed-off-by: Yingjoe Chen Signed-off-by: Eddie Huang --- drivers/irqchip/irq-mtk-sysirq.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c index 7e342df..c8c0cdb 100644 --- a/drivers/irqchip/irq-mtk-sysirq.c +++ b/drivers/irqchip/irq-mtk-sysirq.c @@ -24,6 +24,7 @@ #include "irqchip.h" #define MT6577_SYS_INTPOL_NUM (224) +#define MT8173_SYS_INTPOL_NUM (256) struct mtk_sysirq_chip_data { spinlock_t lock; @@ -120,7 +121,8 @@ static struct irq_domain_ops sysirq_domain_ops = { }; static int __init mtk_sysirq_of_init(struct device_node *node, - struct device_node *parent) + struct device_node *parent, + int intpol_num) { struct irq_domain *domain, *domain_parent; struct mtk_sysirq_chip_data *chip_data; @@ -143,8 +145,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node, goto out_free; } - domain = irq_domain_add_hierarchy(domain_parent, 0, - MT6577_SYS_INTPOL_NUM, node, + domain = irq_domain_add_hierarchy(domain_parent, 0, intpol_num, node, &sysirq_domain_ops, chip_data); if (!domain) { ret = -ENOMEM; @@ -160,4 +161,17 @@ out_free: kfree(chip_data); return ret; } -IRQCHIP_DECLARE(mtk_sysirq, "mediatek,mt6577-sysirq", mtk_sysirq_of_init); + +static int __init mt6577_sysirq_of_init(struct device_node *node, + struct device_node *parent) +{ + return mtk_sysirq_of_init(node, parent, MT6577_SYS_INTPOL_NUM); +} + +static int __init mt8173_sysirq_of_init(struct device_node *node, + struct device_node *parent) +{ + return mtk_sysirq_of_init(node, parent, MT8173_SYS_INTPOL_NUM); +} +IRQCHIP_DECLARE(mt6577_sysirq, "mediatek,mt6577-sysirq", mt6577_sysirq_of_init); +IRQCHIP_DECLARE(mt8173_sysirq, "mediatek,mt8173-sysirq", mt8173_sysirq_of_init);