summaryrefslogtreecommitdiff
path: root/arch/arm/imx-common/timer.c
diff options
context:
space:
mode:
authorYe.Li <B37916@freescale.com>2015-05-04 17:15:29 +0800
committerYe.Li <B37916@freescale.com>2015-05-04 22:27:30 +0800
commit25a0ba04a051e5b3c03cc628c849551aa803409d (patch)
tree0661c0faae359910b28aedea7d7b658e9cdb0f15 /arch/arm/imx-common/timer.c
parentcab4e299b24cb2ae3a429d7d52d9b4d9f9bfd163 (diff)
downloadu-boot-imx-25a0ba04a051e5b3c03cc628c849551aa803409d.zip
u-boot-imx-25a0ba04a051e5b3c03cc628c849551aa803409d.tar.gz
u-boot-imx-25a0ba04a051e5b3c03cc628c849551aa803409d.tar.bz2
MLK-10808-4 imx: Move system counter driver to imx-common
Since the system counter driver will also be used by mx6ul, move this timer driver to imx-common and rename it as syscounter.c For mx6ul and mx7, configurations are used for choose the GPT timer or system counter timer (default). GPT timer: CONFIG_GPT_TIMER System counter timer: CONFIG_SYSCOUNTER_TIMER Signed-off-by: Ye.Li <B37916@freescale.com>
Diffstat (limited to 'arch/arm/imx-common/timer.c')
-rw-r--r--arch/arm/imx-common/timer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/imx-common/timer.c b/arch/arm/imx-common/timer.c
index c9eb530..6fea6fe 100644
--- a/arch/arm/imx-common/timer.c
+++ b/arch/arm/imx-common/timer.c
@@ -45,7 +45,8 @@ 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)) &&
(is_soc_rev(CHIP_REV_1_0) > 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 0;
@@ -109,11 +110,12 @@ int timer_init(void)
if (gpt_has_clk_source_osc()) {
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) ||
is_cpu_type(MXC_CPU_MX6SOLO) ||
is_cpu_type(MXC_CPU_MX6SX) ||
- is_cpu_type(MXC_CPU_MX7D)) {
+ is_cpu_type(MXC_CPU_MX7D) ||
+ is_cpu_type(MXC_CPU_MX6UL)) {
i |= GPTCR_24MEN;
/* Produce 3Mhz clock */