From patchwork Wed Jun 19 05:53:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2747101 Return-Path: X-Original-To: patchwork-linux-sh@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 BACD0C0AB1 for ; Wed, 19 Jun 2013 05:53:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD60E201B7 for ; Wed, 19 Jun 2013 05:53:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DFC02019A for ; Wed, 19 Jun 2013 05:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756421Ab3FSFxS (ORCPT ); Wed, 19 Jun 2013 01:53:18 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:54607 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756390Ab3FSFxR (ORCPT ); Wed, 19 Jun 2013 01:53:17 -0400 Received: from axis700.grange (dslb-178-006-247-011.pools.arcor-ip.net [178.6.247.11]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0MQJq4-1UjeTi2UKi-00TsOx; Wed, 19 Jun 2013 07:53:10 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 131EE40BB4; Wed, 19 Jun 2013 07:53:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 1065F40BB3; Wed, 19 Jun 2013 07:53:10 +0200 (CEST) Date: Wed, 19 Jun 2013 07:53:09 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-sh@vger.kernel.org cc: Simon Horman , Magnus Damm , devicetree-discuss@lists.ozlabs.org Subject: [PATCH v2] ARM: shmobile: irqpin: add a DT property to enable masking on parent Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:tZAGY3q6abVOe4PBfKn1TiMpQTkFW4FEZM07qWU2NkB 7udiFEvO2eKcWl2sa1+wkh/Dqym4J4byIxGEbEwrSrm94XgJDX /yffCQiOxJ6T+Ef+k+WnSSFq0JDo147n5eqS9vI1W2w50lb/uB cyOyMOCKiY6hwQcNoIWTrjICydBWXdR6axx1QPxSJIjzMp8a2i wSZHnuGcoe1pbw6iIDdYy0zDBOe9OUY2iBf7cixZ7tEyCT1fuB tUsldPYbDvaHp/E2d1XZkwYKI9UXe4VTnXlc6fiNfvKJWzmtJf EmgFjXBNNUnWpe+S3PV6nG1mNCJG2EPPLC6TjCiTOM8uBGf2Qh JtinmEVTexUb1VIDcS57McbOBLSpbu13g5Xl/BKd28NB8BKhJf zX+0W8l78uPYA== Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, 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 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 --- v2: rebased on top of the current tree, also added Acked-by from Magnus .../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 66fcaf5..1f8b0c5 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt @@ -12,3 +12,5 @@ Optional properties: 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 */