From patchwork Sat Apr 20 13:56:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 2468081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id D1BD73FD40 for ; Sat, 20 Apr 2013 14:27:06 +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 1UTYKB-00079g-40; Sat, 20 Apr 2013 13:59:48 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UTYIS-0006aE-IN; Sat, 20 Apr 2013 13:57:44 +0000 Received: from mail-la0-x22f.google.com ([2a00:1450:4010:c03::22f]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UTYHj-0006XI-0a for linux-arm-kernel@lists.infradead.org; Sat, 20 Apr 2013 13:57:00 +0000 Received: by mail-la0-f47.google.com with SMTP id ez20so467927lab.34 for ; Sat, 20 Apr 2013 06:56:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=djqKI0KAbLTp6HRCy/5e8aCRgCkY8I4A+rdGpsfLMI0=; b=YpK2sdME/wT+CDHWws9dqvAQG5ceIcvEuTGwOpSQcZ9WLieTRgtwiagZStIQUbVFCR sSKGOuTJ9SAbivuINQofHaSzwDD5w5OeMq2h+zLAr9J84NJzg80cckl8EPGN6rlOwQbB s/WeVfZbQsIoB7IMPGEVEnTxF+DJ+3lVMb5mNsLgXnxB2xT0MGLH4omglT3RQvqcM0aM +oassRFhA/kjxoZviyj6VXX/FqM78gBkgO/eFAfrRM+q20jT3tFzGX6sQzWRjAdbyY++ FHMiPUMGeiomjOhbxPf9r/bUe2cXCvAmDz9feNBvi4fH1i/M57offnHTfxhu8PIbVsmx eIQw== X-Received: by 10.112.129.170 with SMTP id nx10mr9969939lbb.81.1366466216800; Sat, 20 Apr 2013 06:56:56 -0700 (PDT) Received: from localhost.localdomain (c83-249-208-67.bredband.comhem.se. [83.249.208.67]) by mx.google.com with ESMTPS id wc5sm3850523lbb.13.2013.04.20.06.56.55 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 20 Apr 2013 06:56:55 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH 12/12] ARM: integrator: get PCI device IRQs from device tree Date: Sat, 20 Apr 2013 15:56:54 +0200 Message-Id: <1366466214-15714-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.1.4 X-Gm-Message-State: ALoCoQkV6igJjNo3TDnClDqDki/smGbp/udcxBSXdlucYVMcO+T8PrygLEkvLx5BfNaIH+fg4KJ2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130420_095659_261298_81E3F0A2 X-CRM114-Status: GOOD ( 13.81 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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 This adds the interrupt-map property to the PCIv3 DTS file and makes the bridge obtain mappings from the device tree. Acked-by: Arnd Bergmann Signed-off-by: Linus Walleij --- arch/arm/boot/dts/integratorap.dts | 24 ++++++++++++++++++++++++ arch/arm/mach-integrator/pci_v3.c | 23 ++++++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/integratorap.dts b/arch/arm/boot/dts/integratorap.dts index 9c78130..03f23b7 100644 --- a/arch/arm/boot/dts/integratorap.dts +++ b/arch/arm/boot/dts/integratorap.dts @@ -41,6 +41,7 @@ pci: pciv3@62000000 { compatible = "v3,v360epc-pci"; + #interrupt-cells = <1>; #size-cells = <2>; #address-cells = <3>; reg = <0x62000000 0x10000>; @@ -54,6 +55,29 @@ 0x40000000 0 0x10000000 /* 256 MiB @ 40000000 */ 0x42000000 0 0x50000000 /* prefetchable memory */ 0x50000000 0 0x10000000>; /* 256 MiB @ 50000000 */ + interrupt-map-mask = <0xf800 0 0 0x7>; + interrupt-map = < + /* IDSEL 9 */ + 0x4800 0 0 1 &pic 13 /* INT A on slot 9 is irq 13 */ + 0x4800 0 0 2 &pic 14 /* INT B on slot 9 is irq 14 */ + 0x4800 0 0 3 &pic 15 /* INT C on slot 9 is irq 15 */ + 0x4800 0 0 4 &pic 16 /* INT D on slot 9 is irq 16 */ + /* IDSEL 10 */ + 0x5000 0 0 1 &pic 14 /* INT A on slot 10 is irq 14 */ + 0x5000 0 0 2 &pic 15 /* INT B on slot 10 is irq 15 */ + 0x5000 0 0 3 &pic 16 /* INT C on slot 10 is irq 16 */ + 0x5000 0 0 4 &pic 13 /* INT D on slot 10 is irq 13 */ + /* IDSEL 11 */ + 0x5800 0 0 1 &pic 15 /* INT A on slot 11 is irq 15 */ + 0x5800 0 0 2 &pic 16 /* INT B on slot 11 is irq 16 */ + 0x5800 0 0 3 &pic 13 /* INT C on slot 11 is irq 13 */ + 0x5800 0 0 4 &pic 14 /* INT D on slot 11 is irq 14 */ + /* IDSEL 12 */ + 0x6000 0 0 1 &pic 16 /* INT A on slot 12 is irq 16 */ + 0x6000 0 0 2 &pic 13 /* INT B on slot 12 is irq 13 */ + 0x6000 0 0 3 &pic 14 /* INT C on slot 12 is irq 14 */ + 0x6000 0 0 4 &pic 15 /* INT D on slot 12 is irq 15 */ + >; }; fpga { diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index 8932eb3..020048a 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include