mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 9/9] arm/mach-pxa: add mioa701 board
Date: Fri, 25 Nov 2011 00:08:13 +0100	[thread overview]
Message-ID: <20111124230813.GD27267@pengutronix.de> (raw)
In-Reply-To: <87zkflw70f.fsf@free.fr>

On Thu, Nov 24, 2011 at 10:22:08PM +0100, Robert Jarzmik wrote:
> Sascha Hauer <s.hauer@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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-11-24 23:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-24  3:02 [PATCH 0/9] Initial PXA support and Mitac MIOA701 board Robert Jarzmik
2011-11-24  3:02 ` [PATCH 1/9] initial Intel/Marvell PXA support Robert Jarzmik
2011-11-24  9:29   ` Sascha Hauer
2011-11-25 21:26     ` Robert Jarzmik
2011-11-24  3:02 ` [PATCH 2/9] fix association of cache handling code for PXA Robert Jarzmik
2011-11-24  3:02 ` [PATCH 3/9] fix core version selection Robert Jarzmik
2011-11-24  3:02 ` [PATCH 4/9] add PXA framebuffer support Robert Jarzmik
2011-11-24  3:02 ` [PATCH 5/9] drivers: pxafb: Fix IOMEM API evolution Robert Jarzmik
2011-11-24  3:02 ` [PATCH 6/9] drivers: pxafb: add include ifdefery Robert Jarzmik
2011-11-24  3:02 ` [PATCH 7/9] arm/mach-pxa: add gpio direction functions Robert Jarzmik
2011-11-24  3:02 ` [PATCH 8/9] arm/mach-pxa: add basic devices hooks Robert Jarzmik
2011-11-24  3:02 ` [PATCH 9/9] arm/mach-pxa: add mioa701 board Robert Jarzmik
2011-11-24  9:13   ` Marc Kleine-Budde
2011-11-24 21:15     ` Robert Jarzmik
2011-11-24  9:45   ` Sascha Hauer
2011-11-24 21:22     ` Robert Jarzmik
2011-11-24 23:08       ` Sascha Hauer [this message]
2011-11-25 21:50         ` Robert Jarzmik
2011-11-24  9:10 ` [PATCH 0/9] Initial PXA support and Mitac MIOA701 board Marc Kleine-Budde
2011-11-24  9:28   ` Sascha Hauer
2011-11-24 21:32   ` Robert Jarzmik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111124230813.GD27267@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox