[U-Boot] [PATCH 5/5] arm: Note vendor-required status of certain MACH_TYPE values

Tom Rini trini at konsulko.com
Thu Jan 26 02:42:38 CET 2017


In the cases of some boards, a MACH_TYPE number is used which is either
not registered upstream or worse (for functionality) is re-using the
number of a different (or reference) platform instead.  Make sure we
have a comment in these cases.

Cc: Albert ARIBAUD <albert.aribaud at 3adev.fr>
Cc: Walter Schweizer <swwa at users.sourceforge.net>
Cc: Stefan Roese <sr at denx.de>
Cc: Fabio Estevam <fabio.estevam at nxp.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 board/quipos/cairo/cairo.c          |  2 +-
 include/configs/ds109.h             | 15 ++-------------
 include/configs/exynos5420-common.h |  4 ++--
 include/configs/omap3_cairo.h       |  5 ++---
 include/configs/titanium.h          |  4 ++--
 include/configs/udoo.h              |  4 ++--
 include/configs/work_92105.h        |  3 +--
 7 files changed, 12 insertions(+), 25 deletions(-)

diff --git a/board/quipos/cairo/cairo.c b/board/quipos/cairo/cairo.c
index 793aa9023150..6b366dc43f1f 100644
--- a/board/quipos/cairo/cairo.c
+++ b/board/quipos/cairo/cairo.c
@@ -45,7 +45,7 @@ int board_init(void)
 {
 	gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
 	/* board id for Linux */
-	gd->bd->bi_arch_number = MACH_TYPE_OMAP3_CAIRO;
+	gd->bd->bi_arch_number = CONFIG_MACH_TYPE;
 	/* boot param addr */
 	gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
 	return 0;
diff --git a/include/configs/ds109.h b/include/configs/ds109.h
index 222a510034e2..4c874367fd2d 100644
--- a/include/configs/ds109.h
+++ b/include/configs/ds109.h
@@ -12,24 +12,13 @@
 #ifndef _CONFIG_DS109_H
 #define _CONFIG_DS109_H
 
-/*
- * FIXME: This belongs in mach-types.h.  However, we only pull mach-types
- * from Linus' kernel.org tree.  This hasn't been updated primarily due to
- * the recent arch/arm reshuffling.  So, in the meantime, we'll place it
- * here.
- */
-#include <asm/mach-types.h>
-#ifdef MACH_TYPE_SYNOLOGY
-#error "MACH_TYPE_SYNOLOGY has been defined properly, please remove this."
-#else
-#define MACH_TYPE_SYNOLOGY             527
-#endif
+/* Provide the MACH_TYPE value that the vendor kernel requires. */
+#define CONFIG_MACH_TYPE		527
 
 /*
  * High Level Configuration Options (easy to change)
  */
 #define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
-#define CONFIG_MACH_TYPE	MACH_TYPE_SYNOLOGY
 
 /*
  * Commands configuration
diff --git a/include/configs/exynos5420-common.h b/include/configs/exynos5420-common.h
index 16153eb59529..79e6d134915d 100644
--- a/include/configs/exynos5420-common.h
+++ b/include/configs/exynos5420-common.h
@@ -15,8 +15,8 @@
 
 #define CONFIG_EXYNOS5_DT
 
-#define MACH_TYPE_SMDK5420	8002
-#define CONFIG_MACH_TYPE	MACH_TYPE_SMDK5420
+/* Provide the MACH_TYPE value that the vendor kernel requires. */
+#define CONFIG_MACH_TYPE		8002
 
 #define CONFIG_VAR_SIZE_SPL
 
diff --git a/include/configs/omap3_cairo.h b/include/configs/omap3_cairo.h
index 09f4ec0b74ec..b5d2b007e824 100644
--- a/include/configs/omap3_cairo.h
+++ b/include/configs/omap3_cairo.h
@@ -228,9 +228,8 @@
 #define CONFIG_SERIAL2
 #endif
 
-/* Provide MACH_TYPE for compatibility with non-DT kernels */
-#define MACH_TYPE_OMAP3_CAIRO	3063
-#define CONFIG_MACH_TYPE	MACH_TYPE_OMAP3_CAIRO
+/* Provide the MACH_TYPE value the vendor kernel requires */
+#define CONFIG_MACH_TYPE	3063
 
 /*-----------------------------------------------------------------------
  * FLASH and environment organization
diff --git a/include/configs/titanium.h b/include/configs/titanium.h
index bbdaf0443d9f..6945eb568ccc 100644
--- a/include/configs/titanium.h
+++ b/include/configs/titanium.h
@@ -17,8 +17,8 @@
 
 #define CONFIG_MX6Q
 
-#define MACH_TYPE_TITANIUM		3769
-#define CONFIG_MACH_TYPE		MACH_TYPE_TITANIUM
+/* Provide the MACH_TYPE value that the vendor kernel requires. */
+#define CONFIG_MACH_TYPE		3769
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(2 * 1024 * 1024)
diff --git a/include/configs/udoo.h b/include/configs/udoo.h
index 05687dda4a7b..7dfb381c623c 100644
--- a/include/configs/udoo.h
+++ b/include/configs/udoo.h
@@ -13,8 +13,8 @@
 
 #include "imx6_spl.h"
 
-#define MACH_TYPE_UDOO		4800
-#define CONFIG_MACH_TYPE	MACH_TYPE_UDOO
+/* Provide the MACH_TYPE value that the vendor kernel requires. */
+#define CONFIG_MACH_TYPE		4800
 
 /* Size of malloc() pool */
 #define CONFIG_SYS_MALLOC_LEN		(2 * SZ_1M)
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index b08641fcf0da..7bda037b450d 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -18,8 +18,7 @@
  * Define work_92105 machine type by hand -- done only for compatibility
  * with original board code
  */
-#define MACH_TYPE_WORK_92105		736
-#define CONFIG_MACH_TYPE		MACH_TYPE_WORK_92105
+#define CONFIG_MACH_TYPE		736
 
 #define CONFIG_SYS_ICACHE_OFF
 #define CONFIG_SYS_DCACHE_OFF
-- 
1.9.1



More information about the U-Boot mailing list