]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: omap: innovator: use common code for machine type
authorIgor Grinberg <grinberg@compulab.co.il>
Sun, 3 Jul 2011 23:00:21 +0000 (23:00 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 3 Sep 2011 20:40:45 +0000 (22:40 +0200)
Innovator and H2 boards used machine_is_* macros for setting the machine
type. These macros are expanded in compile time and thus leaves
unreachable code (though gcc might optimize it).
Switch them to use common code for machine type setting.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
board/ti/omap1610inn/omap1610innovator.c
include/configs/omap1610h2.h
include/configs/omap1610inn.h

index 44818bbdaee4bcb96f2795394511d687e4c7364e..16e823766a9a08a50a49cdaf8416e3633d5d13ac 100644 (file)
@@ -63,13 +63,6 @@ static inline void delay (unsigned long loops)
 
 int board_init (void)
 {
-       if (machine_is_omap_h2())
-               gd->bd->bi_arch_number = MACH_TYPE_OMAP_H2;
-       else if (machine_is_omap_innovator())
-               gd->bd->bi_arch_number = MACH_TYPE_OMAP_INNOVATOR;
-       else
-               gd->bd->bi_arch_number = MACH_TYPE_OMAP_GENERIC;
-
        /* adress of boot parameters */
        gd->bd->bi_boot_params = 0x10000100;
 
index cb2a07f65a8c7a51e6885a2549ec869767e9db3e..9fa33172f79f3958bc084903f77a2dbeebe1fa1a 100644 (file)
@@ -34,7 +34,8 @@
 #define CONFIG_OMAP            1       /* in a TI OMAP core */
 #define CONFIG_OMAP1610                1       /* which is in a 1610 */
 #define CONFIG_H2_OMAP1610     1       /* on an H2 Board */
-#define CONFIG_MACH_OMAP_H2            /* Select board mach-type */
+
+#define CONFIG_MACH_TYPE       MACH_TYPE_OMAP_H2
 
 /* input clock of PLL */
 /* the OMAP1610 H2 has 12MHz input clock */
index e82b4b258f554433461d4c87594c025dcbe11821..e3f3487ce21ee14bce383ceabe45049a4fbf6d1a 100644 (file)
@@ -34,7 +34,8 @@
 #define CONFIG_OMAP    1                       /* in a TI OMAP core    */
 #define CONFIG_OMAP1610        1               /* which is in a 1610  */
 #define CONFIG_INNOVATOROMAP1610       1       /*  a Innovator Board  */
-#define CONFIG_MACH_OMAP_INNOVATOR     /* Select board mach-type */
+
+#define CONFIG_MACH_TYPE       MACH_TYPE_OMAP_INNOVATOR
 
 /* input clock of PLL */
 /* the OMAP1610 Innovator has 12MHz input clock */