diff options
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);  |