diff options
author | Peng Fan <van.freenix@gmail.com> | 2016-05-23 18:35:56 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-05-24 14:59:56 +0200 |
commit | 27cd0da41e7c2f10d754efba0d178a5715d12bc2 (patch) | |
tree | 360773817cd643aff1da3e339542f53f9a908249 /arch/arm/imx-common/timer.c | |
parent | 003f0c7eb2f257eddc5173def53fcb5a137045c2 (diff) | |
download | u-boot-27cd0da41e7c2f10d754efba0d178a5715d12bc2.tar.gz |
imx-common: use simpler runtime cpu dection macros
Use simpler runtime cpu dection macros.
Signed-off-by: Peng Fan <van.freenix@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: "Benoît Thébaudeau" <benoit.thebaudeau.dev@gmail.com>
Diffstat (limited to 'arch/arm/imx-common/timer.c')
-rw-r--r-- | arch/arm/imx-common/timer.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/arm/imx-common/timer.c b/arch/arm/imx-common/timer.c index 92c7218e69..bea17f2c6b 100644 --- a/arch/arm/imx-common/timer.c +++ b/arch/arm/imx-common/timer.c @@ -43,10 +43,8 @@ DECLARE_GLOBAL_DATA_PTR; static inline int gpt_has_clk_source_osc(void) { #if defined(CONFIG_MX6) - if (((is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D)) && - (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_MX6UL)) + if (((is_mx6dq()) && (soc_rev() > CHIP_REV_1_0)) || + is_mx6sdl() || is_mx6sx() || is_mx6ul()) return 1; return 0; @@ -86,10 +84,7 @@ int timer_init(void) i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN; /* For DL/S, SX, UL, set 24Mhz OSC Enable bit and prescaler */ - if (is_cpu_type(MXC_CPU_MX6DL) || - is_cpu_type(MXC_CPU_MX6SOLO) || - is_cpu_type(MXC_CPU_MX6SX) || - is_cpu_type(MXC_CPU_MX6UL)) { + if (is_mx6sdl() || is_mx6sx() || is_mx6ul()) { i |= GPTCR_24MEN; /* Produce 3Mhz clock */ |