PATCH add SMN42 board from Siemens
Quoted 31 lines · Peter Pearse
Quoted 10 lines
-----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 SiemensQuoted 8 lines
Hi,
=
The patch is rather large and can be downloaded atftp://ftp.denx.de/pub/patches/SMN42_NEWThe
eth.cfiles 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
wasa) move the
eth.cto drivers/<unique name>.c
b) add <unique_name>.o to the object list indrivers/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.....
Quoted 6 lines
see e.g
drivers/smc91111.cused by DK1C20, DK1S10, EP1C20 etcThis might still be possible if the lpc2292sodimm and SMN42
eth.cdiffer 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
=====================================================================
Quoted 10 lines
-----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 18:17
To: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] PATCH add SMN42 board from Siemens
<--- snip --->
Quoted 6 lines
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.
That is a decision we all have to make - do we want something that works, or something that will be accepted into the main tree?
Don't forget this will not only save space but also reduce maintenance effort.
If there are two identical files here we have to assume there may be elsewhere so every code change involves searching the whole tree for similar code......
And perhaps another board will use the same ethernet configuration in the future....
And when we find a bug we have to find all the occurrences..... And it encourages others to take the same approach in future.....
Regards
Peter
Quoted 23 lines · Peter Pearse
Quoted 10 lines
-----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 18:17
To: u-boot-users at lists.sourceforge.net
Subject: Re: [U-Boot-Users] PATCH add SMN42 board from Siemens<--- snip --->
Quoted 6 lines
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.That is a decision we all have to make - do we want something that works, or something that will be accepted into the main tree?
Don't forget this will not only save space but also reduce maintenance effort.
Quoted 8 lines
If there are two identical files here we have to assume there may be elsewhere so every code change involves searching the whole tree for similar code......
And perhaps another board will use the same ethernet configuration in the future....
And when we find a bug we have to find all the occurrences..... And it encourages others to take the same approach in future.....
Well, I guess I don't have much choice in the matter. Looks like I'll have to generate a new patch :-(
---
Gary Jennejohn / garyjATjennejohnDOTorg gjATfreebsdDOTorg garyjATdenxDOTde
=====================================================================
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office: Kirchenstr. 5, D-82194 Groebenzell, Germany
=====================================================================