[U-Boot-Users] [PATCH 1/1] Add support for the hammerhead (AVR32) board

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Thu Jul 24 12:30:36 CEST 2008


Julien May <mailinglist at miromico.ch> wrote:
> I am currently having problems in initializing the eth.
> 
> in net/eth.c the following is defined
> 
> static int __def_eth_init(bd_t *bis)
> {
> 	return -1;
> }
> int cpu_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
> int board_eth_init(bd_t *bis) __attribute((weak, alias("__def_eth_init")));
> 
> this is not calling my implementation of board_eth_init.
> I see and like the idea behind this but do not understand why my 
> implementation is not getting called...

Hmm, that's probably the "weak functions cannot be overriden by
functions defined in their own file" crap that was discussed earlier.
Can you try moving board_eth_init() into hammerhead.c?

Which reminds me...Ben posted a patch which did that for all the
existing avr32 boards. I should probably apply it.

> btw. I did update the implementation function header from void to int. 

Yeah, that's probably a good idea too :-)

Haavard




More information about the U-Boot mailing list