OMAP3: Use functions print_cpuinfo() and checkboard()
PATCH v4 1/3 OMAP3: Use functions print_cpuinfo() and checkboard()
Use the functions print_cpuinfo() and checkboard() to display the cpu and board specific information.
These functions reuse content from the existing function display_board_info() - which has been removed.
Also, updated the existig OMAP3 configurations to
define:
- CONFIG_DISPLAY_CPUINFO
- CONFIG_DISPLAY_BOARDINFO
Signed-off-by Sanjeev Premi <[email protected]>
--- cpu/arm_cortexa8/omap3/board.c | 27 +++++++-- cpu/arm_cortexa8/omap3/sys_info.c | 105 +++++++++++++++----------------- include/asm-arm/arch-omap3/sys_proto.h | 1 - include/configs/omap3_beagle.h | 6 ++ include/configs/omap3_evm.h | 7 ++- include/configs/omap3_overo.h | 6 ++ include/configs/omap3_pandora.h | 6 ++ include/configs/omap3_zoom1.h | 6 ++ 8 files changed, 102 insertions(+), 62 deletions(-)
cpu/arm_cortexa8/omap3/board.c +22 -5
@@ -39,6 +39,8 @@extern omap3_sysinfo sysinfo; +extern u32 is_mem_sdr (void ); +/****************************************************************************** * Routine: delay * Description: spinning delay to use before udelay works
@@ -272,11 +274,6 @@ int dram_init(void) {DECLARE_GLOBAL_DATA_PTR ;unsigned int size0 =0 , size1 =0 ; -u32 btype; - - btype =get_board_type (); - -display_board_info (btype);/* * If a second bank of DDR is attached to CS1 this is
@@ -342,3 +339,23 @@ U_BOOT_CMD( );#endif /* CONFIG_NAND_OMAP_GPMC */ + +#ifdef CONFIG_DISPLAY_BOARDINFO +/** +* Print board information +*/ +int checkboard (void ) +{ +char *mem_s ; + +if (is_mem_sdr ()) + mem_s ="mSDR" ; +else + mem_s ="LPDDR" ; + +printf ("%s + %s/%s\n" , sysinfo.board_string, mem_s, + sysinfo.nand_string); + +return 0 ; +} +#endif /* CONFIG_DISPLAY_BOARDINFO */
cpu/arm_cortexa8/omap3/sys_info.c +50 -55
114 lines not on this page · raw message
include/asm-arm/arch-omap3/sys_proto.h +0 -1
@@ -47,7 +47,6 @@ u32 is_gpmc_muxed(void);u32 get_gpmc0_type (void );u32 get_gpmc0_width (void );u32 get_board_type (void ); -void display_board_info (u32 );u32 get_sdr_cs_size (u32 );u32 get_sdr_cs_offset (u32 );u32 is_running_in_sdram (void );
include/configs/omap3_beagle.h +6 -0
@@ -41,6 +41,12 @@#include <asm/arch/cpu.h> /* get chip and board defs */ #include <asm/arch/omap3.h> +/* +* Display CPU and Board information +*/ +#define CONFIG_DISPLAY_CPUINFO 1 +#define CONFIG_DISPLAY_BOARDINFO 1 +/* Clock Defines */ #define V_OSCK 26000000/* Clock output from T2 */ #define V_SCLK (V_OSCK >> 1)
include/configs/omap3_evm.h +6 -1
@@ -46,6 +46,12 @@#include <asm/arch/cpu.h> /* get chip and board defs */ #include <asm/arch/omap3.h> +/* +* Display CPU and Board information +*/ +#define CONFIG_DISPLAY_CPUINFO 1 +#define CONFIG_DISPLAY_BOARDINFO 1 +/* Clock Defines */ #define V_OSCK 26000000/* Clock output from T2 */ #define V_SCLK (V_OSCK >> 1)
@@ -66,7 +72,6 @@#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + SZ_128K)#define CONFIG_SYS_GBL_DATA_SIZE 128/* bytes reserved for */ /* initial data */ -/* * Hardware drivers */
include/configs/omap3_overo.h +6 -0
@@ -33,6 +33,12 @@#include <asm/arch/cpu.h> /* get chip and board defs */ #include <asm/arch/omap3.h> +/* +* Display CPU and Board information +*/ +#define CONFIG_DISPLAY_CPUINFO 1 +#define CONFIG_DISPLAY_BOARDINFO 1 +/* Clock Defines */ #define V_OSCK 26000000/* Clock output from T2 */ #define V_SCLK (V_OSCK >> 1)
include/configs/omap3_pandora.h +6 -0
@@ -36,6 +36,12 @@#include <asm/arch/cpu.h> /* get chip and board defs */ #include <asm/arch/omap3.h> +/* +* Display CPU and Board information +*/ +#define CONFIG_DISPLAY_CPUINFO 1 +#define CONFIG_DISPLAY_BOARDINFO 1 +/* Clock Defines */ #define V_OSCK 26000000/* Clock output from T2 */ #define V_SCLK (V_OSCK >> 1)
include/configs/omap3_zoom1.h +6 -0
@@ -42,6 +42,12 @@#include <asm/arch/cpu.h> /* get chip and board defs */ #include <asm/arch/omap3.h> +/* +* Display CPU and Board information +*/ +#define CONFIG_DISPLAY_CPUINFO 1 +#define CONFIG_DISPLAY_BOARDINFO 1 +/* Clock Defines */ #define V_OSCK 26000000/* Clock output from T2 */ #define V_SCLK (V_OSCK >> 1)
Signature · 1 line
1.6.2.1