Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754851AbbB0QzZ (ORCPT ); Fri, 27 Feb 2015 11:55:25 -0500 Received: from pmta1.delivery1.ore.mailhop.org ([54.191.214.3]:48266 "EHLO pmta1.delivery1.ore.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754752AbbB0QzE (ORCPT ); Fri, 27 Feb 2015 11:55:04 -0500 X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 104.193.169.186 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19rswR/Yvrsf9RiOFJgURUj Date: Fri, 27 Feb 2015 08:51:01 -0800 From: Tony Lindgren To: Murali Karicheri Cc: davem@davemloft.net, mugunthanvnm@ti.com, george.cherian@ti.com, prabhakar.csengg@gmail.com, varkabhadram@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, grygorii.strashko@ti.com, lokeshvutla@ti.com, mpa@pengutronix.de, w-kwok2@ti.com Subject: Re: [PATCH net-next 1/2] net: davinci_mdio: don't request io address range Message-ID: <20150227165100.GY11056@atomide.com> References: <1424813251-31610-1-git-send-email-m-karicheri2@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424813251-31610-1-git-send-email-m-karicheri2@ti.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1672 Lines: 48 * Murali Karicheri [150224 13:32]: > From: Grygorii Strashko > > Historically Davinci MDIO driver was created with assumption that > MDIO is standalone device, but for Keystone 2 it's a part > of NETCP module and now NETCP driver requests IO range which > includes MDIO IO range too. This causes Keystone 2 networking stack > failure during the boot. > > "netcp-1.0 2620110.netcp: Probe of module(netcp-gbe) failed with -16" > > Hence, don't request io address range from Davinci MDIO driver and > just remap it. Best to fix this up properly so you don't have overlapping resources. You probably want to have the whole hardware driver block defined in the dts file as a single entry, and then have the modules within that hardware block use the dt ranges property. This allows you to do standard Linux drivers without any extra hacks. Sounds like this following untested imaginary example should do the trick: mac: ethernet@deadbeef { compatible = "ti,cpsw", "simple-bus"; reg = <0xdeadbeef 0x1000>; ranges = <0 0xdeadbeef 0x2000>; ... davinci_mdio: mdio@1000 { reg = <0x1000 0x100>; ... }; }; That allows you to get rid of all the existing code for dealing with the chilren with for_each_child_of_node(node, slave_node) in cpsw_probe_dt() as that all happens automatically for you and does not cause problems with modules being moved around. Regards, Tony -- 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/