[U-Boot] drivers/net/enc28j60.c - generalisation, how?

Reinhard Meyer reinhard.meyer at emk-elektronik.de
Sat Jul 24 08:11:16 CEST 2010


Hello,

I would like to generalize that driver and make it also
CONFIG_NET_MULTI-able.

Currently it contains hard coded functionality for the LPC2292 Cpu
and is used by only two boards: lpc2292sodimm and SMN42.

Since the driver could be clearly generic, using just SPI and two I/O 
Pins for
/reset and /select (the latter could be considered part of SPI), it would
make sense to ban out any board specific code from it.

When I do that, clearly I cannot test the two above boards for continued
functionality.

Messing up the driver with #ifdefs to keep old code parallel
to new one does not look like a nice approach either.

How to proceed?

Reinhard


More information about the U-Boot mailing list