diff options
author | Richard Zhao <richard.zhao@freescale.com> | 2012-05-15 03:34:40 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-16 06:38:51 -0400 |
commit | 1f152b48eaaf4918047e84777b01a6d687f066e9 (patch) | |
tree | e897e6f7e909588c806100738f696db3eef09380 /arch/arm/plat-mxc | |
parent | c040be003f16a1bdd7997cc4ab7fc5fd43acb03b (diff) |
ARM: i.MX: change timer clock from ipg to perclk
Contrary to the ipg clock the perclk rate is not changed or
gated in low power mode, so we choose perclk for gpt.
With the port to the common clock framework as a side effect
the timer used the rate returned from the peripheral clock
but the hardware was still programmed to use the ipg clock,
so this patch only changes the hardware to really use the
clock it already assumed.
Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc')
-rw-r--r-- | arch/arm/plat-mxc/time.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/plat-mxc/time.c b/arch/arm/plat-mxc/time.c index 99f958ca6cb8..d865f7960baf 100644 --- a/arch/arm/plat-mxc/time.c +++ b/arch/arm/plat-mxc/time.c | |||
@@ -58,6 +58,7 @@ | |||
58 | /* MX31, MX35, MX25, MX5 */ | 58 | /* MX31, MX35, MX25, MX5 */ |
59 | #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ | 59 | #define V2_TCTL_WAITEN (1 << 3) /* Wait enable mode */ |
60 | #define V2_TCTL_CLK_IPG (1 << 6) | 60 | #define V2_TCTL_CLK_IPG (1 << 6) |
61 | #define V2_TCTL_CLK_PER (2 << 6) | ||
61 | #define V2_TCTL_FRR (1 << 9) | 62 | #define V2_TCTL_FRR (1 << 9) |
62 | #define V2_IR 0x0c | 63 | #define V2_IR 0x0c |
63 | #define V2_TSTAT 0x08 | 64 | #define V2_TSTAT 0x08 |
@@ -309,7 +310,7 @@ void __init mxc_timer_init(struct clk *timer_clk, void __iomem *base, int irq) | |||
309 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ | 310 | __raw_writel(0, timer_base + MXC_TPRER); /* see datasheet note */ |
310 | 311 | ||
311 | if (timer_is_v2()) | 312 | if (timer_is_v2()) |
312 | tctl_val = V2_TCTL_CLK_IPG | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; | 313 | tctl_val = V2_TCTL_CLK_PER | V2_TCTL_FRR | V2_TCTL_WAITEN | MXC_TCTL_TEN; |
313 | else | 314 | else |
314 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; | 315 | tctl_val = MX1_2_TCTL_FRR | MX1_2_TCTL_CLK_PCLK1 | MXC_TCTL_TEN; |
315 | 316 | ||