mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] ARM i.MX: move cpu_type macros in front of cpu_revision code
@ 2016-11-28  9:27 Alexander Kurz
  2016-11-28  9:27 ` [PATCH 2/4] ARM i.MX: add SoC type detection for i.MX6SL Alexander Kurz
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alexander Kurz @ 2016-11-28  9:27 UTC (permalink / raw)
  To: barebox; +Cc: Alexander Kurz

Preparational commit to enable the use of cpu_type macros in imx6_cpu_revision()

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 arch/arm/mach-imx/include/mach/imx6.h | 40 +++++++++++++++++------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-imx/include/mach/imx6.h b/arch/arm/mach-imx/include/mach/imx6.h
index 8c169f1..e201721 100644
--- a/arch/arm/mach-imx/include/mach/imx6.h
+++ b/arch/arm/mach-imx/include/mach/imx6.h
@@ -50,6 +50,26 @@ static inline int imx6_cpu_type(void)
 	return __imx6_cpu_type();
 }
 
+#define DEFINE_MX6_CPU_TYPE(str, type)					\
+	static inline int cpu_mx6_is_##str(void)			\
+	{								\
+		return __imx6_cpu_type() == type;			\
+	}								\
+									\
+	static inline int cpu_is_##str(void)				\
+	{								\
+		if (!cpu_is_mx6())					\
+			return 0;					\
+		return cpu_mx6_is_##str();				\
+	}
+
+DEFINE_MX6_CPU_TYPE(mx6s, IMX6_CPUTYPE_IMX6S);
+DEFINE_MX6_CPU_TYPE(mx6dl, IMX6_CPUTYPE_IMX6DL);
+DEFINE_MX6_CPU_TYPE(mx6q, IMX6_CPUTYPE_IMX6Q);
+DEFINE_MX6_CPU_TYPE(mx6d, IMX6_CPUTYPE_IMX6D);
+DEFINE_MX6_CPU_TYPE(mx6sx, IMX6_CPUTYPE_IMX6SX);
+DEFINE_MX6_CPU_TYPE(mx6ul, IMX6_CPUTYPE_IMX6UL);
+
 static inline int __imx6_cpu_revision(void)
 {
 
@@ -85,24 +105,4 @@ static inline int imx6_cpu_revision(void)
 	return __imx6_cpu_revision();
 }
 
-#define DEFINE_MX6_CPU_TYPE(str, type)					\
-	static inline int cpu_mx6_is_##str(void)			\
-	{								\
-		return __imx6_cpu_type() == type;			\
-	}								\
-									\
-	static inline int cpu_is_##str(void)				\
-	{								\
-		if (!cpu_is_mx6())					\
-			return 0;					\
-		return cpu_mx6_is_##str();				\
-	}
-
-DEFINE_MX6_CPU_TYPE(mx6s, IMX6_CPUTYPE_IMX6S);
-DEFINE_MX6_CPU_TYPE(mx6dl, IMX6_CPUTYPE_IMX6DL);
-DEFINE_MX6_CPU_TYPE(mx6q, IMX6_CPUTYPE_IMX6Q);
-DEFINE_MX6_CPU_TYPE(mx6d, IMX6_CPUTYPE_IMX6D);
-DEFINE_MX6_CPU_TYPE(mx6sx, IMX6_CPUTYPE_IMX6SX);
-DEFINE_MX6_CPU_TYPE(mx6ul, IMX6_CPUTYPE_IMX6UL);
-
 #endif /* __MACH_IMX6_H */
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-12-07 21:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28  9:27 [PATCH 1/4] ARM i.MX: move cpu_type macros in front of cpu_revision code Alexander Kurz
2016-11-28  9:27 ` [PATCH 2/4] ARM i.MX: add SoC type detection for i.MX6SL Alexander Kurz
2016-12-07 20:53   ` Sascha Hauer
2016-12-07 21:40     ` Alexander Kurz
2016-11-28  9:27 ` [PATCH 3/4] ARM: i.MX6SL: import clock infrastructure from linux Alexander Kurz
2016-11-28  9:27 ` [PATCH 4/4] ARM i.MX: Add i.MX6SL support Alexander Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox