On 16:01 Tue 29 Jul     , Hong Xu wrote:
> On Tue, Jul 29, 2008 at 15:25, Jean-Christophe PLAGNIOL-VILLARD
> <[EMAIL PROTECTED]> wrote:
> > On 21:57 Mon 28 Jul     , Ben Warren wrote:
> >> Hi Hong,
> >>
> >> Thanks for all the hard work.  One more thing...
> >> <snip>
> >> > +#if defined(CONFIG_CMD_NET)
> >> > +int board_eth_init(bd_t *bis)
> >> > +{
> >> > +       return at91sam9_eth_initialize(bis);
> >> > +}
> >> > +#endif
> >>
> >> Here's at91sam9_eth_initialize:
> >>
> >> #if defined(CONFIG_MACB) && defined(CONFIG_CMD_NET)
> >> void at91sam9_eth_initialize(bd_t *bi)
> >> {
> >>     macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x00);
> >> }
> >> #endif
> >>
> >> Issues:
> >> 1. It returns void
> >> 2. It just calls the MACB initializer.
> >>
> >> Please change your code to:
> >>
> >> extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
> >>
> >> #if defined(CONFIG_MACB) && defined(CONFIG_CMD_NET)
> >> int board_eth_init(bd_t *bi)
> >> {
> >>     return macb_eth_initialize(0, (void *)AT91_BASE_EMAC, 0x00);
> >> }
> >> #endif
> >>
> >> or something like this.  I don't know if AT91_BASE_EMAC is visible
> >> from this code, so you may need to modify slightly.
> > Can we do a cpu_eth_init instead?
> Not all arm926ejs series have built-in ethernet controller (e.g.
> AT91SAM9261 does not have). If we do it in cpu_eth_init, we may need
> other more #ifdef_s to distinguish. :-)
It already the case, I'll send a patch obout it

Best Regards,
J.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to