[U-Boot] [PATCH 4/5] powerpc: keymile: Add a check for the PIGGY debug board

Gary Jennejohn garyj at denx.de
Wed Nov 19 19:14:45 CET 2008


On Wed, 19 Nov 2008 14:03:44 +0100
Heiko Schocher <hs at denx.de> wrote:

> Gary Jennejohn schrieb:
> > On Thu, 13 Nov 2008 09:30:51 -0800
> > Ben Warren <biggerbadderben at gmail.com> wrote:
> > 
[snip]
> >> That's what board_eth_init() and cpu_eth_init() are for.  In addition, I 
> >> forgot to mention that a couple of days ago Gary Jennejohn submitted a 
> >> patch for changing the 82xx SCC driver over to CONFIG_NET_MULTI style.
> >>
> > 
> > Correct, and it must explicitly call ethernet_present() - see above.
> 
> If I understand the actual code right, then _now_ (which means actual
> top of tree+ patch 4/5) it gets first called board_eth_init (). There,
> I check if ethernet_present (), and if so, I return -1, which will result
> in calling cpu_eth_init(). If the ethernet is not present, it returns 0,
> which will result in not calling cpu_eth_init() ... And your HDLC
> initialization can be done in board_eth_init() ... thats what we need,
> or?
> 

Ah yes.  My face is red.  I read the logic backwards.  If the PIGGY is
present it returns -1 ==> call cpu_eth_init(), otherwise 0.

And keymile_hdlc_enet_initialize() always succeeds so it can always be
called.

OK.  Then all we need is to add a call to keymile_hdlc_enet_initialize() to
eth_board_init() before the PIGGY check.  Case closed.

And I have to remove the call to ethernet_present() from the 82xx SCC
driver.

Thanks Heiko.

---
Gary Jennejohn
*********************************************************************
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
*********************************************************************


More information about the U-Boot mailing list