[U-Boot-Users] PATCH add SMN42 board from Siemens

Gary Jennejohn garyj at jennejohn.org
Tue Apr 3 19:16:58 CEST 2007

"Peter Pearse" writes:
> > -----Original Message-----
> > From: u-boot-users-bounces at lists.sourceforge.net
> > [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf
> > Of Gary Jennejohn
> > Sent: 03 April 2007 15:58
> > To: u-boot-users at lists.sourceforge.net
> > Subject: [U-Boot-Users] PATCH add SMN42 board from Siemens
> >
> > Hi,
> >=
> > The patch is rather large and can be downloaded at
> > 	ftp://ftp.denx.de/pub/patches/SMN42_NEW
> >
> > The eth.c files for lpc2292sodimm and SMN42 are identical,
> > but the driver is very board-specific and cannot be put into
> > e.g. drivers.
> Gary
> 	I stand ready to be corrected, but I thought the way round that
> was
> a) move the eth.c to drivers/<unique name>.c
> b) add <unique_name>.o to the object list in drivers/Makefile
> c) encapsulate the code with #ifdef CONFIG_<UNIQUE_DEF>
> d) add #define CONFIG_<UNIQUE_DEF> to the include/configs/<board>.h for
> the lpc2292sodimm and SMN42 boards
> e) check I haven't missed anything from this list.....
> see e.g drivers/smc91111.c used by DK1C20, DK1S10, EP1C20 etc
> This might still be possible if the lpc2292sodimm and SMN42 eth.c differ
> slightly,
> using a board specific define.....

Actually, I originally had the driver installed as cpu/arm720t/lpc2292/ \
enc28j60.c with an entry in .../lpc2922/Makefile. Then I though better of
it and concluded that it wasn't really CPU-specific and moved it back to
the board-specific directories.

There's already a CONFIG_ENC28J60 in the driver and the config files, so
basically I've already done 50% of what you suggest. I didn't realize
that having the define in these files would make the driver suitable to
be placed under drivers.

But I question whether it's really worth my doing all the work involved
with this change (make the change, test that u-boot still compiles and
works and then re-roll the patch) to save a few kB in the tree.

Gary Jennejohn / garyjATjennejohnDOTorg gjATfreebsdDOTorg garyjATdenxDOTde
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany

More information about the U-Boot mailing list