[U-Boot] [PATCH 01/11] at91sam9260: Replace PHYS_SDRAM with CONFIG_SYS_SDRAM_BASE
Alexander Stein
alexander.stein at systec-electronic.com
Mon Nov 1 09:29:45 CET 2010
Same for PHYS_SDRAM_SIZE and CONFIG_SYS_SDRAM_SIZE and use SZ_* macros
Signed-off-by: Alexander Stein <alexander.stein at systec-electronic.com>
---
board/atmel/at91sam9260ek/at91sam9260ek.c | 6 +++---
include/configs/at91sam9260ek.h | 17 ++++++++++++-----
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/board/atmel/at91sam9260ek/at91sam9260ek.c b/board/atmel/at91sam9260ek/at91sam9260ek.c
index 64c6d17..063ddbf 100644
--- a/board/atmel/at91sam9260ek/at91sam9260ek.c
+++ b/board/atmel/at91sam9260ek/at91sam9260ek.c
@@ -153,7 +153,7 @@ int board_init(void)
gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9260EK;
#endif
/* adress of boot parameters */
- gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
+ gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
at91_serial_hw_init();
#ifdef CONFIG_CMD_NAND
@@ -171,8 +171,8 @@ int board_init(void)
int dram_init(void)
{
- gd->bd->bi_dram[0].start = PHYS_SDRAM;
- gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
+ gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+ gd->bd->bi_dram[0].size = CONFIG_SYS_SDRAM_SIZE;
return 0;
}
diff --git a/include/configs/at91sam9260ek.h b/include/configs/at91sam9260ek.h
index 5e7dee5..8aee5a6 100644
--- a/include/configs/at91sam9260ek.h
+++ b/include/configs/at91sam9260ek.h
@@ -27,6 +27,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <asm/sizes.h>
+
#define CONFIG_AT91_LEGACY
/* ARM asynchronous clock */
@@ -40,6 +42,7 @@
#else
#define CONFIG_AT91SAM9260 1 /* It's an Atmel AT91SAM9260 SoC*/
#endif
+#define CONFIG_AT91FAMILY
#define CONFIG_ARCH_CPU_INIT
#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
@@ -93,8 +96,8 @@
/* SDRAM */
#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_SDRAM_SIZE SZ_64M
/* DataFlash */
#define CONFIG_ATMEL_DATAFLASH_SPI
@@ -150,7 +153,7 @@
#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
-#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
+#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
#define CONFIG_SYS_MEMTEST_END 0x23e00000
#ifdef CONFIG_SYS_USE_DATAFLASH_CS0
@@ -211,9 +214,13 @@
/*
* Size of malloc() pool
*/
-#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
+#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + SZ_128K, 0x1000)
+/* size in bytes reserved for initial data */
+
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_4K \
+ - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_STACKSIZE (32*1024) /* regular stack */
+#define CONFIG_STACKSIZE (SZ_32K) /* regular stack */
#ifdef CONFIG_USE_IRQ
#error CONFIG_USE_IRQ not supported
--
1.7.2.2
More information about the U-Boot
mailing list