From: Colin Cross <ccross@android.com>
To: linux-tegra@vger.kernel.org
Cc: konkers@android.com, olof@lixom.net,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, mike@compulab.co.il,
Colin Cross <ccross@android.com>,
Russell King <linux@arm.linux.org.uk>
Subject: [PATCH 5/7] ARM: tegra: timer: Enable timer and rtc clocks
Date: Mon, 21 Feb 2011 18:39:50 -0800 [thread overview]
Message-ID: <1298342392-21236-6-git-send-email-ccross@android.com> (raw)
In-Reply-To: <1298342392-21236-1-git-send-email-ccross@android.com>
Enable the timer and rtc clocks to prevent them being
turned off by the bootloader clock disabling code.
Signed-off-by: Colin Cross <ccross@android.com>
---
arch/arm/mach-tegra/timer.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
index ffa6a68..31b4f56 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -18,6 +18,7 @@
*/
#include <linux/init.h>
+#include <linux/err.h>
#include <linux/sched.h>
#include <linux/time.h>
#include <linux/interrupt.h>
@@ -193,9 +194,20 @@ static struct irqaction tegra_timer_irq = {
static void __init tegra_init_timer(void)
{
+ struct clk *clk;
unsigned long rate = clk_measure_input_freq();
int ret;
+ clk = clk_get_sys("timer", NULL);
+ BUG_ON(IS_ERR(clk));
+ clk_enable(clk);
+ clk_put(clk);
+
+ clk = clk_get_sys("rtc-tegra", NULL);
+ BUG_ON(IS_ERR(clk));
+ clk_enable(clk);
+ clk_put(clk);
+
#ifdef CONFIG_HAVE_ARM_TWD
twd_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x600);
#endif
@@ -239,8 +251,6 @@ static void __init tegra_init_timer(void)
tegra_clockevent.cpumask = cpu_all_mask;
tegra_clockevent.irq = tegra_timer_irq.irq;
clockevents_register_device(&tegra_clockevent);
-
- return;
}
struct sys_timer tegra_timer = {
--
1.7.3.1
next prev parent reply other threads:[~2011-02-22 2:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-22 2:39 [PATCH 0/7] Second batch of Tegra clock updates for 2.6.39 Colin Cross
2011-02-22 2:39 ` [PATCH 1/7] ARM: tegra: clock: Refcount periph clock enables Colin Cross
[not found] ` <1298342392-21236-2-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22 5:25 ` Olof Johansson
2011-02-22 2:39 ` [PATCH 2/7] ARM: tegra: clock: Round rate before setting rate Colin Cross
[not found] ` <1298342392-21236-3-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22 5:26 ` Olof Johansson
2011-02-22 2:39 ` [PATCH 3/7] ARM: tegra: clock: Check for clk_num == 0 Colin Cross
2011-02-22 5:29 ` Olof Johansson
2011-02-22 2:39 ` [PATCH 4/7] ARM: tegra: Move tegra_common_init to tegra_init_early Colin Cross
2011-02-22 5:30 ` Olof Johansson
2011-02-22 2:39 ` Colin Cross [this message]
[not found] ` <1298342392-21236-6-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22 5:32 ` [PATCH 5/7] ARM: tegra: timer: Enable timer and rtc clocks Olof Johansson
[not found] ` <AANLkTim=TZaqZFSJwOAN2gntvu=fiHVPQVn12=WyF9Wi-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 8:00 ` Colin Cross
[not found] ` <AANLkTi=pJw7oTUY2jmaSB=chds0fXFaA3+jrT=y8Jpzv-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 15:28 ` Olof Johansson
2011-02-22 20:56 ` Russell King - ARM Linux
[not found] ` <20110222205634.GF29559-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2011-02-23 17:39 ` Colin Cross
2011-02-22 2:39 ` [PATCH 6/7] ARM: tegra: common: Enable core clocks Colin Cross
[not found] ` <1298342392-21236-7-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22 5:32 ` Olof Johansson
2011-02-22 2:39 ` [PATCH 7/7] ARM: tegra: clock: Disable clocks left on by bootloader Colin Cross
[not found] ` <1298342392-21236-8-git-send-email-ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>
2011-02-22 5:43 ` Olof Johansson
[not found] ` <AANLkTikNSEyjdL0Lchmm-bFxD00omkGLq6Q6Yyjy51Ov-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 8:05 ` Colin Cross
[not found] ` <AANLkTi==wykFCCjamRNh2ngEaubgeLqmZ7Mv9OsH=0cL-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-22 15:30 ` Olof Johansson
2011-02-22 19:38 ` [PATCH 0/7] Second batch of Tegra clock updates for 2.6.39 Colin Cross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298342392-21236-6-git-send-email-ccross@android.com \
--to=ccross@android.com \
--cc=konkers@android.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mike@compulab.co.il \
--cc=olof@lixom.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox