linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] plat-nomadik: MTU timer
@ 2010-09-02  7:30 Jonas Aaberg
  2010-09-02  7:30 ` [PATCH 2/3] plat-nomadik: Added suspend/resume support for " Jonas Aaberg
  0 siblings, 1 reply; 12+ messages in thread
From: Jonas Aaberg @ 2010-09-02  7:30 UTC (permalink / raw)
  To: linux-arm-kernel

timer0 to 3 are all on mtu block 0, so don't calculate the clock event
rate based upon mtu block 1's clock speed.

Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
---
 arch/arm/plat-nomadik/timer.c |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/arch/arm/plat-nomadik/timer.c b/arch/arm/plat-nomadik/timer.c
index ea3ca86..d673888 100644
--- a/arch/arm/plat-nomadik/timer.c
+++ b/arch/arm/plat-nomadik/timer.c
@@ -131,17 +131,12 @@ void __init nmdk_timer_init(void)
 {
 	unsigned long rate;
 	struct clk *clk0;
-	struct clk *clk1;
 	u32 cr;
 
 	clk0 = clk_get_sys("mtu0", NULL);
 	BUG_ON(IS_ERR(clk0));
 
-	clk1 = clk_get_sys("mtu1", NULL);
-	BUG_ON(IS_ERR(clk1));
-
 	clk_enable(clk0);
-	clk_enable(clk1);
 
 	/*
 	 * Tick rate is 2.4MHz for Nomadik and 110MHz for ux500:
@@ -170,15 +165,8 @@ void __init nmdk_timer_init(void)
 		pr_err("timer: failed to initialize clock source %s\n",
 		       nmdk_clksrc.name);
 
-	/* Timer 1 is used for events, fix according to rate */
-	cr = MTU_CRn_32BITS;
-	rate = clk_get_rate(clk1);
-	if (rate > 16 << 20) {
-		rate /= 16;
-		cr |= MTU_CRn_PRESCALE_16;
-	} else {
-		cr |= MTU_CRn_PRESCALE_1;
-	}
+	/* Timer 1 is used for events */
+
 	clockevents_calc_mult_shift(&nmdk_clkevt, rate, MTU_MIN_RANGE);
 
 	writel(cr | MTU_CRn_ONESHOT, mtu_base + MTU_CR(1)); /* off, currently */
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-09-06  7:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02  7:30 [PATCH 1/3] plat-nomadik: MTU timer Jonas Aaberg
2010-09-02  7:30 ` [PATCH 2/3] plat-nomadik: Added suspend/resume support for " Jonas Aaberg
2010-09-02  7:30   ` [PATCH 3/3] mach-ux500: Added nomadik mtu timer suspend/resume hooks Jonas Aaberg
2010-09-02 16:07     ` Russell King - ARM Linux
2010-09-06  7:27       ` Jonas Aaberg
2010-09-02 16:04   ` [PATCH 2/3] plat-nomadik: Added suspend/resume support for MTU timer Russell King - ARM Linux
2010-09-02 19:30     ` Linus Walleij
2010-09-03 11:49     ` Alessandro Rubini
2010-09-03 17:37       ` Linus Walleij
2010-09-06  7:20         ` Armando Visconti
2010-09-02 19:44   ` Linus Walleij
2010-09-02 19:45   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).