
Hi Ben,
Ben Warren biggerbadderben@gmail.com wrote:
Gary Jennejohn wrote:
Ben Warren biggerbadderben@gmail.com wrote:
Gary Jennejohn wrote:
[snip]
#if defined(CONFIG_ETHER_ON_SCC) && defined(CONFIG_CMD_NET)
While you're mucking around with this file, please settle on a single CONFIG that can allow conditional compilation from the Makefile, then get rid of this stuff.
You mean get rid of CONFIG_ETHER_ON_SCC and CONFIG_CMD_NET? But isn't at least CONFIG_CMD_NET required to get networking support in other parts of U-Boot, which would make it a prerequisite for compiling this?
And eliminating or supplementing CONFIG_ETHER_ON_SCC with a new CONFIG would mean changing a whole slew of configuration files, not to mention include/net.h.
I don't mean get rid of them completely, just move the conditionality to the Makefile. IMHO the CONFIG_ETHER_ON_SCC conditional is enough, you don't need to check for CONFIG_CMD_NET. It the user doesn' t have it set, problems will show up all over the place, and very quickly. I'd prefer to change the name of CONFIG_ETHER_ON_SCC to something indicating 82xx-ness, since this driver is specific to the 82xx family of SOCs, but SCCs have been around longer than PowerPC. One thing you'll notice is that most of the config files that mention this option are #undef'ing it only.
OK, I think I'll keep CONFIG_ETHER_ON_SCC because a) there's less repo churn and less work for me :-) b) it's also used in board/pm826/pm826.c and board/pm828/pm828.c to control setup of port pins and I hesitate to touch board-specific code.
--- Gary Jennejohn ********************************************************************* DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de *********************************************************************