From patchwork Wed May 29 11:48:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Cooper X-Patchwork-Id: 2629511 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 62CA4DF24C for ; Wed, 29 May 2013 11:49:31 +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 1UhesZ-0007qY-0C; Wed, 29 May 2013 11:49:19 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhesW-0003tF-2F; Wed, 29 May 2013 11:49:16 +0000 Received: from mho-03-ewr.mailhop.org ([204.13.248.66] helo=mho-01-ewr.mailhop.org) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UhesQ-0003sf-VS for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2013 11:49:14 +0000 Received: from pool-72-84-113-162.nrflva.fios.verizon.net ([72.84.113.162] helo=titan) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1Uhes4-000Awv-MY; Wed, 29 May 2013 11:48:48 +0000 Received: from titan.lakedaemon.net (localhost [127.0.0.1]) by titan (Postfix) with ESMTP id 9339F439DC0; Wed, 29 May 2013 07:48:46 -0400 (EDT) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 72.84.113.162 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18jw9VJEAVt3dGzEuHN44szmxmLiHaGVFM= Date: Wed, 29 May 2013 07:48:46 -0400 From: Jason Cooper To: Arnaud Ebalard Subject: Re: [PATCH] arm: kirkwood: convert NETGEAR ReadyNAS Duo v2 to use DT for the PCIe interface Message-ID: <20130529114846.GQ31290@titan.lakedaemon.net> References: <8738t6ycnm.fsf@natisbad.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8738t6ycnm.fsf@natisbad.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130529_074911_069863_EB0525A9 X-CRM114-Status: GOOD ( 22.88 ) 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 ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [204.13.248.66 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Thomas Petazzoni , Andrew Lunn , Russell King , linux-arm-kernel@lists.infradead.org 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Wed, May 29, 2013 at 12:15:09AM +0200, Arnaud Ebalard wrote: > Hi Jason and Thomas, > > Thomas, I am following your work on PCIe support for a .dts file I am > working on for (Armada 370-based) Netgear ReadyNAS 102 and noticed your > set of patches to convert kirkwood-based boards to use it in order to > simplify/remove board specific code. > > Jason, I gave your associated branch (jcooper/mvebu-next/pcie) a try > with following patch applied and can confirm USB 3.0 host controller > (connected to PCIe bus) is usable on Netgear ReadyNAS *Duo v2* > (88f6282-based brother of the 102). > > Note that I had to s/of_pci_range_parser()/of_pci_range_parser_init()/ > in drivers/pci/host/pci-mvebu.c to compile the kernel (this may already > have been fixed already): > > CHK kernel/config_data.h > drivers/pci/host/pci-mvebu.c: In function ‘mvebu_pcie_probe’: > drivers/pci/host/pci-mvebu.c:742:2: error: implicit declaration of function ‘of_pci_range_parser’ [-Werror=implicit-function-declaration] > cc1: some warnings being treated as errors > make[3]: *** [drivers/pci/host/pci-mvebu.o] Error 1 > make[2]: *** [drivers/pci/host] Error 2 > make[1]: *** [drivers/pci] Error 2 > make[1]: *** Waiting for unfinished jobs.... > > Can one of you take the patch below into account? Or > > Cheers, > > a+ > > Signed-off-by: Arnaud Ebalard > --- > arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts | 8 ++++++++ > arch/arm/mach-kirkwood/board-readynas.c | 1 - > 2 files changed, 8 insertions(+), 1 deletion(-) Hey, I had a little time to kill, so I went ahead and fixed this up. Let me know if this looks ok. I've applied it to mvebu/pcie_kirkwood, so you should just be able to pull that and test it. I'll push it up to arm-soc in a week or so. thx, Jason. ---->8----- commit 6bd98481ab346964344e05a041f35ff83cb3d00c Author: Arnaud Ebalard Date: Wed May 29 11:37:52 2013 +0000 arm: kirkwood: NETGEAR ReadyNAS Duo v2 init PCIe via DT Now that the mvebu-pcie driver is in place and enabled for kirkwood, convert to initializing PCIe via devicetree. Signed-off-by: Arnaud Ebalard Signed-off-by: Jason Cooper diff --git a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts index 1ca66ab..0f852b4 100644 --- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts +++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts @@ -111,6 +111,14 @@ status = "okay"; nr-ports = <2>; }; + + pcie-controller { + status = "okay"; + + pcie@1,0 { + status = "okay"; + }; + }; }; gpio-leds { diff --git a/arch/arm/mach-kirkwood/board-readynas.c b/arch/arm/mach-kirkwood/board-readynas.c index fb42c20..341b82d 100644 --- a/arch/arm/mach-kirkwood/board-readynas.c +++ b/arch/arm/mach-kirkwood/board-readynas.c @@ -24,5 +24,4 @@ static struct mv643xx_eth_platform_data netgear_readynas_ge00_data = { void __init netgear_readynas_init(void) { kirkwood_ge00_init(&netgear_readynas_ge00_data); - kirkwood_pcie_init(KW_PCIE0); }