From: Wolfgang Denk Date: Wed, 12 Aug 2009 23:46:37 +0200 Subject: [U-Boot] [PATCH 1/3] net/eth_device: keep index inside each device In-Reply-To: <20090812212651.GA11003@game.jcrosoft.org> References: <1250023747-20224-1-git-send-email-plagnioj@jcrosoft.com> <20090812185054.63898833DBD2@gemini.denx.de> <20090812210339.GE21725@game.jcrosoft.org> <4A833107.1010209@gmail.com> <20090812212651.GA11003@game.jcrosoft.org> Message-ID: <20090812214637.8D055833DBD2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Jean-Christophe PLAGNIOL-VILLARD, In message <20090812212651.GA11003@game.jcrosoft.org> you wrote: > > > While I'm not completely opposed to the idea of tracking indices, > > it's simply not true that you don't know the indices of the > > controllers on your board. They're all instantiated in > > board_eth_init(), so the first will be 0 and the second will be 1 > > etc. If you had a mix of devices and they were found by probing as > > in Linux, it would be different. Here in U-boot, ordering is > > deterministic and dictated by the developer. > but you can not known it in the driver specially if you have multi different > MAC chip > 2 SMC91111 > + 1 SOC MAC > > and you will add it in the order of preferance to use for the board to let > u-boot try to connect in the order of your preference Like Ben I don't really understand where your problem is. We have many boards with multiple Ethernet Interfaces; for example, we see boards with up to 4 x TSEC and up to 2 x EEPRO100 controllers. And there is never more than a single "active" device. We don't need any such code there. Why would you need it? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Advice is seldom welcome; and those who want it the most always like it the least. -- Philip Earl of Chesterfield