From patchwork Mon Oct 9 18:43:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Smirnov X-Patchwork-Id: 9994061 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 748C060223 for ; Mon, 9 Oct 2017 18:44:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6819021F61 for ; Mon, 9 Oct 2017 18:44:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B9B325223; Mon, 9 Oct 2017 18:44:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D242E21F61 for ; Mon, 9 Oct 2017 18:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=iLhvAjqJ7ion75b0Mon/TpAi0hle4OKIBIQUyHKH6bc=; b=iRH 785j0mR4GSvNHws+B7bQHdSXEEUgX+3oGsLgckqMvvYtySLCbeeFSFJSrpXZ5TockKJrDN/kveJcb LGpTz7+u+8I4tz4n05I1UGclMBYkkYDjJGv6j82hQGJ4pK6y+CjvO7ySbLjZFYGZuAevOGLwuuVf9 S9pHI8gN0efVv0c0fIlAmhw+73QrBliYRxvwJ++v/+PQakm6bS2vRzR+X6gFrH77ytRds+WbaNqjj xfixhSWpeEPgnk9mL389JnzGc8Nvsz4nUc7FUFXUL2gXuIiCxi9kcUeJHmGOp4qXSXBloSpY+eCYK vtD6yW/1RYDtT2XAlbf1XPZ5653+eLg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e1d2S-0000yo-Ac; Mon, 09 Oct 2017 18:44:28 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e1d2N-0000uv-Tn for linux-arm-kernel@lists.infradead.org; Mon, 09 Oct 2017 18:44:25 +0000 Received: by mail-pf0-x241.google.com with SMTP id z11so12286763pfk.3 for ; Mon, 09 Oct 2017 11:44:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ct7wtwCUuf0pCgFyw6hnI0+3/YOOKUoP1qk7Rjdxp2M=; b=sjUTesgXalYYRksM8aVfwk1jpJ6ybOtqebPuHZAim9CQjJvdEfzLvb6mvbzboQ75pW PBaF3a9ntUIbC4lnlmyUr9gcnwbDQWUT4/EBSKmQT6O/Ir4RRWrfWUsjk64VcPbLmmfF EBGh7of7Wrd0zeG2lNaIZC5lbfRrOEHTMo1f/3hwszOvl6HAq0HFkY+mfRlKg8VPrNLw l5e/elCjX1kbNTzhuxPSWfwSG7B86CxYBcnN0igwjNrrgzbV5gMTrbhjGo1xmMDIqT2z IseJVC56AwWRuSSdJ/dQU70/6S00/o64SsxuPMG5oHZeZI/EwJBk2MGTnHPXi0Hao07I 0ZVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ct7wtwCUuf0pCgFyw6hnI0+3/YOOKUoP1qk7Rjdxp2M=; b=BVEweeiLgINwj706+CKBZJ6gU+qpJ1mPa2VXaWbgux3jLMBx7iKD+ReWHKVchr/PXn gAgKStDbSM3m41tnKoK13QqcqTZvWy2V4yv1BvJiKFt40ubtg+HtAritWubqMBjf6H1r QCnMROz613WLvAE3jCIeTRwhzCCkt0M5RrKzw9fCbja3G1RH0SIHo8f9eOHQVJ7Cyx/V lv/Xgc8aDrGUKlbIYhfxG3YXOY+iXfJOPEwJnEEUtF21lSosXeV3TzNRDkcPGpA/QNUE IoFze5gj1adsCs2jK3obXeqx+ercgFnarM2x4QwEEI2yT007JqxcDJ2xxnI1L2j829tW +TAw== X-Gm-Message-State: AMCzsaW8ScDkMD/Cp71MwbbB9OXhYyU1nP1MEK4UNUrfAq5NLus0cNn0 /VKi+M3KE0g1bh0Ok4DvY+o= X-Google-Smtp-Source: AOwi7QCTlLjFCROzWKK+aNkKsmu48M1ELWF9rR2YqGY5NNpC816zU0BIKJXDzyi0UHC+kWZxawqQMw== X-Received: by 10.84.177.195 with SMTP id x61mr9686334plb.286.1507574643157; Mon, 09 Oct 2017 11:44:03 -0700 (PDT) Received: from squirtle.westlake.spaceflightindustries.com ([173.226.206.194]) by smtp.gmail.com with ESMTPSA id z1sm15944763pge.45.2017.10.09.11.44.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2017 11:44:02 -0700 (PDT) From: Andrey Smirnov To: Shawn Guo Subject: [PATCH] ARM: dts: imx7d: Invert legacy PCI irq mapping Date: Mon, 9 Oct 2017 11:43:44 -0700 Message-Id: <20171009184344.5839-1-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.13.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171009_114424_009177_0C3A6624 X-CRM114-Status: GOOD ( 10.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Andrey Smirnov , linux-kernel@vger.kernel.org, Rob Herring , Fabio Estevam , linux-arm-kernel@lists.infradead.org, yurovsky@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP According to i.MX7D reference manual (Rev. 0.1, table 7-1, page 1221) legacy PCI interrupt mapping is as follows: - PCIE INT A is IRQ 122 - PCIE INT B is IRQ 123 - PCIE INT C is IRQ 124 - PCIE INT D is IRQ 125 Invert the mapping information in corresponding DT node to reflect that. Cc: Shawn Guo Cc: yurovsky@gmail.com Cc: Fabio Estevam Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Andrey Smirnov --- Discovered by using custom build of QEMU[1] when using together with "usb-ehci" which is, AFAIU, ICH4. A bit of a convoluted use-case, but I thought it would still be worht fixing. [1] https://github.com/ndreys/qemu/tree/imx7-support-upstreaming arch/arm/boot/dts/imx7d.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi index f46814a7ea44..4d308d17f040 100644 --- a/arch/arm/boot/dts/imx7d.dtsi +++ b/arch/arm/boot/dts/imx7d.dtsi @@ -144,10 +144,10 @@ interrupt-names = "msi"; #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0x7>; - interrupt-map = <0 0 0 1 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 2 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 3 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, - <0 0 0 4 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>; + interrupt-map = <0 0 0 1 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 2 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 3 &intc GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>, + <0 0 0 4 &intc GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX7D_PCIE_CTRL_ROOT_CLK>, <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>, <&clks IMX7D_PCIE_PHY_ROOT_CLK>;