Skip to contentSkip to conversation

arm, cortexa8: all arm_cortexa8 based boards converted

RFC PATCH New Heiko Schocher 1 participant 1 message Jul 29, 2010 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

RFC PATCH 12/19 arm, cortexa8: all arm_cortexa8 based boards converted

---
 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(-)
arch/arm/cpu/armv7/mx51/u-boot.lds +13 -1
index d66434c..55d6599 100644
@@ -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 = .;
arch/arm/cpu/armv7/omap3/emif4.c +12 -2
index fae5b11..0870857 100644
@@ -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;
 }
 
 /*
board/freescale/mx51evk/mx51evk.c +10 -4
index 75d642b..e79661b 100644
@@ -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 |
board/samsung/goni/goni.c +9 -2
index e512c59..32c44ba 100644
@@ -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
board/samsung/smdkc100/smdkc100.c +7 -2
index fb466c6..a42efb2 100644
@@ -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
include/configs/am3517_evm.h +5 -0
index 10af21b..f286d39 100644
@@ -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 */
include/configs/devkit8000.h +5 -0
index 2815771..d5c9caa 100644
@@ -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 */
include/configs/mx51evk.h +5 -0
index 86a4731..82f16bd 100644
@@ -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
include/configs/omap3_evm.h +5 -0
index c4aa220..c92db73 100644
@@ -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 */
include/configs/omap3_overo.h +5 -0
index 3a3b389..790289c 100644
@@ -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 */
include/configs/omap3_pandora.h +5 -0
index 3308ace..5c8d8da 100644
@@ -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 */
include/configs/omap3_sdp3430.h +5 -0
index 5439aa3..d7f09cd 100644
@@ -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 */
include/configs/omap3_zoom1.h +5 -0
index f612e0f..0df8f03 100644
@@ -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 */
include/configs/omap3_zoom2.h +5 -0
index aaf929e..b945aca 100644
@@ -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 */
include/configs/s5p_goni.h +4 -0
index ff0dbd3..57d12be 100644
@@ -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 */
include/configs/smdkc100.h +4 -0
index 76a47c4..9d46b62 100644
@@ -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 */
Signature · 5 lines
1.6.2.5

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany