]> git.sur5r.net Git - u-boot/commitdiff
OMAP3: Use functions print_cpuinfo() and checkboard()
authorSanjeev Premi <premi@ti.com>
Mon, 27 Apr 2009 15:57:27 +0000 (21:27 +0530)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Wed, 29 Apr 2009 19:11:32 +0000 (21:11 +0200)
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 <premi@ti.com>
cpu/arm_cortexa8/omap3/board.c
cpu/arm_cortexa8/omap3/sys_info.c
include/asm-arm/arch-omap3/sys_proto.h
include/configs/omap3_beagle.h
include/configs/omap3_evm.h
include/configs/omap3_overo.h
include/configs/omap3_pandora.h
include/configs/omap3_zoom1.h

index 15ea936b40664baa05c9d572b21f409a337a36d0..51d5cf636feb9eeb04793dfc97f2d5c108d262fe 100644 (file)
@@ -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 */
index b385b912b43f786c213c216aee159562aa1ce35c..d605d7c2f3363670b7fc08530792fd6d24b981a4 100644 (file)
@@ -185,61 +185,6 @@ u32 get_board_rev(void)
        return 0x20;
 }
 
-/*********************************************************************
- *  display_board_info() - print banner with board info.
- *********************************************************************/
-void display_board_info(u32 btype)
-{
-       char *cpu_s, *mem_s, *sec_s;
-
-       switch (get_cpu_type()) {
-       case OMAP3503:
-               cpu_s = "3503";
-               break;
-       case OMAP3515:
-               cpu_s = "3515";
-               break;
-       case OMAP3525:
-               cpu_s = "3525";
-               break;
-       case OMAP3530:
-               cpu_s = "3530";
-               break;
-       default:
-               cpu_s = "35XX";
-               break;
-       }
-
-       if (is_mem_sdr())
-               mem_s = "mSDR";
-       else
-               mem_s = "LPDDR";
-
-       switch (get_device_type()) {
-       case TST_DEVICE:
-               sec_s = "TST";
-               break;
-       case EMU_DEVICE:
-               sec_s = "EMU";
-               break;
-       case HS_DEVICE:
-               sec_s = "HS";
-               break;
-       case GP_DEVICE:
-               sec_s = "GP";
-               break;
-       default:
-               sec_s = "?";
-       }
-
-
-       printf("OMAP%s-%s rev %d, CPU-OPP2 L3-165MHz\n", cpu_s,
-              sec_s, get_cpu_rev());
-       printf("%s + %s/%s\n", sysinfo.board_string,
-              mem_s, sysinfo.nand_string);
-
-}
-
 /********************************************************
  *  get_base(); get upper addr of current execution
  *******************************************************/
@@ -305,3 +250,53 @@ u32 get_device_type(void)
 {
        return ((readl(&ctrl_base->status) & (DEVICE_MASK)) >> 8);
 }
+
+#ifdef CONFIG_DISPLAY_CPUINFO
+/**
+ * Print CPU information
+ */
+int print_cpuinfo (void)
+{
+       char *cpu_s, *sec_s;
+
+       switch (get_cpu_type()) {
+       case OMAP3503:
+               cpu_s = "3503";
+               break;
+       case OMAP3515:
+               cpu_s = "3515";
+               break;
+       case OMAP3525:
+               cpu_s = "3525";
+               break;
+       case OMAP3530:
+               cpu_s = "3530";
+               break;
+       default:
+               cpu_s = "35XX";
+               break;
+       }
+
+       switch (get_device_type()) {
+       case TST_DEVICE:
+               sec_s = "TST";
+               break;
+       case EMU_DEVICE:
+               sec_s = "EMU";
+               break;
+       case HS_DEVICE:
+               sec_s = "HS";
+               break;
+       case GP_DEVICE:
+               sec_s = "GP";
+               break;
+       default:
+               sec_s = "?";
+       }
+
+       printf("OMAP%s-%s rev %d, CPU-OPP2 L3-165MHz\n", cpu_s,
+              sec_s, get_cpu_rev());
+
+       return 0;
+}
+#endif /* CONFIG_DISPLAY_CPUINFO */
index 8b554bbe8ef50832dd0cf24d8c5b652908763487..830447ba9991cdbdd918574f2d52505daa44f1c3 100644 (file)
@@ -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);
index 6ed12624ee91d86504db76657c1cfc883e19aa33..3bfc0a21d6ac2c2017776d7021435eeae8ddbb87 100644 (file)
 #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)
index c15b4e35ff5fb927d2fcd2ba6c36997daaa37e8b..1b309504051a4be5ebcd5536cf482710c38dd9fa 100644 (file)
 #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
  */
index 4398a664a9cc5cf91b622ab82a2f07db2c7c0a94..a8be4e697c42a4ba80dc8c1389a5a7996bf03877 100644 (file)
 #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)
index c4f46de0d3a84c9ad3361c7d7729a358ce27f164..b8cb42e5057077975087ad12e7bc75108155ea73 100644 (file)
 #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)
index fa428c03da0404bee222c5453862a6ec4b81fb68..b275b15419094a81e3a00eec6064b1f2e5071564 100644 (file)
 #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)