summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-mx6
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-06-11 18:30:35 +0800
committerStefano Babic <sbabic@denx.de>2015-06-27 18:16:31 +0200
commitb65d9d868efcae5bf40377deafc60a968f78e55c (patch)
tree4523466f03b4e41df6d061a6f4febc2380f650af /arch/arm/include/asm/arch-mx6
parentfc6e442568b645fc8132f7bc41623370953d4661 (diff)
downloadtalos-obmc-uboot-b65d9d868efcae5bf40377deafc60a968f78e55c.tar.gz
talos-obmc-uboot-b65d9d868efcae5bf40377deafc60a968f78e55c.zip
imx: mx6 correct is_soc_rev usage
is_soc_rev should return a bool value, so use "==", but not "-", change (is_soc_rev(CHIP_REV_1_0) > 0) to (soc_rev() > CHIP_REV_1_0). This patch also add space between "&" for cpu_type(rev) macro. Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'arch/arm/include/asm/arch-mx6')
-rw-r--r--arch/arm/include/asm/arch-mx6/sys_proto.h4
1 files changed, 2 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 c5832912b4..9756708452 100644
--- a/arch/arm/include/asm/arch-mx6/sys_proto.h
+++ b/arch/arm/include/asm/arch-mx6/sys_proto.h
@@ -12,7 +12,7 @@
#include "../arch-imx/cpu.h"
#define soc_rev() (get_cpu_rev() & 0xFF)
-#define is_soc_rev(rev) (soc_rev() - rev)
+#define is_soc_rev(rev) (soc_rev() == rev)
u32 get_nr_cpus(void);
u32 get_cpu_rev(void);
@@ -20,7 +20,7 @@ u32 get_cpu_speed_grade_hz(void);
u32 get_cpu_temp_grade(int *minc, int *maxc);
/* returns MXC_CPU_ value */
-#define cpu_type(rev) (((rev) >> 12)&0xff)
+#define cpu_type(rev) (((rev) >> 12) & 0xff)
/* both macros return/take MXC_CPU_ constants */
#define get_cpu_type() (cpu_type(get_cpu_rev()))
OpenPOWER on IntegriCloud