
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