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: 2927681 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 76D639F288 for ; Mon, 23 Sep 2013 12:04:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3BA4420399 for ; Mon, 23 Sep 2013 12:03:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E9C8920398 for ; Mon, 23 Sep 2013 12:03:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753889Ab3IWMD5 (ORCPT ); Mon, 23 Sep 2013 08:03:57 -0400 Received: from mail-pb0-f42.google.com ([209.85.160.42]:48155 "EHLO mail-pb0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753740Ab3IWMD4 (ORCPT ); Mon, 23 Sep 2013 08:03:56 -0400 Received: by mail-pb0-f42.google.com with SMTP id un15so3144949pbc.29 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=cfqj6W0/f39qfAfnOyh4LRLBq7Z/iAtJx/kROXmfk6vjx2khjR+akUh27tyyqBlN5O U+FhBYSGblFGTw1WbMMngjKcal1NUonEDObCB5ciy5HZsnRM2HQTcBBRUhXNXF4WurMF wkdC83Q8xKOJze2dK/KQQQ6StzmTVlkZSSyqwqZDtNPuTlWKprmcGXbXBors61jlmfRH am2kizLAQXoBmdBxHiJTjZeESIaeq9BWSxjm1FsTOcaxGos51OcIx5pjC4AI63/KSA28 sXXRJlH7i3vqzR4Z4KhIgQB4Fh0MNSFrOeDh6FfHFQVylVo4bXu6DndHeCtoAUFoesMD 8gsQ== X-Gm-Message-State: ALoCoQmifXgXEznRgzi6AWXpgB6zHU5qDF+q2kMhAIkgMH6VkVa9U2ksPgCsn0aR4+4DPr5A2umq 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 Cc: kgene.kim@samsung.com, thomas.abraham@linaro.org, tglx@linutronix.de, t.figa@samsung.com, Chander Kashyap 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 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; }