Subject: Re: Debugging / SPL-levels / AT91RM9200 success
To: Toru Nishimura <>
From: Sami Kantoluoto <>
List: port-arm
Date: 03/07/2007 01:58:29
On Wed, Mar 07, 2007 at 08:34:38AM +0900, Toru Nishimura wrote:
> >> I'm also not convinced you need separate directories for each of the
> >> SOCs.  In FreeBSD all the files live in sys/arm/at91, so far quite
> >> happily.  I'm in the midst of bringing up an AT91SAM9260 eval board on
> >
> > Well, that can be easily changed. I just thought this is the normal way
> > (each SOC in own directory)
> Be careful about source code layout, please.  Some people think
> that it's "the NetBSD way" to mash source code into small
> segments and play acrobatics to compose them with heroic includes.

Well, currently I've two options in files.at91 that can maybe fall in to that
category (heroic) :-/ :

defparam opt_at91_param.h       AT91X_REG_HEADER
defparam opt_at91_param.h       AT91X_VAR_HEADER

These need to be set under SoC specific, e.g. files.at91rm9200 has:

# some AT91 specific options:
options         AT91X_REG_HEADER="<arch/arm/at91rm9200/at91rm9200_reg.h>"
options         AT91X_VAR_HEADER="<arch/arm/at91rm9200/at91rm9200_var.h>"

And arch/arm/at91/at91_reg.h is almost just (and at91_var.h likewise):

#include "opt_at91_param.h"
#include AT91X_REG_HEADER

This is because some common AT91 code needs to know some e.g. SoC specific
addresses (at least if bus_space macros aren't used).

Are there any examples how to split common and cpu specific parts cleanly?