[U-Boot] Remove board specific code from ENC28J60 network driver?

Mike Frysinger vapier at gentoo.org
Mon Dec 21 14:17:51 CET 2009


On Monday 21 December 2009 03:26:06 Dirk Behme wrote:
> - Which is the 'the common SPI framework'? Files?

include/spi.h ... just grep for files that include it and you'll find a bunch 
of examples in the tree.

> - Just for correct understanding: We are talking about two issues
> here? The first issue is that enc28j60.c has board specific code, for
> e.g. setting GPIOs (as shown above)? And the second issue is that it
> doesn't use common SPI framework? Correct?

when i read the driver, i couldnt tell how much the spi was bound to the 
board, but if things can be separated that way, then sure.

for the board init issue, a driver that has been converted to NET_MULTI means 
that it provides a hook for boards to call (enc28j60_register()).  then in the 
board-specific hook (board_eth_init()), you do all the board-specific stuff 
and then call enc28j60_register().

the README.driver.eth should explain it
-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/20091221/47b867c4/attachment.pgp 


More information about the U-Boot mailing list