From patchwork Mon Jul 28 21:16:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 34417 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f69.google.com (mail-yh0-f69.google.com [209.85.213.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 252DD202E4 for ; Mon, 28 Jul 2014 21:18:36 +0000 (UTC) Received: by mail-yh0-f69.google.com with SMTP id v1sf28570373yhn.4 for ; Mon, 28 Jul 2014 14:18:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=aqre/+nBDDmr1/pb5llZPgy7sDS93zSn9i2c+RAzWoA=; b=fCUqWWP/x7QjwmLisuoS2aei7wUILognOuJEhbkctJbqxmGZFFVpYYKUQ6s82Oln9X FxI8FyhpAwv5Fo6scOK37+ffe4zS1WCAQRwARrQHlqcrKpmjbDuQIp8RdGFyJUNlA5xS ZDSezptgpY8tVBMlY++sReTyIa8WbczGYLHymUxxjSi5LzRGo+abLfT2l8/JaIR07M0A A4TAbPR3DWZ9fXz3Hh1cDmYsSDwV/bOsrgdt6lCDFVWw0L0ruduippiB19HgZE8WxGsM v/FsWXEGYM+y/zrkqKsLgV0D9HohO9xOAU+YF183b/CuPj32P68j5AJXkyxjtTMCO+rW pqPA== X-Gm-Message-State: ALoCoQnX7XrbUNWlqVebWTpNPJkigL0NSxUQEwo1jOy5sXNEaIga0oHn0QEEHLGs8M7mrzQD614v X-Received: by 10.224.103.135 with SMTP id k7mr17259663qao.6.1406582315983; Mon, 28 Jul 2014 14:18:35 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.199 with SMTP id t65ls2227226qgd.93.gmail; Mon, 28 Jul 2014 14:18:35 -0700 (PDT) X-Received: by 10.52.136.196 with SMTP id qc4mr132147vdb.22.1406582315890; Mon, 28 Jul 2014 14:18:35 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id ru2si13358450vcb.19.2014.07.28.14.18.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 28 Jul 2014 14:18:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id hy4so12106031vcb.41 for ; Mon, 28 Jul 2014 14:18:35 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr11427409vcb.0.1406582315820; Mon, 28 Jul 2014 14:18:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp197027vcb; Mon, 28 Jul 2014 14:18:35 -0700 (PDT) X-Received: by 10.70.98.165 with SMTP id ej5mr19251943pdb.103.1406582314993; Mon, 28 Jul 2014 14:18:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rf4si9523686pdb.342.2014.07.28.14.18.34 for ; Mon, 28 Jul 2014 14:18:34 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752647AbaG1VSI (ORCPT + 25 others); Mon, 28 Jul 2014 17:18:08 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:33669 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752259AbaG1VRn (ORCPT ); Mon, 28 Jul 2014 17:17:43 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s6SLHCmj003067; Mon, 28 Jul 2014 16:17:12 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6SLHC7R027649; Mon, 28 Jul 2014 16:17:12 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Mon, 28 Jul 2014 16:17:11 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s6SLHB78012701; Mon, 28 Jul 2014 16:17:11 -0500 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , , , , , , , Linux Kernel Mailing List , Felipe Balbi Subject: [PATCH 26/35] arm: omap: irq: remove nr_irqs argument Date: Mon, 28 Jul 2014 16:16:14 -0500 Message-ID: <1406582183-696-27-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.0.1.563.g66f467c In-Reply-To: <1406582183-696-1-git-send-email-balbi@ti.com> References: <1406582183-696-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , we can set our global omap_nr_irqs early on and drop the extra argument to omap_init_irq(). Signed-off-by: Felipe Balbi --- arch/arm/mach-omap2/irq.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index a405b96..44d9cf4 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -207,8 +207,7 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) IRQ_NOREQUEST | IRQ_NOPROBE, 0); } -static void __init omap_init_irq(u32 base, int nr_irqs, - struct device_node *node) +static void __init omap_init_irq(u32 base, struct device_node *node) { int j, irq_base; @@ -216,15 +215,13 @@ static void __init omap_init_irq(u32 base, int nr_irqs, if (WARN_ON(!omap_irq_base)) return; - omap_nr_irqs = nr_irqs; - - irq_base = irq_alloc_descs(-1, 0, nr_irqs, 0); + irq_base = irq_alloc_descs(-1, 0, omap_nr_irqs, 0); if (irq_base < 0) { pr_warn("Couldn't allocate IRQ numbers\n"); irq_base = 0; } - domain = irq_domain_add_legacy(node, nr_irqs, irq_base, 0, + domain = irq_domain_add_legacy(node, omap_nr_irqs, irq_base, 0, &irq_domain_simple_ops, NULL); omap_irq_soft_reset(); @@ -278,19 +275,22 @@ out: void __init omap2_init_irq(void) { - omap_init_irq(OMAP24XX_IC_BASE, 96, NULL); + omap_nr_irqs = 96; + omap_init_irq(OMAP24XX_IC_BASE, NULL); set_handle_irq(omap_intc_handle_irq); } void __init omap3_init_irq(void) { - omap_init_irq(OMAP34XX_IC_BASE, 96, NULL); + omap_nr_irqs = 96; + omap_init_irq(OMAP34XX_IC_BASE, NULL); set_handle_irq(omap_intc_handle_irq); } void __init ti81xx_init_irq(void) { - omap_init_irq(OMAP34XX_IC_BASE, 128, NULL); + omap_nr_irqs = 96; + omap_init_irq(OMAP34XX_IC_BASE, NULL); set_handle_irq(omap_intc_handle_irq); } @@ -298,7 +298,8 @@ static int __init intc_of_init(struct device_node *node, struct device_node *parent) { struct resource res; - u32 nr_irq = 96; + + omap_nr_irqs = 96; if (WARN_ON(!node)) return -ENODEV; @@ -309,9 +310,9 @@ static int __init intc_of_init(struct device_node *node, } if (of_device_is_compatible(node, "ti,am33xx-intc")) - nr_irq = 128; + omap_nr_irqs = 128; - omap_init_irq(res.start, nr_irq, of_node_get(node)); + omap_init_irq(res.start, of_node_get(node)); set_handle_irq(omap_intc_handle_irq);