From patchwork Mon Sep 23 12:03:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chander Kashyap X-Patchwork-Id: 2927701 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 A8629BFF05 for ; Mon, 23 Sep 2013 12:04:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7EFED20399 for ; Mon, 23 Sep 2013 12:04:36 +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 9D09B20398 for ; Mon, 23 Sep 2013 12:04:31 +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 1VO4sI-0006F7-9q; Mon, 23 Sep 2013 12:04:22 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VO4sF-00043x-Rm; Mon, 23 Sep 2013 12:04:19 +0000 Received: from mail-pb0-f47.google.com ([209.85.160.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VO4sD-00043K-EM for linux-arm-kernel@lists.infradead.org; Mon, 23 Sep 2013 12:04:17 +0000 Received: by mail-pb0-f47.google.com with SMTP id rr4so3107465pbb.20 for ; Mon, 23 Sep 2013 05:03:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GopuWkZDdQxOd+hk5KDWLl+nfywZcvXnz7xhrNUnOyA=; b=mnkNe53ZZaNC7ElIunyYRvfy4QW4E9oyY/5qHgA8M2yFS5TZGYw6+a/HSX3m7zs3Q1 VdHO5gVd51QSZz99gzL0loKYxinkGoGAM8CL54isqPjd3Z4G20JhpdywhQkf0gWx+CtC OMu0CEHWTw20J9JA7GMiDXilYAmHw611b8yyBViRPd1DcfDDj5XqfXC+JieYCBGIIojd UFFfMzUViVodRe3AcT0OYJvP/GaVV8Brmhl4ahGW4T3G1K15oy5Esaw9DYJeCQfMq77n bCzUlmWFN2PmbtSvYxnFr3rcLCbDxs9OUa8U8ZHkrS5jvOTW6sEsiVxSPqYBzQjDrxmf 63MA== X-Gm-Message-State: ALoCoQkSwNiBkTd7F4gUsBPghCw/QahQqAApbqsHCaMgdHusXX/ZNNVWLoU6cunFOzONhfWi1hNB X-Received: by 10.67.22.67 with SMTP id hq3mr7446911pad.132.1379937836026; Mon, 23 Sep 2013 05:03:56 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPSA id ye1sm37666493pab.19.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 23 Sep 2013 05:03:55 -0700 (PDT) From: Chander Kashyap To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH v2] irqchip: exynos-combiner: remove hard-coded irq_base value Date: Mon, 23 Sep 2013 17:33:35 +0530 Message-Id: <1379937815-21746-1-git-send-email-chander.kashyap@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130923_080417_572627_3A63B2BF X-CRM114-Status: GOOD ( 11.22 ) X-Spam-Score: -2.6 (--) Cc: tglx@linutronix.de, kgene.kim@samsung.com, thomas.abraham@linaro.org, t.figa@samsung.com, Chander Kashyap 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.5 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 Replace irq_domain_add_simple with "irq_domain_add_linear" in order to use linear irq domain, and to remove hardcoded irq_base_value. Signed-off-by: Chander Kashyap Reviewed-by: Tomasz Figa --- Changes since v1: - Replaced irq_domain_add_simple with irq_domain_add_linear, as suggested by Tomasz drivers/irqchip/exynos-combiner.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/irqchip/exynos-combiner.c b/drivers/irqchip/exynos-combiner.c index 4c68265..2551046 100644 --- a/drivers/irqchip/exynos-combiner.c +++ b/drivers/irqchip/exynos-combiner.c @@ -206,8 +206,7 @@ static unsigned int combiner_lookup_irq(int group) static void __init combiner_init(void __iomem *combiner_base, struct device_node *np, - unsigned int max_nr, - int irq_base) + unsigned int max_nr) { int i, irq; unsigned int nr_irq; @@ -221,7 +220,7 @@ static void __init combiner_init(void __iomem *combiner_base, return; } - combiner_irq_domain = irq_domain_add_simple(np, nr_irq, irq_base, + combiner_irq_domain = irq_domain_add_linear(np, nr_irq, &combiner_irq_domain_ops, combiner_data); if (WARN_ON(!combiner_irq_domain)) { pr_warning("%s: irq domain init failed\n", __func__); @@ -248,7 +247,6 @@ static int __init combiner_of_init(struct device_node *np, { void __iomem *combiner_base; unsigned int max_nr = 20; - int irq_base = -1; combiner_base = of_iomap(np, 0); if (!combiner_base) { @@ -262,14 +260,7 @@ static int __init combiner_of_init(struct device_node *np, __func__, max_nr); } - /* - * FIXME: This is a hardwired COMBINER_IRQ(0,0). Once all devices - * get their IRQ from DT, remove this in order to get dynamic - * allocation. - */ - irq_base = 160; - - combiner_init(combiner_base, np, max_nr, irq_base); + combiner_init(combiner_base, np, max_nr); return 0; }