From patchwork Mon Jun 16 11:23:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sricharan R X-Patchwork-Id: 31948 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f199.google.com (mail-ob0-f199.google.com [209.85.214.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id ADA8120E7A for ; Mon, 16 Jun 2014 11:29:18 +0000 (UTC) Received: by mail-ob0-f199.google.com with SMTP id va2sf30445476obc.6 for ; Mon, 16 Jun 2014 04:29:18 -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:subject:date:message-id :in-reply-to:references:mime-version:cc:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-type :content-transfer-encoding; bh=AWn3ZB/Sc3YACyMq74Lug3RmSN91qxVSGZtBUKv6sS8=; b=hL77e7R5J4+QtPtPiYoq8yvWCJqUxwksh2m0jH7KkGi8GgczcuBIxnnAsN2PRfMY0Y HWjj+QLe5C6ajzZtKk2xpEfSVvHevY0785opeIrPckoYqfY9vWuZLjDsPZfK6c9z0rsZ nmFq0UKDrUrL/v3yZHENi5F2yeV9wzCwfTTaHDAxGPMIawNp4oUaoJKoD8X9sgRMVYcA 3UT7+E05PZSEOKNAMNl1byIxv0+BDuuu7xaMD4TSkS7pi+9VeGPPYUZFqUJbsZsa2XdR 8zFwpqvRX+sOTva00NwPh8dLushRbhue9nfvnj28w4qJTEh7NE18H+GYs7+fEOCawoXf 3fcA== X-Gm-Message-State: ALoCoQkZNfJPT3lsEKpQ6cr2aR1vEpjby54Ccf7DdKYUbGdAbt+UDz65AEmBPzO6QYAHn7QKb026 X-Received: by 10.43.94.71 with SMTP id bx7mr50652icc.2.1402918158287; Mon, 16 Jun 2014 04:29:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.50.16 with SMTP id r16ls4547504qga.71.gmail; Mon, 16 Jun 2014 04:29:18 -0700 (PDT) X-Received: by 10.220.251.13 with SMTP id mq13mr46036vcb.73.1402918158204; Mon, 16 Jun 2014 04:29:18 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id bo13si3984050vdb.31.2014.06.16.04.29.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Jun 2014 04:29:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jz11so5825931veb.2 for ; Mon, 16 Jun 2014 04:29:18 -0700 (PDT) X-Received: by 10.53.10.234 with SMTP id ed10mr75150vdd.86.1402918158107; Mon, 16 Jun 2014 04:29:18 -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.54.6 with SMTP id vs6csp127441vcb; Mon, 16 Jun 2014 04:29:17 -0700 (PDT) X-Received: by 10.140.40.81 with SMTP id w75mr2737505qgw.112.1402918157715; Mon, 16 Jun 2014 04:29:17 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id s111si9827398qge.72.2014.06.16.04.29.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jun 2014 04:29:17 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1WwV4h-0000T6-Cf; Mon, 16 Jun 2014 11:27:43 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WwV2t-0007a7-JJ for linux-arm-kernel@lists.infradead.org; Mon, 16 Jun 2014 11:25:52 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5GBPNbq018635; Mon, 16 Jun 2014 06:25:23 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5GBPNYQ025870; Mon, 16 Jun 2014 06:25:23 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Mon, 16 Jun 2014 06:25:23 -0500 Received: from uda0393807.india.ti.com. (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5GBOx40008965; Mon, 16 Jun 2014 06:25:18 -0500 From: Sricharan R To: , , , Subject: [PATCH V3 03/16] irqchip: crossbar: introduce ti,irqs-skip to skip Date: Mon, 16 Jun 2014 16:53:03 +0530 Message-ID: <1402917796-31574-4-git-send-email-r.sricharan@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402917796-31574-1-git-send-email-r.sricharan@ti.com> References: <1402917796-31574-1-git-send-email-r.sricharan@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140616_042551_814021_09554B2D X-CRM114-Status: GOOD ( 11.42 ) X-Spam-Score: -5.7 (-----) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-5.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [198.47.26.153 listed in wl.mailspike.net] -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [198.47.26.153 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: nm@ti.com, linux@arm.linux.org.uk, jason@lakedaemon.net, tony@atomide.com, rnayak@ti.com, r.sricharan@ti.com, santosh.shilimkar@ti.com, joe@perches.com, tglx@linutronix.de 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+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: r.sricharan@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.128.171 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 From: Nishanth Menon When, in the system due to varied reasons, interrupts might be unusable due to hardware behavior, but register maps do exist, then those interrupts should be skipped while mapping irq to crossbars. Signed-off-by: Nishanth Menon Signed-off-by: Sricharan R --- [V3] introduced ti,irqs-skip dt property to list the irqs to be skipped. .../devicetree/bindings/arm/omap/crossbar.txt | 4 ++++ drivers/irqchip/irq-crossbar.c | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/omap/crossbar.txt b/Documentation/devicetree/bindings/arm/omap/crossbar.txt index fb88585..cfcbd52 100644 --- a/Documentation/devicetree/bindings/arm/omap/crossbar.txt +++ b/Documentation/devicetree/bindings/arm/omap/crossbar.txt @@ -17,6 +17,10 @@ Required properties: so crossbar bar driver should not consider them as free lines. +Optional properties: +- ti,irqs-skip: This is similar to "ti,irqs-reserved", but are irq mappings + which are not supposed to be used for errata or other reasons(virtualization). + Examples: crossbar_mpu: @4a020000 { compatible = "ti,irq-crossbar"; diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 51d4b87..27049de 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -18,6 +18,7 @@ #define IRQ_FREE -1 #define IRQ_RESERVED -2 +#define IRQ_SKIP -3 #define GIC_IRQ_START 32 /* @@ -160,6 +161,25 @@ static int __init crossbar_of_init(struct device_node *node) } } + /* Skip the ones marked as skip */ + irqsr = of_get_property(node, "ti,irqs-skip", &size); + if (irqsr) { + size /= sizeof(__be32); + + for (i = 0; i < size; i++) { + of_property_read_u32_index(node, + "ti,irqs-skip", + i, &entry); + if (entry > max) { + pr_err("Invalid skip entry\n"); + ret = -EINVAL; + goto err3; + } + cb->irq_map[entry] = IRQ_SKIP; + } + } + + cb->register_offsets = kzalloc(max * sizeof(int), GFP_KERNEL); if (!cb->register_offsets) goto err3;