summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/timer.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-12-27 22:45:51 +0000
committerArnd Bergmann <arnd@arndb.de>2011-12-27 22:45:51 +0000
commite5570bbc9c06634cfac94e06ac1432b53d8595e5 (patch)
treebfaf6b5ddedaa03d31400b25b25cfaa3bd0c9107 /arch/arm/mach-tegra/timer.c
parent5611cc4572e889b62a7b4c72a413536bf6a9c416 (diff)
parent6cc04a4420391c3f034afe8ea6e28d75912a70a3 (diff)
downloadlinux-next-e5570bbc9c06634cfac94e06ac1432b53d8595e5.tar.gz
Merge branch 'for-3.3/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/tegra into tegra/soc
Diffstat (limited to 'arch/arm/mach-tegra/timer.c')
-rw-r--r--arch/arm/mach-tegra/timer.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c
index e2272d263a83..6366654b54c5 100644
--- a/arch/arm/mach-tegra/timer.c
+++ b/arch/arm/mach-tegra/timer.c
@@ -182,20 +182,28 @@ static struct irqaction tegra_timer_irq = {
static void __init tegra_init_timer(void)
{
struct clk *clk;
- unsigned long rate = clk_measure_input_freq();
+ unsigned long rate;
int ret;
clk = clk_get_sys("timer", NULL);
- BUG_ON(IS_ERR(clk));
- clk_enable(clk);
+ if (IS_ERR(clk)) {
+ pr_warn("Unable to get timer clock."
+ " Assuming 12Mhz input clock.\n");
+ rate = 12000000;
+ } else {
+ clk_enable(clk);
+ rate = clk_get_rate(clk);
+ }
/*
* rtc registers are used by read_persistent_clock, keep the rtc clock
* enabled
*/
clk = clk_get_sys("rtc-tegra", NULL);
- BUG_ON(IS_ERR(clk));
- clk_enable(clk);
+ if (IS_ERR(clk))
+ pr_warn("Unable to get rtc-tegra clock\n");
+ else
+ clk_enable(clk);
#ifdef CONFIG_HAVE_ARM_TWD
twd_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x600);