[U-Boot] net: Move initialization of Au1x00 SoC ethernet MAC to cpu_eth_init

Shinya Kuribayashi skuribay at ruby.dti.ne.jp
Sun Oct 19 04:51:15 CEST 2008


Ben Warren wrote:
>     diff --git a/cpu/mips/cpu.c b/cpu/mips/cpu.c
>     index 38d8697..c70cf0b 100644
>     --- a/cpu/mips/cpu.c
>     +++ b/cpu/mips/cpu.c
> 
> 
> Please add #include "netdev.h" to top of this file.

Oops, will fix.

>     @@ -73,3 +73,10 @@ void write_one_tlb(int index, u32 pagemask, u32
>     hi, u32 low0, u32 low1)
>            write_c0_index(index);
>            tlb_write_indexed();
>     }
>     +
>     +int cpu_eth_init(bd_t *bis)
>     +{
>     +#ifdef CONFIG_SOC_AU1X00
>     +       return au1x00_enet_initialize(bis);
>     +#endif
>     +}
> 
> This will warn/error if CONFIG_SOC_AU1X00 isn't defined.  I recommend 
> something like:
> 
> int cpu_eth_init(bd_t *bis)
> {
>         int rc = 0;
> #ifdef CONFIG_SCO_AU1X00
>         rc = au1x00_enet_initialize(bis);
> #endif
>         return rc;
> }

Ok.  Updated patch will follow soon.

Thanks for your comments,

  Shinya


More information about the U-Boot mailing list