[PATCH] powerpc: consolidate mpc83xx platform files

Dan Malek dan at embeddedalley.com
Thu Dec 14 08:13:48 EST 2006


On Dec 13, 2006, at 1:07 AM, Kumar Gala wrote:

> My question has been what's the value in trying to save a few lines
> of code for the reference boards.  The idea of a generic board
> doesn't make sense in the embedded space.

This grand unification of embedded board software just
isn't useful.  It's a waste of time for the reference board
developers that should be writing useful device drivers
for the SOC peripherals, and also for those of us trying
to develop real products.  I spend way too much time
trying to find configuration options or other indirect
function hooks so the special functions I need to be
performed are done properly.

The current 85xx is a pretty good implementation.
Things that are truly generic are provided as functions
that the individual board port initialization files/functions
can use as needed.

> ....  The majority of developers dont have the time
> to spend trying to come up with one to solve their specific problem
> so they hard code some solution that works for them.

Don't make it sound like some "hard code" hack :-)
We just have to write software to support all of these
unique product designs.  Many of these boards have
custom external hardware than needs to be controlled
with some special configurations or algorithm.  There
are just times I have to toggle a set of GPIOs with a
particular algorithm, for example.  This was my comment
about "generic" board ports and device tree a while
ago.  The device tree is just an information data base,
it doesn't help me when I really have to write some code
that is unique to a board.

If you want to make similar Freescale boards utilize
common code, that's great.  Don't assume any product
will look like one of these boards, no matter how much
you want people to do that.  In almost all cases, they
aren't even close due to other product design requirements.

All of these efforts to "help" us develop products by
providing generic board ports with the goal of a single
kernel on multiple boards actually costs us development
time due to the lack of flexibility we need.  We just need
a library of generic functions, and then 50 to 100 lines of
"board support" initialization that will initialize custom
hardware, data structures, variables, and then call the
more generic functions.  There may be only very minor
differences between the board files, but this simplicity
is much nicer than complex indirect paths to enable
features with cute #defines or other complicated
data structures.

Thanks.

	-- Dan




More information about the Linuxppc-dev mailing list