[U-Boot-Users] [RFC][PATCH 1/1] Add board_eth_init() function

Stefan Roese
2008-03-25T16:33:02Z

On Tuesday 25 March 2008, Andy Fleming wrote:
> > I thought about this some more, and the problem is that cpu_eth_init()
> > and board_eth_init() are mutually exclusive, with board_eth_init() having
> > a higher priority. I think the following will work, but would appreciate
> > some feedback.
>
> I'm not sure that's necessarily the case. Imagine, for instance, an
> 85xx board that (for some reason) has on-board ethernet. I believe
> some of the DS systems do this. So the 85xx has 4 nics which the SOC
> knows how to initialize. But the board has an additional driver to
> init. Why not just allow them both?

Image a board that doesn't want all CPU (SoC) interfaces to get initialized.
If for such a board a cpu-specific init routine exists, there is no chance to
not enable (init) all those cpu interfaces as done in cpu_eth_init().

With this approach of mutually exclusive routines, it could define it's
board_eth_init() and init only the Soc interfaces really needed. Plus
additional ones of course.

Does this make sense?

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================