Skip to content
Snippets Groups Projects
Commit b65d9d86 authored by Peng Fan's avatar Peng Fan Committed by Stefano Babic
Browse files

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: default avatarPeng Fan <Peng.Fan@freescale.com>
parent fc6e4425
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ static inline int gpt_has_clk_source_osc(void) ...@@ -44,7 +44,7 @@ static inline int gpt_has_clk_source_osc(void)
{ {
#if defined(CONFIG_MX6) #if defined(CONFIG_MX6)
if (((is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) && if (((is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) &&
(is_soc_rev(CHIP_REV_1_0) > 0)) || is_cpu_type(MXC_CPU_MX6DL) || (soc_rev() > CHIP_REV_1_0)) || is_cpu_type(MXC_CPU_MX6DL) ||
is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX)) is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX))
return 1; return 1;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#include "../arch-imx/cpu.h" #include "../arch-imx/cpu.h"
#define soc_rev() (get_cpu_rev() & 0xFF) #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_nr_cpus(void);
u32 get_cpu_rev(void); u32 get_cpu_rev(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment