public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/8] imx: mx6 cast return type of is_soc_rev to int
@ 2015-06-10  8:06 Peng Fan
  2015-06-10  8:06 ` [U-Boot] [PATCH 2/8] imx: mx6: Add MX6DQP CPU rev type Peng Fan
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Peng Fan @ 2015-06-10  8:06 UTC (permalink / raw)
  To: u-boot

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.Fan@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

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

end of thread, other threads:[~2015-06-10 10:18 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10  8:06 [U-Boot] [PATCH 1/8] imx: mx6 cast return type of is_soc_rev to int Peng Fan
2015-06-10  8:06 ` [U-Boot] [PATCH 2/8] imx: mx6: Add MX6DQP CPU rev type Peng Fan
2015-06-10  9:19   ` Stefano Babic
2015-06-10 10:01     ` Peng Fan
2015-06-10 10:09       ` Stefano Babic
2015-06-10  8:06 ` [U-Boot] [PATCH 3/8] imx: mx6: L2cache: Enable the double line fill for i.MX6DQP Peng Fan
2015-06-10  8:06 ` [U-Boot] [PATCH 4/8] imx: mx6: ccm: Change the clock settings for i.MX6QP Peng Fan
2015-06-10  9:23   ` Stefano Babic
2015-06-10 10:03     ` Peng Fan
2015-06-10  8:06 ` [U-Boot] [PATCH 5/8] imx: mx6: hab : Remove the cache issue workaroud in hab " Peng Fan
2015-06-10  8:06 ` [U-Boot] [PATCH 6/8] imx: mx6qp: Enable PRG clock for IPU Peng Fan
2015-06-10  9:24   ` Stefano Babic
2015-06-10 10:04     ` Peng Fan
2015-06-10  8:06 ` [U-Boot] [PATCH 7/8] imx: mx6qpsabreauto: Add MX6QP SABREAUTO CPU3 board support Peng Fan
2015-06-10  9:40   ` Stefano Babic
2015-06-10 10:17     ` Peng Fan
2015-06-10  8:06 ` [U-Boot] [PATCH 8/8] imx: mx6qp: Adjust AQos settings for peripherals Peng Fan
2015-06-10  9:44   ` Stefano Babic
2015-06-10 10:18     ` Peng Fan
2015-06-10  8:20 ` [U-Boot] [PATCH 1/8] imx: mx6 cast return type of is_soc_rev to int Stefano Babic
2015-06-10  8:42   ` Peng Fan

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