[U-Boot] [PATCH] net: axi_ethernet: Add driver to u-boot

Mike Frysinger
2011-03-09T07:34:51Z

On Friday, March 04, 2011 05:09:53 Michal Simek wrote:
> Mike Frysinger wrote:
> >> 3. dev->init
> >> return -1 - if init failed
> >> return 0 - on success
> >
> > ok
> >
> >> (here you are saying should be return # of devices)
> >
> > no, i think you confused "initialize" with "init" in my feedback
>
> ok. From my point of view is better do initialize only for one device
> and not to registered all device in the driver. IMHO this functionality
> should be done by board specific net function in board_eth_init.
> Not sure if this covers all cases which can happen. But anyway if the
> driver initialize several drivers with the same type then you are losing
> flexibility.

no, that isnt what i meant. the initialize function is allowed to return more
than one because a single part might support more than one interface. think
of MAC switches or multiple PHYs hooked up to a single MAC. in neither of
these cases should the board_eth_init func need to call a driver's initialize
function multiple times imo.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110309/48425236/attachment.pgp