From patchwork Thu Oct 3 16:02:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2984751 Return-Path: X-Original-To: patchwork-linux-arm@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 486B0BFF0B for ; Thu, 3 Oct 2013 16:09:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A0105202C3 for ; Thu, 3 Oct 2013 16:09:22 +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 BFFAE201BF for ; Thu, 3 Oct 2013 16:09:17 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRlSQ-0008R3-9s; Thu, 03 Oct 2013 16:08:54 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRlNG-0008PR-Pb; Thu, 03 Oct 2013 16:03:34 +0000 Received: from mail-ea0-f173.google.com ([209.85.215.173]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VRlND-0008OX-QF for linux-arm-kernel@lists.infradead.org; Thu, 03 Oct 2013 16:03:33 +0000 Received: by mail-ea0-f173.google.com with SMTP id g10so1210074eak.4 for ; Thu, 03 Oct 2013 09:03:08 -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=s7oMmJ/22Yqg+vBkL3cOTjhH5tLWp0ZTGUCjoL+4X34=; b=IVeWzz5YKy8pIdG+GhK1uQGd5QMf3tnR7+B3gz8f9RvWyx8XtgRHNoPwSFANUtPfQj zHO+kv96gnngMTQgolbO3lUB0Tjen34nxvUqxA3Pv/fA9xYAcDn07gJL82mAqw6mQx42 MkzO2cTnALqMXcDn3FUaNSc0uN57gFhWk6pjzKxVeTB4UDFI1DFvuOrSD2ugSN8d6GYC gEEcA8JCqTY1kZGaA9vmQbH9iyB+YSYSAS2aeAd86tL75xdCxoDHR7QLGR/g1orVv8fV lu8cJsUO2N/ynU0nTnMTcE//Tsd/32mX5zO87n5s7uFz7izad2f8l+NJrJ6Quizo+x/S gcLg== X-Gm-Message-State: ALoCoQlKRCxuSRl+qgCOrmtIw9NITsN8qzwnjlAzfEddR210SgCEnn7OE4trVp19ixlCCe4Gf7vs X-Received: by 10.14.107.68 with SMTP id n44mr13893635eeg.26.1380816188426; Thu, 03 Oct 2013 09:03:08 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id b45sm17302981eef.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Oct 2013 09:03:07 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/6] ARM: integrator: get the LM interrupts from DT Date: Thu, 3 Oct 2013 18:02:57 +0200 Message-Id: <1380816177-3046-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-20131003_120331_971447_9D82173D X-CRM114-Status: GOOD ( 12.07 ) X-Spam-Score: -2.6 (--) Cc: 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.9 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 --- Documentation/devicetree/bindings/arm/arm-boards | 20 ++++++++++++++++++++ arch/arm/boot/dts/integratorap.dts | 3 +++ arch/arm/mach-integrator/integrator_ap.c | 2 +- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards index db5858e..06e5370 100644 --- a/Documentation/devicetree/bindings/arm/arm-boards +++ b/Documentation/devicetree/bindings/arm/arm-boards @@ -9,9 +9,29 @@ 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 logical module interrupts, +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 logical 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..7c8925f 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);