From patchwork Mon Dec 28 08:26:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 7925031 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 F1743BEEE5 for ; Mon, 28 Dec 2015 08:29:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 08E3620251 for ; Mon, 28 Dec 2015 08:29:01 +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 EECDD20131 for ; Mon, 28 Dec 2015 08:28:59 +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 1aDT9E-0002eL-7N; Mon, 28 Dec 2015 08:27:20 +0000 Received: from mail-out.m-online.net ([212.18.0.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aDT9A-0002cU-BL for linux-arm-kernel@lists.infradead.org; Mon, 28 Dec 2015 08:27:17 +0000 Received: from mail.nefkom.net (unknown [192.168.8.184]) by mail-out.m-online.net (Postfix) with ESMTP id 3pTX6P2TQ4z3hjjj; Mon, 28 Dec 2015 09:26:53 +0100 (CET) X-Auth-Info: FidqutBwQN4Ab7pSDtQu6BjbzgCa/MOaVl+U9VGjR44= Received: from chi.localnet (unknown [195.140.253.167]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp-auth.mnet-online.de (Postfix) with ESMTPSA id 3pTX6N6Ng5zvdWt; Mon, 28 Dec 2015 09:26:52 +0100 (CET) From: Marek Vasut To: Ley Foon Tan Subject: Re: [PATCH] doc: PCI: altera: Fix the 'ranges' property in example Date: Mon, 28 Dec 2015 09:26:52 +0100 User-Agent: KMail/1.13.7 (Linux/3.14-2-amd64; KDE/4.13.1; x86_64; ; ) References: <1450950330-28393-1-git-send-email-marex@denx.de> <201512280834.52893.marex@denx.de> In-Reply-To: MIME-Version: 1.0 Message-Id: <201512280926.53004.marex@denx.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151228_002716_731445_FCDED278 X-CRM114-Status: GOOD ( 26.55 ) X-Spam-Score: -2.6 (--) 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: Bjorn Helgaas , Marc Zyngier , linux-arm 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.2 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 On Monday, December 28, 2015 at 08:42:00 AM, Ley Foon Tan wrote: > On Mon, Dec 28, 2015 at 3:34 PM, Marek Vasut wrote: > > On Monday, December 28, 2015 at 07:56:15 AM, Ley Foon Tan wrote: > >> On Thu, 2015-12-24 at 10:45 +0100, Marek Vasut wrote: > >> > The example does not work on real hardware with the PCIe HIP [1]. > >> > The problem is with incorrect "ranges" property in the example, so > >> > one cannot just copy-paste the example into his DT and expect this > >> > to work. This patches aligns the "ranges" in the example with the > >> > reference FPGA design. > >> > >> Hi Marek > > > > Hi Ley, > > > >> The original "ranges" is working for me. What error did you encounter? > > > > Every time a driver accessed the Txs range, the system got stuck hard. > > The Cra access always worked fine though, so the PCIe devices were always > > detected. > > > > I checked with signaltap and my impression is that the wrong address > > propagated into the request passed to the Txs port of the HardIP block, > > unless I change the range configuration. > > > > Note that I tested Intel Centrino 6235 WiFi card and Atheros AR5006 WiFi > > card. The intel in particular uses both the Txs and even MSI , so to use > > the intel, the whole PCIe block has to work properly ; with this change, > > it does and I can use the intel card just fine. > > > >> Thanks. > > Hi Marek > > I tested two Ethernet adapters, one SSD NVMe and our custom endpoint > without the problem. > Can you please send me your dts file if possible? > > Do you use the latest Altera pcie driver in v4.4? I'm using next from 20151223, crude patch is attached. Best regards, Marek Vasut From 1dad1fbe4c5fb50e3f1672348de4a2b50ffd6ff1 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Thu, 24 Dec 2015 09:21:45 +0100 Subject: [PATCH] ARM: socfpga: Enable PCIe support Add DT bits to enable PCIe support on the DENX MCV EVK with MCV SoM. Signed-off-by: Marek Vasut Cc: Alan Tull Cc: Dinh Nguyen Cc: Olof Johansson Cc: Steffen Trumtrar Cc: Thor Thayer Cc: Vince Bridgers --- arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts b/arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts index 7186a29..e56e23e 100644 --- a/arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts +++ b/arch/arm/boot/dts/socfpga_cyclone5_mcvevk.dts @@ -29,6 +29,40 @@ chosen { stdout-path = "serial0:115200n8"; }; + + pcie_0: pcie@0xc00000000 { + compatible = "altr,pcie-root-port-1.0"; + reg = <0xc0000000 0x20000000>, + <0xff220000 0x00004000>; + reg-names = "Txs", "Cra"; + interrupt-parent = <&intc>; + interrupts = <0 40 4>; + interrupt-controller; + #interrupt-cells = <1>; + bus-range = <0x0 0xFF>; + device_type = "pci"; + msi-parent = <&msi0>; + #address-cells = <3>; + #size-cells = <2>; + interrupt-map-mask = <0 0 0 7>; + interrupt-map = <0 0 0 1 &pcie_0 1>, + <0 0 0 2 &pcie_0 2>, + <0 0 0 3 &pcie_0 3>, + <0 0 0 4 &pcie_0 4>; + ranges = <0x82000000 0x00000000 0xc0000000 0xc0000000 0x00000000 0x10000000 + 0x82000000 0x00000000 0xd0000000 0xd0000000 0x00000000 0x10000000>; + }; + + msi0: msi@0xFF200000 { + compatible = "altr,msi-1.0"; + reg = <0xFF200080 0x00000010 + 0xFF200000 0x00000080>; + reg-names = "csr", "vector_slave"; + interrupt-parent = <&intc>; + interrupts = <0 41 4>; + msi-controller; + num-vectors = <32>; + }; }; &can0 { -- 2.1.4