From: Reinhard Meyer Date: Mon, 26 Jul 2010 08:00:18 +0200 Subject: [U-Boot] drivers/net/enc28j60.c - generalisation, how? In-Reply-To: <201007252311.22615.vapier@gentoo.org> References: <4C4A8404.6030302@emk-elektronik.de> <4C4CD1C3.6070105@emk-elektronik.de> <201007252311.22615.vapier@gentoo.org> Message-ID: <4C4D2472.6070608@emk-elektronik.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Mike Frysinger wrote: > On Sunday, July 25, 2010 20:07:31 Reinhard Meyer wrote: > >> I can rename the current driver to like "enc28j60_lpc2292.c" and make the >> two affected boards use it, so they still compile and work. I can't do >> those boards' maintainers work and add the required code to use the new >> driver and make a generic spi framework for the lpc2292. They currently >> use a very private spi approach. >> Or I call the new driver something like "enc28j60_generic.c". >> I am definitely not going to port the existing two lpc2292 boards to use >> the new enc28j60 driver. >> > > i prefer the former > I agree. So a first patch would be the renaming, editing the affected boards *.h and the Makefile in drivers/net: COBJS-$(CONFIG_ENC28J60) += enc28j60.o to COBJS-$(CONFIG_ENC28J60_LPC2292) += enc28j60_lpc2292.o In the same patch extract the 200 or so defines for the chip to enc28j60.h (to be used by both drivers). One issue remains: the old driver has a lot of coding style violations, I can fix them, but see no point in that. The new driver will have them fixed. But before I proceed I need Bens OK to go that way:) Reinhard