is_soc_rev should be casted to signed int, otherwise
may incur errors when detecting cpu types, since we use
such pieces of code:
"
if (is_soc_rev(CHIP_REV_1_0) > 0) ......
if (is_soc_rev(CHIP_REV_2_0) >= 0) ......
"

Signed-off-by: Peng Fan <peng....@freescale.com>
---
 arch/arm/include/asm/arch-mx6/sys_proto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/arch-mx6/sys_proto.h 
b/arch/arm/include/asm/arch-mx6/sys_proto.h
index c583291..9c827c9 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)        (int)(soc_rev() - rev)
 
 u32 get_nr_cpus(void);
 u32 get_cpu_rev(void);
-- 
1.8.4


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to