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 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 = { | |||
182 | static void __init tegra_init_timer(void) | 182 | static void __init tegra_init_timer(void) |
183 | { | 183 | { |
184 | struct clk *clk; | 184 | struct clk *clk; |
185 | unsigned long rate = clk_measure_input_freq(); | 185 | unsigned long rate; |
186 | int ret; | 186 | int ret; |
187 | 187 | ||
188 | clk = clk_get_sys("timer", NULL); | 188 | clk = clk_get_sys("timer", NULL); |
189 | BUG_ON(IS_ERR(clk)); | 189 | if (IS_ERR(clk)) { |
190 | clk_enable(clk); | 190 | pr_warn("Unable to get timer clock." |
191 | " Assuming 12Mhz input clock.\n"); | ||
192 | rate = 12000000; | ||
193 | } else { | ||
194 | clk_enable(clk); | ||
195 | rate = clk_get_rate(clk); | ||
196 | } | ||
191 | 197 | ||
192 | /* | 198 | /* |
193 | * rtc registers are used by read_persistent_clock, keep the rtc clock | 199 | * rtc registers are used by read_persistent_clock, keep the rtc clock |
194 | * enabled | 200 | * enabled |
195 | */ | 201 | */ |
196 | clk = clk_get_sys("rtc-tegra", NULL); | 202 | clk = clk_get_sys("rtc-tegra", NULL); |
197 | BUG_ON(IS_ERR(clk)); | 203 | if (IS_ERR(clk)) |
198 | clk_enable(clk); | 204 | pr_warn("Unable to get rtc-tegra clock\n"); |
205 | else | ||
206 | clk_enable(clk); | ||
199 | 207 | ||
200 | #ifdef CONFIG_HAVE_ARM_TWD | 208 | #ifdef CONFIG_HAVE_ARM_TWD |
201 | twd_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x600); | 209 | twd_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x600); |