On Mon, Oct 5, 2009 at 10:18 PM, Ben Warren <biggerbadder...@gmail.com> wrote: ... >> >> 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).
I agree your point of view, but there are a lot of network cards that registers the bb_mii bus. Another fact is that the network deivces can access to phy to complete the initialization. From these observation, I think that the bb_mii bus should be ready before the ethernet bring-up code. Another solution is to modify all board specific bring-up code in order to init the bb_mii... but this solution seems to require a lot of trivial patches. ciao luigi > > regards, > Ben > -- Luigi 'Comio' Mantellini R&D - Software Industrie Dial Face S.p.A. Via Canzo, 4 20068 Peschiera Borromeo (MI), Italy Tel.: +39 02 5167 2813 Fax: +39 02 5167 2459 web: www.idf-hit.com mail: luigi.mantell...@idf-hit.com _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot