[U-Boot] [PATCH 2/3 v3] Add bb_miiphy_init call before any ethernet bring-up code.

Ben Warren biggerbadderben at gmail.com
Mon Oct 5 22:18:46 CEST 2009


Luigi Mantellini wrote:
> The lib_[arch]/board.c code calls the bb_miiphy_init that will do just 2 things:
>
> 1) Relocate the bb_mii_buses[i].* hooks (.init, .mdio_active, .delay, ...)
> 2) Call the board bb_mii_buses[i].init (board specific code).
>
> The board specifc code will be contained into the hook .init filed
> into the bb_mii_buses vector.
>
> Do you have a better solution?
>
>   
In each case, you put the bb_miiphy_init() right before 
eth_initialize().  One of the first things eth_initialize() does is call 
board_eth_init().  Moving the call to each board's specific code would 
therefore not make any difference code-wise, but IMHO is architecturally 
cleaner.  If #ifdef's are necessary (in this case they are), I believe 
it's better to have them in the more specific code (board) than generic 
(arch).

regards,
Ben


More information about the U-Boot mailing list