From patchwork Fri May 24 09:13:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2609791 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 3B7FD40077 for ; Fri, 24 May 2013 09:13:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760070Ab3EXJNk (ORCPT ); Fri, 24 May 2013 05:13:40 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:54641 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760064Ab3EXJNk (ORCPT ); Fri, 24 May 2013 05:13:40 -0400 Received: from axis700.grange (dslb-094-221-108-142.pools.arcor-ip.net [94.221.108.142]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0Ls2t1-1UT2Sd1Km7-013HqC; Fri, 24 May 2013 11:13:04 +0200 Received: by axis700.grange (Postfix, from userid 1000) id D10F840BB4; Fri, 24 May 2013 11:13:03 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id CE07640BB3; Fri, 24 May 2013 11:13:03 +0200 (CEST) Date: Fri, 24 May 2013 11:13:03 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: Magnus Damm , Simon Horman , linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org Subject: [PATCH 1/2] ARM: shmobile: irqpin: add a DT property to enable masking on parent Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:Jy92qNsJX+/OIdGR7jxdAQHt1TTTDnUhWsaWoskKnrr Xm8uE7NoqCbkE6xKn/PBgsxQHelxszI54kEebN3FG/uWFaMFTF 8hIQ/R09RI+ulauunLKDLbllYuiWAb87AfanT7yVjgCV4iWj9O Py8GNW0SJ54Grg+aLDKQrFZc3Jk0+ZsteH/joZLTBuuAWKPsva xzQ1RUu2IUxpIyFn0UO/FWGJWpl/hI9QiFniwt7G9g1hQvtZpt +kxY8ieif0xy0kT4bdU6btjO/RLkqFgtkV6liznh17Xo4/Rktr cqTmNNha4oZ9w7pKV7dD2gY4PrxUXXYZ3FkWswMMrCIig521Tp WVTxMD5uviWUaAljccfjQErMIUYirZQsXU7tQdL87sJhQonLRF IEVz89XZcfPoA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org To disable spurious interrupts, that get triggered on certain hardware, the irqpin driver masks them on the parent interrupt controller. To specify such broken devices a .control_parent parameter can be provided in the platform data. In the DT case we need a property, to do the same. Signed-off-by: Guennadi Liakhovetski Acked-by: Magnus Damm --- These two patches simply split the earlier "ARM: shmobile: irqpin: fix handling of spurious interrupts in DT case" patch into two parts. Otherwise no change. .../interrupt-controller/renesas,intc-irqpin.txt | 2 ++ drivers/irqchip/irq-renesas-intc-irqpin.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt index c6f09b7..152b10a 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt @@ -11,3 +11,5 @@ Optional properties: resource allocation properties - sense-bitfield-width: width of a single sense bitfield in the SENSE register, if different from the default 4 bits +- control-parent: disable and enable interrupts on the parent interrupt + controller, needed for some broken implementations diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c index 4aca1b2..82cec63 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -348,11 +348,14 @@ static int intc_irqpin_probe(struct platform_device *pdev) } /* deal with driver instance configuration */ - if (pdata) + if (pdata) { memcpy(&p->config, pdata, sizeof(*pdata)); - else + } else { of_property_read_u32(pdev->dev.of_node, "sense-bitfield-width", &p->config.sense_bitfield_width); + p->config.control_parent = of_property_read_bool(pdev->dev.of_node, + "control-parent"); + } if (!p->config.sense_bitfield_width) p->config.sense_bitfield_width = 4; /* default to 4 bits */