From: Nikita Kiryanov Date: Wed, 20 Aug 2014 12:08:59 +0000 (+0300) Subject: arm: mx6: add get_cpu_type() X-Git-Tag: v2014.10-rc3~66^2~3^2~26 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea818ae74824fecf252fc64090295d68b2998e9c;p=platform%2Fkernel%2Fu-boot.git arm: mx6: add get_cpu_type() Define get_cpu_type(). Reuse it in is_cpu_type(). Cc: Igor Grinberg Cc: Stefano Babic Signed-off-by: Nikita Kiryanov --- diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h b/arch/arm/include/asm/arch-mx6/sys_proto.h index 306d699..c35a9051 100644 --- a/arch/arm/include/asm/arch-mx6/sys_proto.h +++ b/arch/arm/include/asm/arch-mx6/sys_proto.h @@ -20,8 +20,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);