From patchwork Thu Oct 10 14:57:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 3016361 Return-Path: X-Original-To: patchwork-linux-arm@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 A59A89F243 for ; Thu, 10 Oct 2013 14:57:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 70B4E20306 for ; Thu, 10 Oct 2013 14:57:49 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8871B202F0 for ; Thu, 10 Oct 2013 14:57:44 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUHgL-0004vG-43; Thu, 10 Oct 2013 14:57:41 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUHgI-0000eu-6q; Thu, 10 Oct 2013 14:57:38 +0000 Received: from mail-wg0-f47.google.com ([74.125.82.47]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUHgE-0000e2-PX for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2013 14:57:35 +0000 Received: by mail-wg0-f47.google.com with SMTP id f12so2585042wgh.26 for ; Thu, 10 Oct 2013 07:57:12 -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=K+ukUQyy9Be54S4cbfbWmfQVG1ZRByh8OKzptZjISDo=; b=hdVDzVQe3CtLsfTupRaM+ms6k867ZJS7DZl5tYD/UMH+EgX8hvwdB1qjFj3JR//VoB IqOfUPHbKzZ8e7YSrn+SSFqaMdIzjNynVJOi7zV4p82UoPG6iNxXLJg76SuMeQnAdGIA MMRewIjFQjWWJka+nrhEiiScCqrssJvdDAlrDbXggP5xOyEV0cW0Rr+oOdJ5fKLgFuxc bsSq4SZ5ktnC6hGAbPEGqVrPFM0t2YfsFkgaTDcigf2GtDam22MEPmvlY7/NTkOuhJ8p inPYLVhOVgmjKSzhjIbciVFiPQCAzT3kq+AR3zRWF0QTdDa3VRzuo1KriNwUV8sEKO4f KGeA== X-Gm-Message-State: ALoCoQkfe4nkBPPRNrITQGx8QYJBElImU+54NlcHSZoXPm9ELpkTDUe/j/D9LW7orU+0NaThAuy5 X-Received: by 10.194.222.2 with SMTP id qi2mr12792799wjc.14.1381417032680; Thu, 10 Oct 2013 07:57:12 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id s4sm2022520wiy.1.1969.12.31.16.00.00 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2013 07:57:11 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6 v3] ARM: integrator: get the LM interrupts from DT Date: Thu, 10 Oct 2013 16:57:06 +0200 Message-Id: <1381417026-5791-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131010_105734_930300_7D111D06 X-CRM114-Status: GOOD ( 13.06 ) X-Spam-Score: -2.6 (--) Cc: Mark Rutland , devicetree@vger.kernel.org, Linus Walleij X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 The OF/DT boot path needs to get the LM (Logical Module) IRQs from the device tree for coherency. This augments the DT syscon node to contain these IRQs and alter the DT LM code to get them from there. Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Add some essential commas in the list. Mea culpa. ChangeLog v1->v2: - Updated documentation in accordance with Mark Ruthlands review comments. --- Documentation/devicetree/bindings/arm/arm-boards | 21 +++++++++++++++++++++ arch/arm/boot/dts/integratorap.dts | 3 +++ arch/arm/mach-integrator/integrator_ap.c | 2 +- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards index db5858e..5fdd7b9 100644 --- a/Documentation/devicetree/bindings/arm/arm-boards +++ b/Documentation/devicetree/bindings/arm/arm-boards @@ -9,9 +9,30 @@ Required properties (in root node): FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. +Required nodes: + In the root node the Integrator/CP must have a /cpcon node pointing to the CP control registers, and the Integrator/AP must have a /syscon node pointing to the Integrator/AP system controller. +The AP syscon node must include the logic module interrupts, stated +in order of module instance +example: + +/dts-v1/; +/include/ "integrator.dtsi" + +/ { + model = "ARM Integrator/AP"; + compatible = "arm,integrator-ap"; + + syscon { + /* AP system controller registers */ + reg = <0x11000000 0x100>; + interrupt-parent = <&pic>; + /* These are the logic module IRQs */ + interrupts = <9>, <10>, <11>, <12>; + }; +}; ARM Versatile Application and Platform Baseboards diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts index b6b82ec..453ab0e 100644 --- a/arch/arm/boot/dts/integratorap.dts +++ b/arch/arm/boot/dts/integratorap.dts @@ -21,6 +21,9 @@ syscon { /* AP system controller registers */ reg = <0x11000000 0x100>; + interrupt-parent = <&pic>; + /* These are the logical module IRQs */ + interrupts = <9>, <10>, <11>, <12>; }; timer0: timer@13000000 { diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index d9e95e6..f5fbd8a 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c @@ -541,7 +541,7 @@ static void __init ap_init_of(void) lmdev->resource.start = 0xc0000000 + 0x10000000 * i; lmdev->resource.end = lmdev->resource.start + 0x0fffffff; lmdev->resource.flags = IORESOURCE_MEM; - lmdev->irq = IRQ_AP_EXPINT0 + i; + lmdev->irq = irq_of_parse_and_map(syscon, i); lmdev->id = i; lm_device_register(lmdev);