From patchwork Wed Mar 19 14:34:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 3851011 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9353A9F370 for ; Wed, 19 Mar 2014 14:34:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CEC6203AC for ; Wed, 19 Mar 2014 14:34:49 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E06F2027D for ; Wed, 19 Mar 2014 14:34:48 +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 1WQHZp-0005rS-Pb; Wed, 19 Mar 2014 14:34:41 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQHZn-0005Qs-B8; Wed, 19 Mar 2014 14:34:39 +0000 Received: from mail-qa0-f45.google.com ([209.85.216.45]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQHZk-0005Q9-N1 for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 14:34:37 +0000 Received: by mail-qa0-f45.google.com with SMTP id hw13so8723355qab.32 for ; Wed, 19 Mar 2014 07:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=yzJtMkwauEFLwjAFMAYmI0ZAgwmWXMNZsRvp4qGRJw8=; b=XcMgFbR8BVIl1P6IYswHQGJKilUNEH9zgorQOgUi810jkIDJJJj1EleQ8zYMQPAGo2 CjvMFfd+22Hq9OrIjzEDOqEGnW2ZjlXCDWBfNqH/9GZBJKDD1g9MZ2E5X+jwDbzROkSP E6VijzRQC2Q2j/yFr5hGCe7/bK4AOApbdZsalX54iQaGixXv86JdfJXSnNN5Do6zH/bU ovDcFnT0VS3Hslg5Dqqp4EqyyVeAr3pWooHPduevYh+7QM/0EEIqe93m/2mxyLmUSYDw geXh5qYSRXNL7e3Jn3sS39k52jqs4vq4UfCpIX+XSA4ZJr7plvl0dBafaXjZOHgYQrJc 6GVw== X-Received: by 10.224.11.10 with SMTP id r10mr37416543qar.8.1395239652791; Wed, 19 Mar 2014 07:34:12 -0700 (PDT) Received: from [192.168.0.13] (99-103-66-154.lightspeed.austtx.sbcglobal.net. [99.103.66.154]) by mx.google.com with ESMTPSA id r110sm31141270qgd.1.2014.03.19.07.34.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Mar 2014 07:34:11 -0700 (PDT) Message-ID: <5329AAE1.7030705@gmail.com> Date: Wed, 19 Mar 2014 09:34:09 -0500 From: Dinh Nguyen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Arnd Bergmann Subject: Re: stmmac-socfpga breakage in arm-soc References: <201403191333.01095.arnd@arndb.de> <53299CA8.607@gmail.com> <4337501.shzGE38xmF@wuerfel> In-Reply-To: <4337501.shzGE38xmF@wuerfel> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_103436_866302_6ADB1A51 X-CRM114-Status: GOOD ( 22.72 ) X-Spam-Score: -2.7 (--) Cc: Srinivas Kandagatla , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Hans de Goede , arm@kernel.org, linux-arm-kernel@lists.infradead.org, Giuseppe Cavallaro , "David S. Miller" , Dinh Nguyen 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 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_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 Hi Arnd, On 03/19/2014 09:05 AM, Arnd Bergmann wrote: > On Wednesday 19 March 2014 08:33:28 Dinh Nguyen wrote: >> On 03/19/2014 07:33 AM, Arnd Bergmann wrote: >>> >>> * Replaced the parent/child DT nodes with a combined node >>> * Renamed the device node from 'ethernet0' to 'ethernet' >>> as the standard name. >>> * Removed interrupt-names and clock-names properties that >>> are not documented in the binding and not used. >>> * Added a new DWMAC_SOCFPGA Kconfig symbol to control >>> compilation of this driver >> >> The v1 of this patch had this had this Kconfig symbol and is >> similar to your proposed fix. >> >> http://marc.info/?l=linux-netdev&m=139167062725242&w=2 > > I don't understand. So you got parts of it right at first, but then > changed it in a different way from what Peppe asked you to do? > >>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >>> index 8fb32a8..46aef510 100644 >>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c >>> @@ -38,6 +38,9 @@ static const struct of_device_id stmmac_dt_ids[] = { >>> { .compatible = "st,stih416-dwmac", .data = &sti_gmac_data}, >>> { .compatible = "st,stid127-dwmac", .data = &sti_gmac_data}, >>> #endif >>> +#ifdef CONFIG_DWMAC_SOCFPGA >>> + { .compatible = "altr,socfpga-stmmac", .data = &socfpga_gmac_data }, >>> +#endif >>> /* SoC specific glue layers should come before generic bindings */ >>> { .compatible = "st,spear600-gmac"}, >>> { .compatible = "snps,dwmac-3.610"}, >> >> >> If it's okay with you Arnd, can I take this patch and add on top of it >> as it is also breaking dtb builds: >> >> Error: arch/arm/boot/dts/socfpga_arria5_socdk.dts:51.2-3 label or path, >> 'ethernet1', not found >> FATAL ERROR: Syntax error parsing input tree >> Error: arch/arm/boot/dts/socfpga_cyclone5_socdk.dts:44.2-3 label or >> path, 'ethernet1', not found >> FATAL ERROR: Syntax error parsing input tree >> make[1]: *** [arch/arm/boot/dts/socfpga_arria5_socdk.dtb] Error 1 >> make[1]: *** Waiting for unfinished jobs.... >> make[1]: *** [arch/arm/boot/dts/socfpga_cyclone5_socdk.dtb] Error 1 >> Error: arch/arm/boot/dts/socfpga_cyclone5_sockit.dts:44.2-3 label or >> path, 'ethernet1', not found >> FATAL ERROR: Syntax error parsing input tree >> make[1]: *** [arch/arm/boot/dts/socfpga_cyclone5_sockit.dtb] Error 1 >> Error: arch/arm/boot/dts/socfpga_vt.dts:92.2-3 label or path, >> 'ethernet0', not found > > I have found the same problems and fixed it up locally already with > the additional change below. > > Arnd > > > diff --git a/arch/arm/boot/dts/socfpga_arria5_socdk.dts b/arch/arm/boot/dts/socfpga_arria5_socdk.dts > index 2d6b38b..a87ee1c 100644 > --- a/arch/arm/boot/dts/socfpga_arria5_socdk.dts > +++ b/arch/arm/boot/dts/socfpga_arria5_socdk.dts > @@ -46,11 +46,8 @@ > }; > }; > > -ðernet1 { > - status = "okay"; > -}; > - > &gmac1 { > + status = "okay"; > phy-mode = "rgmii"; > > rxd0-skew-ps = <0>; > diff --git a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts > index 26c63a0..ae16d97 100644 > --- a/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts > +++ b/arch/arm/boot/dts/socfpga_cyclone5_socdk.dts > @@ -39,11 +39,8 @@ > }; > }; > > -ðernet1 { > - status = "okay"; > -}; > - > &gmac1 { > + status = "okay"; > phy-mode = "rgmii"; > > rxd0-skew-ps = <0>; > diff --git a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts > index 469bb5c..b79e2a2 100644 > --- a/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts > +++ b/arch/arm/boot/dts/socfpga_cyclone5_sockit.dts > @@ -39,11 +39,8 @@ > }; > }; > > -ðernet1 { > - status = "okay"; > -}; > - > &gmac1 { > + status = "okay"; > phy-mode = "rgmii"; > > rxd0-skew-ps = <0>; > diff --git a/arch/arm/boot/dts/socfpga_vt.dts b/arch/arm/boot/dts/socfpga_vt.dts > index 91f6ccf..0f33f2f 100644 > --- a/arch/arm/boot/dts/socfpga_vt.dts > +++ b/arch/arm/boot/dts/socfpga_vt.dts > @@ -87,10 +87,7 @@ > }; > }; > > -ðernet0 { > - status = "okay"; > -}; > - > &gmac0 { > + status = "okay"; > phy-mode = "gmii"; > }; > I found that you also need this: gmac1: ethernet@ff702000 { @@ -466,8 +468,10 @@ altr,sysmgr-syscon = <&sysmgr 0x60>; reg = <0xff702000 0x2000>; interrupts = <0 120 4>; + interrupt-names = "macirq"; mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ clocks = <&emac1_clk>; + clock-names = "stmmaceth"; }; L2: l2-cache@fffef000 { diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 5f1e256..953801c 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi @@ -456,8 +456,10 @@ altr,sysmgr-syscon = <&sysmgr 0x60>; reg = <0xff700000 0x2000>; interrupts = <0 115 4>; + interrupt-names = "macirq"; mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ clocks = <&emac0_clk>; + clock-names = "stmmaceth"; };