From patchwork Wed Jul 1 16:47:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gabriele Paoloni X-Patchwork-Id: 6705261 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 99B7CC05AC for ; Wed, 1 Jul 2015 16:52:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D85120738 for ; Wed, 1 Jul 2015 16:52:00 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3F9820701 for ; Wed, 1 Jul 2015 16:51:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZALBw-0006nq-Ma; Wed, 01 Jul 2015 16:48:56 +0000 Received: from lhrrgout.huawei.com ([194.213.3.17]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZALBs-0006fI-KP for linux-arm-kernel@lists.infradead.org; Wed, 01 Jul 2015 16:48:54 +0000 Received: from 172.18.7.190 (EHLO lhreml402-hub.china.huawei.com) ([172.18.7.190]) by lhrrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id BUP24633; Wed, 01 Jul 2015 16:48:02 +0000 (GMT) Received: from LHREML503-MBS.china.huawei.com ([10.125.30.104]) by lhreml402-hub.china.huawei.com ([10.201.5.241]) with mapi id 14.03.0158.001; Wed, 1 Jul 2015 17:47:51 +0100 From: Gabriele Paoloni To: James Morse , "Wangzhou (B)" , Bjorn Helgaas , Jingoo Han , Pratyush Anand , "Arnd Bergmann" , Liviu Dudau , "kishon@ti.com" , "xobs@kosagi.com" , "m-karicheri2@ti.com" , "Minghuan.Lian@freescale.com" Subject: RE: [PATCH v3 2/5] PCI: designware: Add ARM64 support Thread-Topic: [PATCH v3 2/5] PCI: designware: Add ARM64 support Thread-Index: AQHQs+GavGWd6N30AUWEXfKIZ8LVOJ3GmoGAgAAA04CAADaFoA== Date: Wed, 1 Jul 2015 16:47:51 +0000 Message-ID: References: <1435743817-19083-1-git-send-email-wangzhou1@hisilicon.com> <1435743817-19083-3-git-send-email-wangzhou1@hisilicon.com> <5593F899.6050306@arm.com> In-Reply-To: <5593F899.6050306@arm.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.122.142.33] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150701_094853_150903_35611B2D X-CRM114-Status: GOOD ( 21.47 ) X-Spam-Score: -4.8 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhudacai , "devicetree@vger.kernel.org" , "linux-pci@vger.kernel.org" , Yuanzhichang , qiuzhenfa , zhangjukuo , "Liguozhu \(Kenneth\)" , "linux-arm-kernel@lists.infradead.org" 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.8 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 > -----Original Message----- > From: linux-pci-owner@vger.kernel.org [mailto:linux-pci- > owner@vger.kernel.org] On Behalf Of James Morse > Sent: Wednesday, July 01, 2015 3:27 PM > To: Gabriele Paoloni; Wangzhou (B); Bjorn Helgaas; Jingoo Han; Pratyush > Anand; Arnd Bergmann; Liviu Dudau; kishon@ti.com; xobs@kosagi.com; m- > karicheri2@ti.com; Minghuan.Lian@freescale.com > Cc: linux-pci@vger.kernel.org; linux-arm-kernel@lists.infradead.org; > devicetree@vger.kernel.org; Yuanzhichang; Zhudacai; zhangjukuo; > qiuzhenfa; Liguozhu (Kenneth) > Subject: Re: [PATCH v3 2/5] PCI: designware: Add ARM64 support > > Zhou Wang wrote: > > I tested this patch on D02 board of Hisilicon. It works well. > > I have compiled the driver with multi_v7_defconfig. However, I don't > > have > > ARM32 PCIe related board to do test. It will be appreciated if > someone > > could > > help to test it. > > > > Signed-off-by: Zhou Wang > > Signed-off-by: Arnd Bergmann > > Signed-off-by: Gabriele Paoloni > > Tested-by: Fabrice Gasnier > > Tested-by: James Morse > > Tests on this new series, using the same i.MX 6Quad board, are not > working. > > The network card is no longer detected, and I get a lockup when > removing > the root bridge and rescanning. > > Partial dmesg output below. Significantly, the lines: > > [ 0.152128] PCI host bridge /soc/pcie@0x01000000 ranges: > > [ 0.152142] No bus range found for /soc/pcie@0x01000000, using > [bus > 00-ff] > are new. > > Both series are applied to v4.1, use the same .config file, and the > same dtb. > I will investigate further. > > (Re-testing v2 works, so this isn't an interim hardware failure) This is a bit weird.... Patch 2/5 is the only one that affect platforms different from Hisilicon The only difference between V3 patch[2/5] and v2 patch[2/4] is ************* ************** That is present in v3 but not in v2. And it should affect keystone only....so using patch v3 on the same branch where you applied patch v2 I would expect the same results... > > Thanks, > > James > > > > root@localhost:~# dmesg | grep -i pci > [ 0.126184] PCI: CLS 0 bytes, default 64 > [ 0.152128] PCI host bridge /soc/pcie@0x01000000 ranges: > [ 0.152142] No bus range found for /soc/pcie@0x01000000, using > [bus 00-ff] > [ 0.154183] imx6q-pcie 1ffc000.pcie: PCI host bridge to bus 0000:00 > [ 0.154201] pci_bus 0000:00: root bus resource [bus 00-ff] > [ 0.154215] pci_bus 0000:00: root bus resource [??? > 0x01f00000-0x01f7ffff flags 0x0] > [ 0.154228] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] > [ 0.154270] pci_bus 0000:00: root bus resource [mem 0x01000000- > 0x01efffff] > [ 0.154306] pci 0000:00:00.0: [16c3:abcd] type 01 class 0x060400 > [ 0.154333] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff] > [ 0.154352] pci 0000:00:00.0: reg 0x38: [mem 0x00000000-0x0000ffff > pref] > [ 0.154377] pci 0000:00:00.0: IOMMU is currently not supported for > PCI > [ 0.154429] pci 0000:00:00.0: supports D1 > [ 0.154440] pci 0000:00:00.0: PME# supported from D0 D1 D3hot D3cold > [ 0.154683] PCI: bus0: Fast back to back transfers disabled > [ 0.154806] PCI: bus1: Fast back to back transfers enabled > [ 0.154884] pci 0000:00:00.0: BAR 0: assigned [mem 0x01000000- > 0x010fffff] > [ 0.154903] pci 0000:00:00.0: BAR 6: assigned [mem 0x01100000- > 0x0110ffff > pref] > [ 0.154917] pci 0000:00:00.0: PCI bridge to [bus 01] > [ 0.155145] pcieport 0000:00:00.0: Signaling PME through PCIe PME > interrupt > [ 0.155161] pcie_pme 0000:00:00.0:pcie01: service driver pcie_pme > loaded > [ 0.155279] aer 0000:00:00.0:pcie02: service driver aer loaded > [ 1.188840] ehci-pci: EHCI PCI platform driver > [ 1.232518] ohci-pci: OHCI PCI platform driver > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/host/pci-keystone-dw.c b/drivers/pci/host/pci-keystone-dw.c index f34892e..b1e4135 100644 --- a/drivers/pci/host/pci-keystone-dw.c +++ b/drivers/pci/host/pci-keystone-dw.c @@ -327,7 +327,7 @@ static void ks_dw_pcie_clear_dbi_mode(void __iomem *reg_virt) void ks_dw_pcie_setup_rc_app_regs(struct keystone_pcie *ks_pcie) { struct pcie_port *pp = &ks_pcie->pp; - u32 start = pp->mem.start, end = pp->mem.end; + u32 start = pp->mem->start, end = pp->mem->end; int i, tr_size; /* Disable BARs for inbound access */