Olav Morken wrote: > > Yes, AP7000 have two Ethernet MACs. And if I got this right you want to > > make a generic config about it, so then I guess it should open up for > > having more than one MAC. > > OK, how about adding a CONFIG_MACB_ADVERTISE(id)-option, where id is > the id of the MACB (passed to the macb_eth_initialize-function). This > makes it possible to add this without touching anything but the > macb-driver (i.e. without changing the macb_eth_initialize-prototype). > > In the config-files, one could then have: > #define CONFIG_MACB_ADVERTISE(id) ( \ > (id == 0) ? ( \ > ADVERTISE_ALL | ADVERTISE_CSMA \ > ) : ( \ > ADVERTISE_CSMA | ADVERTISE_10HALF | \ > ADVERTISE_10FULL \ > )) > > Or in the simple (and probably mose usual case (only one set of options > advertised): > #define CONFIG_MACB_ADVERTISE(id) ( \ > (ADVERTISE_CSMA | ADVERTISE_10HALF | ADVERTISE_10FULL) > > > This would require saving the id to the macb_device struct. If this is > unacceptable, it could be changed to using the regs-offset instead of > the id. > > Any thoughts about this?
Sounds good to me. The board decides the id, so it makes sense to pass it back to the board code. Haavard _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot