[PATCH 2/2] imx: convert cpu_is to IS_BUILTIN

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Aug 12 09:32:07 EDT 2011


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/arm/mach-imx/include/mach/generic.h |   82 ++++++++----------------------
 1 files changed, 21 insertions(+), 61 deletions(-)
 rewrite arch/arm/mach-imx/include/mach/generic.h (73%)

diff --git a/arch/arm/mach-imx/include/mach/generic.h b/arch/arm/mach-imx/include/mach/generic.h
dissimilarity index 73%
index 8ff04fb..54a6bd3 100644
--- a/arch/arm/mach-imx/include/mach/generic.h
+++ b/arch/arm/mach-imx/include/mach/generic.h
@@ -1,61 +1,21 @@
-
-int imx_silicon_revision(void);
-#define IMX27_CHIP_REVISION_1_0   0
-#define IMX27_CHIP_REVISION_2_0   1
-
-#define IMX35_CHIP_REVISION_1_0   0x10
-#define IMX35_CHIP_REVISION_2_0   0x20
-
-u64 imx_uid(void);
-
-
-#ifdef CONFIG_ARCH_IMX1
-#define cpu_is_mx1()	(1)
-#else
-#define cpu_is_mx1()	(0)
-#endif
-
-#ifdef CONFIG_ARCH_IMX21
-#define cpu_is_mx21()	(1)
-#else
-#define cpu_is_mx21()	(0)
-#endif
-
-#ifdef CONFIG_ARCH_IMX25
-#define cpu_is_mx25()	(1)
-#else
-#define cpu_is_mx25()	(0)
-#endif
-
-#ifdef CONFIG_ARCH_IMX27
-#define cpu_is_mx27()	(1)
-#else
-#define cpu_is_mx27()	(0)
-#endif
-
-#ifdef CONFIG_ARCH_IMX31
-#define cpu_is_mx31()	(1)
-#else
-#define cpu_is_mx31()	(0)
-#endif
-
-#ifdef CONFIG_ARCH_IMX35
-#define cpu_is_mx35()	(1)
-#else
-#define cpu_is_mx35()	(0)
-#endif
-
-#ifdef CONFIG_ARCH_IMX51
-#define cpu_is_mx51()	(1)
-#else
-#define cpu_is_mx51()	(0)
-#endif
-
-#ifdef CONFIG_ARCH_IMX53
-#define cpu_is_mx53()	(1)
-#else
-#define cpu_is_mx53()	(0)
-#endif
-
-#define cpu_is_mx23()	(0)
-#define cpu_is_mx28()	(0)
+
+int imx_silicon_revision(void);
+#define IMX27_CHIP_REVISION_1_0   0
+#define IMX27_CHIP_REVISION_2_0   1
+
+#define IMX35_CHIP_REVISION_1_0   0x10
+#define IMX35_CHIP_REVISION_2_0   0x20
+
+u64 imx_uid(void);
+
+
+#define cpu_is_mx1()	IS_BUILTIN(CONFIG_ARCH_IMX1)
+#define cpu_is_mx21()	IS_BUILTIN(CONFIG_ARCH_IMX21)
+#define cpu_is_mx25()	IS_BUILTIN(CONFIG_ARCH_IMX25)
+#define cpu_is_mx27()	IS_BUILTIN(CONFIG_ARCH_IMX27)
+#define cpu_is_mx31()	IS_BUILTIN(CONFIG_ARCH_IMX31)
+#define cpu_is_mx35()	IS_BUILTIN(CONFIG_ARCH_IMX35)
+#define cpu_is_mx51()	IS_BUILTIN(CONFIG_ARCH_IMX51)
+#define cpu_is_mx53()	IS_BUILTIN(CONFIG_ARCH_IMX53)
+#define cpu_is_mx23()	(0)
+#define cpu_is_mx28()	(0)
-- 
1.7.5.4




More information about the barebox mailing list