]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
imx-common: timer: add i.MX6UL support
authorPeng Fan <Peng.Fan@freescale.com>
Mon, 20 Jul 2015 11:28:25 +0000 (19:28 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 12:39:17 +0000 (14:39 +0200)
Add i.MX6UL GPT timer support.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
arch/arm/imx-common/timer.c

index 5f28f9ee0847237d2565287d0876feda53a97906..b954a20d7f7b24d186328e769aa8ca7bb26eeb5e 100644 (file)
@@ -45,7 +45,8 @@ static inline int gpt_has_clk_source_osc(void)
 #if defined(CONFIG_SOC_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_MX6SOLO) || is_cpu_type(MXC_CPU_MX6SX) ||
+            is_cpu_type(MXC_CPU_MX6UL))
                return 1;
 
        return 0;
@@ -112,10 +113,11 @@ 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_MX6SX) ||
+                   is_cpu_type(MXC_CPU_MX6UL)) {
                        i |= GPTCR_24MEN;
 
                        /* Produce 3Mhz clock */