
On Thu, Jan 29, 2009 at 07:28, Hans-Christian Egtvedt hans-christian.egtvedt@atmel.com wrote:
On Wed, 28 Jan 2009 15:40:49 -0800 Ben Warren biggerbadderben@gmail.com wrote:
Jean-Christophe PLAGNIOL-VILLARD wrote:
On 22:42 Wed 28 Jan , Haavard Skinnemoen wrote:
<snipp>
As for a better name, how about CONFIG_MACB_ADVERTISE?
why not
I like it too. One of the common checkbox items, though: do any Atmel chips have more than one MACB, in which case this should be CONFIG_MACBx_ADVERTISE or something like that?
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?
Best regards, Olav Morken