From patchwork Thu Oct 10 14:13:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20938 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E6A942611D for ; Thu, 10 Oct 2013 14:14:05 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id g12sf8793019oah.9 for ; Thu, 10 Oct 2013 07:14:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=JYx28YpddhehSkSmRMlExVfbuQO7kdUVOf/SbZCZdPk=; b=GlitgmLEvIu+bRw6f+FX1GHT1GbkvO4TxULlzDV3xRZtq9JgGWVG0CiM0Z9oACFyJ/ IoWtVIW23qIIq/dq1RhTl6pxTK/sBptOFFKuBOOrxVDX9Kk0CPRlWOLh+HweNeL1YXRy HMw0GUL3NJxwGIgJkoZcF2Du4dS24OX0emIka1DU+diTqLY32sTeR0fCsyd0UhuBfOTm JhjWa2MlrD0VgYiqDb8IcUiQcRgmvdngK1dLmPoeAKIBdIQFJI+jrl9BQ6vLwGiFF6CX XJqCabDWwFsNdaGfvZJ0o2POECzzTU0+r2+Ef629ecKOzeC5Izw8dTUNQYHuHhEocDor ezhw== X-Received: by 10.42.136.136 with SMTP id u8mr6228652ict.16.1381414445510; Thu, 10 Oct 2013 07:14:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.74.69 with SMTP id r5ls987049qev.1.gmail; Thu, 10 Oct 2013 07:14:05 -0700 (PDT) X-Received: by 10.52.122.71 with SMTP id lq7mr13497vdb.65.1381414445305; Thu, 10 Oct 2013 07:14:05 -0700 (PDT) Received: from mail-vb0-f43.google.com (mail-vb0-f43.google.com [209.85.212.43]) by mx.google.com with ESMTPS id dj3si14312253vcb.119.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 07:14:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.43; Received: by mail-vb0-f43.google.com with SMTP id h11so1670969vbh.30 for ; Thu, 10 Oct 2013 07:14:05 -0700 (PDT) X-Gm-Message-State: ALoCoQkts8+r5lyMjV2l0OCzfn738SOX1YL6TTHnb8GITllDPioctGnxLRUsA6nO6+76Gs2zdqmX X-Received: by 10.220.178.200 with SMTP id bn8mr7293652vcb.95.1381414445167; Thu, 10 Oct 2013 07:14:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp379136vcz; Thu, 10 Oct 2013 07:14:04 -0700 (PDT) X-Received: by 10.194.158.67 with SMTP id ws3mr12423541wjb.5.1381414443142; Thu, 10 Oct 2013 07:14:03 -0700 (PDT) Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by mx.google.com with ESMTPS id q4si18663662wjz.11.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 07:14:03 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.49 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.49; Received: by mail-wg0-f49.google.com with SMTP id x12so585571wgg.28 for ; Thu, 10 Oct 2013 07:14:02 -0700 (PDT) X-Received: by 10.180.187.51 with SMTP id fp19mr8070089wic.1.1381414442458; Thu, 10 Oct 2013 07:14:02 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id d11sm25815505wic.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2013 07:14:01 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org, Mark Rutland , Linus Walleij Subject: [PATCH 1/6 v2] ARM: integrator: get the LM interrupts from DT Date: Thu, 10 Oct 2013 16:13:52 +0200 Message-Id: <1381414432-17816-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.43 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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..8e32213 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..d566792 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);