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

imx-common: timer: add i.MX6UL support


Add i.MX6UL GPT timer support.

Signed-off-by: default avatarPeng Fan <Peng.Fan@freescale.com>
parent d73d5aee
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,8 @@ static inline int gpt_has_clk_source_osc(void) ...@@ -45,7 +45,8 @@ 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)) &&
(soc_rev() > CHIP_REV_1_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) ||
is_cpu_type(MXC_CPU_MX6UL))
return 1; return 1;
return 0; return 0;
...@@ -103,10 +104,11 @@ int timer_init(void) ...@@ -103,10 +104,11 @@ int timer_init(void)
if (gpt_has_clk_source_osc()) { if (gpt_has_clk_source_osc()) {
i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN; i |= GPTCR_CLKSOURCE_OSC | GPTCR_TEN;
/* For DL/S, SX, set 24Mhz OSC Enable bit and prescaler */ /* For DL/S, SX, UL, set 24Mhz OSC Enable bit and prescaler */
if (is_cpu_type(MXC_CPU_MX6DL) || if (is_cpu_type(MXC_CPU_MX6DL) ||
is_cpu_type(MXC_CPU_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SOLO) ||
is_cpu_type(MXC_CPU_MX6SX)) { is_cpu_type(MXC_CPU_MX6SX) ||
is_cpu_type(MXC_CPU_MX6UL)) {
i |= GPTCR_24MEN; i |= GPTCR_24MEN;
/* Produce 3Mhz clock */ /* Produce 3Mhz clock */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment