[U-Boot] [PATCH 1/3] net/eth_device: keep index inside each device

Wolfgang Denk
2009-08-12T21:46:37Z

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