Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752176Ab3GGLhC (ORCPT ); Sun, 7 Jul 2013 07:37:02 -0400 Received: from mail-ee0-f48.google.com ([74.125.83.48]:46449 "EHLO mail-ee0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692Ab3GGLg6 (ORCPT ); Sun, 7 Jul 2013 07:36:58 -0400 Message-ID: <51D952D3.8070401@gmail.com> Date: Sun, 07 Jul 2013 13:36:51 +0200 From: Sebastian Hesselbarth User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Jonas Gorski CC: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Florian Fainelli , Andrew Lunn , Jason Cooper Subject: Re: Second ethernet on kirkwood does not work when probed through DT References: <20130706215426.6e666d6af0dc6c9ea5fe32cd@openwrt.org> <51D88A8E.1060104@gmail.com> <20130706233912.00004044@unknown> <51D94884.4000204@gmail.com> <20130707132607.00007188@unknown> In-Reply-To: <20130707132607.00007188@unknown> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2303 Lines: 53 On 07/07/2013 01:26 PM, Jonas Gorski wrote: > On Sun, 07 Jul 2013 12:52:52 +0200 > Sebastian Hesselbarth wrote: >> The error below is a naming issue for the port. As there is only one >> port per controller, both reg properties of the port nodes of >> kirkwood.dtsi have to be<0> as they determine the register offset >> within the controller registers. As mentioned before, KW has a >> dual-controller, single port configuration. >> >> So the wrong reg property in kirkwood.dtsi is a bug and I will update >> the patch. >> >> Second, mv643xx_eth as in net-next does a >> platform_device_alloc(MV643XX_ETH_NAME, ppd.port_number) >> which will cause two devices named mv643xx_eth_port.0 if you change >> both of the reg property to<0>. >> >> A quick fix would be to change the above to >> platform_device_alloc(pnp->name, ppd.port_number) >> so the port devices will be named after the device nodes name. >> >> Also, for this I will prepare a patch. But the rename of the port >> devices could again raise the clock gating/loosing MAC issue. > > In my case it's a non-issue as the studid D-Link U-Boot doesn't even > setup a mac for eth1, so there's nothing to lose ;). > >> (I know again, why I hate this shared/port separation of mv643xx_eth) >> >> Anyway, can you please try to have both ports reg properties set >> to<0>, with nodes named ethernet0-port@0 and ethernet1-port@0, >> and the platform_device_alloc in mv643xx_eth modified? > > In addition I added a static counter for the allocated devs (to not > overwrite the pointers in port_platdev[]). Ok, but that is not required to make it work, is it? IMHO we should honor what is passed by reg property, even it will be always zero for KW and the other Orion SoCs. Otherwise, we would implicitly put the numbering in the order of port nodes. > That seems to work, as now eth1 comes up and works (successfully got a > IP through DHCP). Ok, great. Will prepare a fix for mv643xx_eth on top of net-next. And an update of the kirkwood conversion patches. Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/