[U-Boot] [PATCH V4 12/19] arm: mx6: add get_cpu_type()
Nikita Kiryanov
nikita at compulab.co.il
Wed Aug 20 14:08:59 CEST 2014
Define get_cpu_type(). Reuse it in is_cpu_type().
Cc: Igor Grinberg <grinberg at compulab.co.il>
Cc: Stefano Babic <sbabic at denx.de>
Signed-off-by: Nikita Kiryanov <nikita at compulab.co.il>
---
New patch for V4 of series.
arch/arm/include/asm/arch-mx6/sys_proto.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h
index 42d30f5..ba0a66e 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -19,8 +19,9 @@ u32 get_cpu_rev(void);
/* returns MXC_CPU_ value */
#define cpu_type(rev) (((rev) >> 12)&0xff)
-/* use with MXC_CPU_ constants */
-#define is_cpu_type(cpu) (cpu_type(get_cpu_rev()) == cpu)
+/* both macros return/take MXC_CPU_ constants */
+#define get_cpu_type() (cpu_type(get_cpu_rev()))
+#define is_cpu_type(cpu) (get_cpu_type() == cpu)
const char *get_imx_type(u32 imxtype);
unsigned imx_ddr_size(void);
--
1.9.1
More information about the U-Boot
mailing list