
On Mon, Jul 28, 2008 at 16:29, Haavard Skinnemoen haavard.skinnemoen@atmel.com wrote:
"Hong Xu" hongxu.cn@gmail.com wrote:
maybe we can use config related to the functionnality or the sub-class CPU ex : CONFIG_MACB_INCLK
Agree.
We can use "#if defined(CONFIG_AT91) && defined(CONFIG_MACB)" in net/eth.c and "#ifdef CONFIG_MACB_INCLK" in drivers/net/macb.c to simplify the previous *big* #ifdef. If everyone feels comfortable, I'll rewrite these parts and re-submit the patch.
What does CONFIG_MACB_INCLK mean?
Per J's suggestion, use CONFIG_MACB_INCLK or some other thing to simplify the *big* ifdef in driver/net/macb.c
From the existing code, it seems that some boards (AT91CAP9,
AT91SAM926[0,3]) need the CLKEN bit of EMAC_USRIO to be set, but others(if exist) do not need to. So in all boards that need this bit to be set, use a new CONFIG_MACB_XXX to denote this.
Haavard