diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 | 
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 | 
| commit | 4de3a8e101150feaefa1139611a50ff37467f33e (patch) | |
| tree | daada742542518b02d7db7c5d32e715eaa5f166d /arch/arm/mach-tegra/timer.c | |
| parent | 294064f58953f9964e5945424b09c51800330a83 (diff) | |
| parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) | |
| download | olio-linux-3.10-4de3a8e101150feaefa1139611a50ff37467f33e.tar.xz olio-linux-3.10-4de3a8e101150feaefa1139611a50ff37467f33e.zip  | |
Merge branch 'master' into fixes
Diffstat (limited to 'arch/arm/mach-tegra/timer.c')
| -rw-r--r-- | arch/arm/mach-tegra/timer.c | 18 | 
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index 732c724008b..1d1acda4f3e 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c @@ -165,20 +165,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);  |