Subject: Re: CVS commit: src/sys/arch/evbmips
To: Jason Thorpe <thorpej@shagadelic.org>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: source-changes
Date: 02/23/2006 10:49:20
Jason Thorpe wrote:
>
> On Feb 23, 2006, at 10:10 AM, Izumi Tsutsui wrote:
>
>> In article <20060223171401.27E742DA27@cvs.netbsd.org>
>> shige@NetBSD.org wrote:
>>
>>> Module Name: src
>>> Committed By: shige
>>> Date: Thu Feb 23 17:14:01 UTC 2006
>>>
>>> Modified Files:
>>> src/sys/arch/evbmips/conf: files.alchemy
>>> Added Files:
>>> src/sys/arch/evbmips/alchemy: omsal400.c omsal400reg.h
>>> src/sys/arch/evbmips/conf: OMSAL400
>>>
>>> Log Message:
>>> Support Plathome OpenMicroServer (OMS-AL400).
>>> http://www.plathome.co.jp/products/oms400/index.html (sorry japanese
>>> only).
>>
>> Isn't it better to create new directory for the machine
>> (evbmips/oms400 etc)? I guess evbmips/alchemy is a directory
>> for the AMD's Development Boards for Au1xxx CPUs.
>
> I agree is probably better to have boards (especially boards from
> different vendors) in different directories. evbarm does it this way,
> for example. I think the small amount of duplicated code winds up
> being outweighed by the more natural organization.
>
But in this case the duplicated code is not small -- there are 1224
lines of code in 8 files that are shared verbatim and would need to be
copied. Its fairly meaty stuff, and the only differences between boards
are generally *very* small. (PCI routing, a few registers moved, and
thats about it.)
The truly board-specific bits are individual files. Right now the
meatiest of these is the dbau1550 config at 345 lines.
Frankly, almost all of these boards are going to have more in common
with the DBAU15XX boards than the DBAU15XX boards have in common with
each other or with the PB1XXX boards.
I'd prefer to avoid duplicating code everywhere. :-)
Maybe we need something like this:
evbmips/alchemy/common/
evbmips/alchemy/dbau1550/
evbmips/alchemy/XXX
Alternatively:
evbmips/alchemy/
evbmips/dbau1550/
evbmips/mtx-1
etc.
What do you think?
--
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134 Fax: 951 325-2191