[U-Boot] [RFC][PATCH 12/19] arm, cortexa8: all arm_cortexa8 based boards converted

Signed-off-by: Heiko Schocher hs@denx.de --- arch/arm/cpu/armv7/mx51/u-boot.lds | 14 +++++++++++++- arch/arm/cpu/armv7/omap3/emif4.c | 14 ++++++++++++-- board/freescale/mx51evk/mx51evk.c | 14 ++++++++++---- board/samsung/goni/goni.c | 11 +++++++++-- board/samsung/smdkc100/smdkc100.c | 9 +++++++-- include/configs/am3517_evm.h | 5 +++++ include/configs/devkit8000.h | 5 +++++ include/configs/mx51evk.h | 5 +++++ include/configs/omap3_evm.h | 5 +++++ include/configs/omap3_overo.h | 5 +++++ include/configs/omap3_pandora.h | 5 +++++ include/configs/omap3_sdp3430.h | 5 +++++ include/configs/omap3_zoom1.h | 5 +++++ include/configs/omap3_zoom2.h | 5 +++++ include/configs/s5p_goni.h | 4 ++++ include/configs/smdkc100.h | 4 ++++ 16 files changed, 104 insertions(+), 11 deletions(-)
diff --git a/arch/arm/cpu/armv7/mx51/u-boot.lds b/arch/arm/cpu/armv7/mx51/u-boot.lds index d66434c..55d6599 100644 --- a/arch/arm/cpu/armv7/mx51/u-boot.lds +++ b/arch/arm/cpu/armv7/mx51/u-boot.lds @@ -44,10 +44,22 @@ SECTIONS .rodata : { *(.rodata) }
. = ALIGN(4); - .data : { *(.data) } + .data : { + *(.data) + __datarel_start = .; + *(.data.rel) + __datarelrolocal_start = .; + *(.data.rel.ro.local) + __datarellocal_start = .; + *(.data.rel.local) + __datarelro_start = .; + *(.data.rel.ro) + }
+ __got_start = .; . = ALIGN(4); .got : { *(.got) } + __got_end = .;
. = .; __u_boot_cmd_start = .; diff --git a/arch/arm/cpu/armv7/omap3/emif4.c b/arch/arm/cpu/armv7/omap3/emif4.c index fae5b11..0870857 100644 --- a/arch/arm/cpu/armv7/omap3/emif4.c +++ b/arch/arm/cpu/armv7/omap3/emif4.c @@ -150,12 +150,22 @@ int dram_init(void) if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) size1 = get_sdr_cs_size(CS1);
+ gd->ram_size = size0 + size1; + return 0; +} + +void dram_init_banksize (void) +{ + DECLARE_GLOBAL_DATA_PTR; + unsigned int size0 = 0, size1 = 0; + + size0 = get_sdr_cs_size(CS0); + size1 = get_sdr_cs_size(CS1); + gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = size0; gd->bd->bi_dram[1].start = PHYS_SDRAM_1 + get_sdr_cs_offset(CS1); gd->bd->bi_dram[1].size = size1; - - return 0; }
/* diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c index 75d642b..e79661b 100644 --- a/board/freescale/mx51evk/mx51evk.c +++ b/board/freescale/mx51evk/mx51evk.c @@ -52,14 +52,20 @@ u32 get_board_rev(void) return system_rev; }
-int dram_init(void) +int dram_init (void) { - gd->bd->bi_dram[0].start = PHYS_SDRAM_1; - gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, - PHYS_SDRAM_1_SIZE); + /* dram_init must store complete ramsize in gd->ram_size */ + gd->ram_size = get_ram_size((volatile void *)CONFIG_SYS_SDRAM_BASE, + PHYS_SDRAM_1_SIZE); return 0; }
+void dram_init_banksize (void) +{ + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = gd->ram_size; +} + static void setup_iomux_uart(void) { unsigned int pad = PAD_CTL_HYS_ENABLE | PAD_CTL_PKE_ENABLE | diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index e512c59..32c44ba 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -36,14 +36,21 @@ int board_init(void)
int dram_init(void) { + gd->ram_size = PHYS_SDRAM_1_SIZE + + PHYS_SDRAM_2_SIZE + + PHYS_SDRAM_3_SIZE; + + return 0; +} + +void dram_init_banksize (void) +{ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; gd->bd->bi_dram[1].start = PHYS_SDRAM_2; gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE; gd->bd->bi_dram[2].start = PHYS_SDRAM_3; gd->bd->bi_dram[2].size = PHYS_SDRAM_3_SIZE; - - return 0; }
#ifdef CONFIG_DISPLAY_BOARDINFO diff --git a/board/samsung/smdkc100/smdkc100.c b/board/samsung/smdkc100/smdkc100.c index fb466c6..a42efb2 100644 --- a/board/samsung/smdkc100/smdkc100.c +++ b/board/samsung/smdkc100/smdkc100.c @@ -65,11 +65,16 @@ int board_init(void)
int dram_init(void) { + gd->ram_size = get_ram_size((long *)PHYS_SDRAM_1, + PHYS_SDRAM_1_SIZE); + return 0; +} + +void dram_init_banksize (void) +{ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; gd->bd->bi_dram[0].size = get_ram_size((long *)PHYS_SDRAM_1, PHYS_SDRAM_1_SIZE); - - return 0; }
#ifdef CONFIG_DISPLAY_BOARDINFO diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h index 10af21b..f286d39 100644 --- a/include/configs/am3517_evm.h +++ b/include/configs/am3517_evm.h @@ -293,4 +293,9 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h index 2815771..d5c9caa 100644 --- a/include/configs/devkit8000.h +++ b/include/configs/devkit8000.h @@ -306,4 +306,9 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/mx51evk.h b/include/configs/mx51evk.h index 86a4731..82f16bd 100644 --- a/include/configs/mx51evk.h +++ b/include/configs/mx51evk.h @@ -187,4 +187,9 @@ #define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE #define CONFIG_ENV_IS_NOWHERE
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE 0x90000000 +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h index c4aa220..c92db73 100644 --- a/include/configs/omap3_evm.h +++ b/include/configs/omap3_evm.h @@ -367,4 +367,9 @@ extern unsigned int boot_flash_type; #define CONFIG_BOOTP_HOSTNAME 0x00000004 #define CONFIG_BOOTP_BOOTPATH 0x00000010
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 3a3b389..790289c 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -317,4 +317,9 @@ extern unsigned int boot_flash_type;
#endif /* (CONFIG_CMD_NET) */
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/omap3_pandora.h b/include/configs/omap3_pandora.h index 3308ace..5c8d8da 100644 --- a/include/configs/omap3_pandora.h +++ b/include/configs/omap3_pandora.h @@ -296,4 +296,9 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/omap3_sdp3430.h b/include/configs/omap3_sdp3430.h index 5439aa3..d7f09cd 100644 --- a/include/configs/omap3_sdp3430.h +++ b/include/configs/omap3_sdp3430.h @@ -370,4 +370,9 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/omap3_zoom1.h b/include/configs/omap3_zoom1.h index f612e0f..0df8f03 100644 --- a/include/configs/omap3_zoom1.h +++ b/include/configs/omap3_zoom1.h @@ -320,4 +320,9 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/omap3_zoom2.h b/include/configs/omap3_zoom2.h index aaf929e..b945aca 100644 --- a/include/configs/omap3_zoom2.h +++ b/include/configs/omap3_zoom2.h @@ -279,4 +279,9 @@ extern unsigned int boot_flash_sec; extern unsigned int boot_flash_type; #endif
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR (LOW_LEVEL_SRAM_STACK - \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/s5p_goni.h b/include/configs/s5p_goni.h index ff0dbd3..57d12be 100644 --- a/include/configs/s5p_goni.h +++ b/include/configs/s5p_goni.h @@ -214,4 +214,8 @@
#define CONFIG_DOS_PARTITION 1
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */ diff --git a/include/configs/smdkc100.h b/include/configs/smdkc100.h index 76a47c4..9d46b62 100644 --- a/include/configs/smdkc100.h +++ b/include/configs/smdkc100.h @@ -245,4 +245,8 @@ #define CONFIG_ENV_SROM_BANK 3 /* Select SROM Bank-3 for Ethernet*/ #endif /* CONFIG_CMD_NET */
+/* additions for new relocation code, must added to all boards */ +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \ + CONFIG_SYS_GBL_DATA_SIZE) + #endif /* __CONFIG_H */
participants (1)
-
Heiko Schocher