public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] at91sam9261/g10: support relocation
Date: Mon, 18 Apr 2011 11:32:48 +0200	[thread overview]
Message-ID: <4DAC0540.9070904@gmail.com> (raw)
In-Reply-To: <479c17df224bd1f1d8e5c1e19fa428f6cb802137.1303118067.git.rubini@gnudd.com>

Dear Alessandro Rubini,

Am 18.04.2011 11:21, schrieb Alessandro Rubini:
> This adds support for relocation, but won't work for the default
> settings whereas AT91Boot loads u-boot to the last meg and it then
> tries to relocate slightly later, thus overwriting itself.
> 
> Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
> ---
>  board/atmel/at91sam9261ek/at91sam9261ek.c |    3 +--
>  include/configs/at91sam9261ek.h           |    4 ++++
>  2 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c
> index de5cfae..ec1d2a3 100644
> --- a/board/atmel/at91sam9261ek/at91sam9261ek.c
> +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c
> @@ -273,8 +273,7 @@ int board_eth_init(bd_t *bis)
>  
>  int dram_init(void)
>  {
> -	gd->bd->bi_dram[0].start = PHYS_SDRAM;
> -	gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
> +	gd->ram_size = get_ram_size(PHYS_SDRAM, PHYS_SDRAM_SIZE);

please stop using this PHYS_SDRAM macros. They where replaced by
CONFIG_SYS_SDRAM_(BASE|SIZE).

>  	return 0;
>  }
>  
> diff --git a/include/configs/at91sam9261ek.h b/include/configs/at91sam9261ek.h
> index 401478b..71a4357 100644
> --- a/include/configs/at91sam9261ek.h
> +++ b/include/configs/at91sam9261ek.h
> @@ -30,6 +30,7 @@
>  #define CONFIG_AT91_LEGACY
>  
>  /* ARM asynchronous clock */
> +#define CONFIG_AT91FAMILY

CONFIG_AT91FAMILY is defined in some asm/arch/hardware.h files. You will
get 'double definition' errors here. The best solution is currently to
include asm/hardware.h in board config right after the correct SoC
define. I have started a discussion on that problem yesterday evening ->
http://article.gmane.org/gmane.comp.boot-loaders.u-boot/97903

>  #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000	/* 18.432 MHz crystal */

I guess SLOW_CLOCK is missing here ...

>  #define CONFIG_SYS_HZ		1000
>  
> @@ -110,6 +111,9 @@
>  #define CONFIG_NR_DRAM_BANKS		1
>  #define PHYS_SDRAM			0x20000000
>  #define PHYS_SDRAM_SIZE			0x04000000	/* 64 megs */
> +#define CONFIG_SYS_SDRAM_BASE		0x20000000

just replace the PHYS_SDRAM defines by CONFIG_SYS_SDRAM defines.

> +#define CONFIG_SYS_INIT_SP_ADDR		0x20100000	/* within RAM is ok */
> +

I recommend to use SRAM here, see top900(0) header for example.


>  
>  /* DataFlash */
>  #define CONFIG_ATMEL_DATAFLASH_SPI

regards

Andreas Bie?mann

  reply	other threads:[~2011-04-18  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18  9:20 [U-Boot] [PATCH 1/4] atmel_dataflash: remove use of get_timer_masked Alessandro Rubini
2011-04-18  9:20 ` [U-Boot] [PATCH 2/4] ARM: don't relocate if we are already too high Alessandro Rubini
2011-04-18  9:21 ` [U-Boot] [PATCH 3/4] at91sam9261/g10: support relocation Alessandro Rubini
2011-04-18  9:32   ` Andreas Bießmann [this message]
2011-04-18  9:21 ` [U-Boot] [PATCH 4/4] at91sam9261/g10: move config from Makefile to boards.cfg Alessandro Rubini
2011-04-18 10:41 ` [U-Boot] [PATCH 1/4] atmel_dataflash: remove use of get_timer_masked Reinhard Meyer

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=4DAC0540.9070904@gmail.com \
    --to=andreas.devel@googlemail.com \
    --cc=u-boot@lists.denx.de \
    /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