From: Mike Frysinger Date: Mon, 21 Dec 2009 08:17:51 -0500 Subject: [U-Boot] Remove board specific code from ENC28J60 network driver? In-Reply-To: <4B2F311E.8020905@googlemail.com> References: <4B2E7B5B.3050603@googlemail.com> <200912201505.51636.vapier@gentoo.org> <4B2F311E.8020905@googlemail.com> Message-ID: <200912210817.54003.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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