[U-Boot] [PATCH 3/4] at91sam9261/g10: support relocation
Alessandro Rubini
rubini at gnudd.com
Mon Apr 18 11:21:03 CEST 2011
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 at 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);
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
#define CONFIG_SYS_AT91_MAIN_CLOCK 18432000 /* 18.432 MHz crystal */
#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
+#define CONFIG_SYS_INIT_SP_ADDR 0x20100000 /* within RAM is ok */
+
/* DataFlash */
#define CONFIG_ATMEL_DATAFLASH_SPI
--
1.5.6.5
More information about the U-Boot
mailing list