From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 25 Mar 2008 17:33:02 +0100 Subject: [U-Boot-Users] [RFC][PATCH 1/1] Add board_eth_init() function In-Reply-To: <2acbd3e40803250917s72d6c377i175a0907e51f3dbf@mail.gmail.com> References: <200803221114.40956.sr@denx.de> <47E90A8A.5000607@gmail.com> <2acbd3e40803250917s72d6c377i175a0907e51f3dbf@mail.gmail.com> Message-ID: <200803251733.02808.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 =====================================================================