[U-Boot] [PATCH v2 5/9] AVR32: macb - Disable 100mbps if clock is slow

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Thu Jan 29 11:17:20 CET 2009


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


More information about the U-Boot mailing list