[PATCH 9/9] arm/mach-pxa: add mioa701 board

Sascha Hauer s.hauer at pengutronix.de
Thu Nov 24 18:08:13 EST 2011


On Thu, Nov 24, 2011 at 10:22:08PM +0100, Robert Jarzmik wrote:
> Sascha Hauer <s.hauer at pengutronix.de> writes:
> > Are the defines in this file used by generic code? If not, please put
> > them into a board specific include file (or remove them if they are
> > unused)
> I intended to use these values in lowlevel_init.S. Isn't that the right place ?

config.h in the board file is included by common.h and thus in nearly
every compiled file. It is the config.h derived from U-Boot. Ideally
this file should be empty. Creating some other include file in your
board directory is just fine though.
BTW the generic lowlevel code in barebox is written in C and it also is
for several boards. So when you can spare some bytes of SRAM I recommend
to do it C. You can have a look for example at the pcm038 board. We also
have a get_pc() function to determine whether we already run from SDRAM
and thus should skip its initialization.

> 
> >> diff --git a/arch/arm/boards/mioa701/lowlevel_init.S b/arch/arm/boards/mioa701/lowlevel_init.S
> >> +	.section ".text_bare_init","ax"
> >> +.global board_init_lowlevel
> >> +board_init_lowlevel:
> >> +	mov	r10, lr
> >> +	/*
> >> +	 * This piece of code should ensure at least:
> >> +	 *  - getting SDRAM out of self-refresh, and/or setup SDRAM timings
> >> +	 *  - putting the GPIO logic into a usable state
> >> +	bl	stabilize_reset
> >> +	bl	setup_sdram
> >> +	bl	setup_gpios

You should only initialize the barest minimum in lowlevel code. So when
setup_gpios is not needed for initializing SDRAM you should not do it
here.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list