Skip to contentSkip to conversation

OMAP3: Clean up system information

U-Boot dirk.behme at googlemail.com 2 participants 2 messages Nov 12, 2008 – Nov 14, 2008

lore
Share & tools
lore
#0 lore raw

Clean up system info:

- Move board dependent config to board header
- Clean up code and remove unused code

---
 board/omap3/beagle/beagle.h            |    6 +
 board/omap3/evm/evm.h                  |    6 +
 board/omap3/overo/overo.h              |    6 +
 cpu/arm_cortexa8/omap3/board.c         |    7 +-
 cpu/arm_cortexa8/omap3/sys_info.c      |  102 ++++-----------------------------
 include/asm-arm/arch-omap3/sys_proto.h |    4 -
 6 files changed, 39 insertions(+), 92 deletions(-)
board/omap3/beagle/beagle.h +6 -0
Index: u-boot-arm/board/omap3/beagle/beagle.h
===================================================================
@@ -26,8 +26,14 @@
 const omap3_sysinfo sysinfo = {
 	SDP_3430_V1,
 	SDP_3430_V2,
+	DDR_STACKED,
 	"3530",
 	"OMAP3 Beagle board",
+#if defined(CONFIG_ENV_IS_IN_ONENAND)
+	"OneNAND",
+#else
+	"NAND",
+#endif
 };
 
 /*
board/omap3/evm/evm.h +6 -0
Index: u-boot-arm/board/omap3/evm/evm.h
===================================================================
@@ -26,8 +26,14 @@
 const omap3_sysinfo sysinfo = {
 	OMAP3EVM_V1,
 	OMAP3EVM_V2,
+	DDR_DISCRETE,
 	"35X-Family",
 	"OMAP3 EVM board",
+#if defined(CONFIG_ENV_IS_IN_ONENAND)
+	"OneNAND",
+#else
+	"NAND",
+#endif
 };
 
 static int setup_net_chip(void);
board/omap3/overo/overo.h +6 -0
Index: u-boot-arm/board/omap3/overo/overo.h
===================================================================
@@ -26,8 +26,14 @@
 const omap3_sysinfo sysinfo = {
 	SDP_3430_V1,
 	SDP_3430_V2,
+	DDR_STACKED,
 	"3503",
 	"Gumstix Overo board",
+#if defined(CONFIG_ENV_IS_IN_ONENAND)
+	"OneNAND",
+#else
+	"NAND",
+#endif
 };
 
 /*
cpu/arm_cortexa8/omap3/board.c +4 -3
Index: u-boot-arm/cpu/arm_cortexa8/omap3/board.c
===================================================================
@@ -44,6 +44,8 @@
 #define UNLOCK_2 0x00000000
 #define UNLOCK_3 0x0000FFFF
 
+extern omap3_sysinfo sysinfo;
+
 /******************************************************************************
  * Routine: delay
  * Description: spinning delay to use before udelay works
@@ -265,10 +267,9 @@ int dram_init(void)
 {
 	DECLARE_GLOBAL_DATA_PTR;
 	unsigned int size0 = 0, size1 = 0;
-	u32 mtype, btype;
+	u32 btype;
 
 	btype = get_board_type();
-	mtype = get_mem_type();
 
 	display_board_info(btype);
 
@@ -277,7 +278,7 @@ int dram_init(void)
 	 * where it can be started.  Early init code will init
 	 * memory on CS0.
 	 */
-	if ((mtype == DDR_COMBO) || (mtype == DDR_STACKED)) {
+	if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) {
 		do_sdrc_init(SDRC_CS1_OSET, NOT_EARLY);
 		make_cs1_contiguous();
 	}
cpu/arm_cortexa8/omap3/sys_info.c +15 -87

150 lines not on this page · raw message

include/asm-arm/arch-omap3/sys_proto.h +2 -2
Index: u-boot-arm/include/asm-arm/arch-omap3/sys_proto.h
===================================================================
@@ -24,8 +24,10 @@
 typedef struct {
 	u32 board_type_v1;
 	u32 board_type_v2;
+	u32 mtype;
 	char *cpu_string;
 	char *board_string;
+	char *nand_string;
 } omap3_sysinfo;
 
 void prcm_init(void);
@@ -39,11 +41,9 @@ void gpmc_init(void);
 void watchdog_init(void);
 void set_muxconf_regs(void);
 
-u32 get_cpu_type(void);
 u32 get_cpu_rev(void);
 u32 get_mem_type(void);
 u32 get_sysboot_value(void);
-u32 get_gpmc0_base(void);
 u32 is_gpmc_muxed(void);
 u32 get_gpmc0_type(void);
 u32 get_gpmc0_width(void);
#1 lore raw
Quoted 7 lines · dirk.behme at googlemail.com

Clean up system info:

- Move board dependent config to board header
- Clean up code and remove unused code

Quoted 9 lines
---
 board/omap3/beagle/beagle.h            |    6 +
 board/omap3/evm/evm.h                  |    6 +
 board/omap3/overo/overo.h              |    6 +
 cpu/arm_cortexa8/omap3/board.c         |    7 +-
 cpu/arm_cortexa8/omap3/sys_info.c      |  102 ++++-----------------------------
 include/asm-arm/arch-omap3/sys_proto.h |    4 -
 6 files changed, 39 insertions(+), 92 deletions(-)

Applied to u-boot-arm/omap

Best Regards,
J.