[U-Boot] [PATCH v3 2/3] arm: omap: innovator: Prepare for mach-types.h changes

Igor Grinberg grinberg at compulab.co.il
Wed May 4 09:13:30 CEST 2011


This board used machine_is_* macros for identifying the arch number.
Fix this by using CONFIG_MACH_TYPE configuration variable.

Signed-off-by: Igor Grinberg <grinberg at compulab.co.il>
---
v2:     remove the ifdeferry by introducing config variable
v3:	do not introduce yet another CONFIG_<var>, use existing
	CONFIG_MACH_TYPE variable

 board/ti/omap1610inn/omap1610innovator.c |    7 +------
 include/configs/omap1610h2.h             |    4 +++-
 include/configs/omap1610inn.h            |    4 +++-
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/board/ti/omap1610inn/omap1610innovator.c b/board/ti/omap1610inn/omap1610innovator.c
index 44818bb..2dbb9e5 100644
--- a/board/ti/omap1610inn/omap1610innovator.c
+++ b/board/ti/omap1610inn/omap1610innovator.c
@@ -63,12 +63,7 @@ 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;
+	gd->bd->bi_arch_number = CONFIG_MACH_TYPE;
 
 	/* adress of boot parameters */
 	gd->bd->bi_boot_params = 0x10000100;
diff --git a/include/configs/omap1610h2.h b/include/configs/omap1610h2.h
index 7e53ae6..9cda6c9 100644
--- a/include/configs/omap1610h2.h
+++ b/include/configs/omap1610h2.h
@@ -34,7 +34,9 @@
 #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 */
+
+/* Select board mach-type */
+#define CONFIG_MACH_TYPE	MACH_TYPE_OMAP_H2
 
 /* input clock of PLL */
 /* the OMAP1610 H2 has 12MHz input clock */
diff --git a/include/configs/omap1610inn.h b/include/configs/omap1610inn.h
index be569a3..f32975d 100644
--- a/include/configs/omap1610inn.h
+++ b/include/configs/omap1610inn.h
@@ -34,7 +34,9 @@
 #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 */
+
+/* Select board mach-type */
+#define CONFIG_MACH_TYPE	MACH_TYPE_OMAP_INNOVATOR
 
 /* input clock of PLL */
 /* the OMAP1610 Innovator has 12MHz input clock */
-- 
1.7.3.4



More information about the U-Boot mailing list