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 732c724008b1..1d1acda4f3e0 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 = { | |||
165 | static void __init tegra_init_timer(void) | 165 | static void __init tegra_init_timer(void) |
166 | { | 166 | { |
167 | struct clk *clk; | 167 | struct clk *clk; |
168 | unsigned long rate = clk_measure_input_freq(); | 168 | unsigned long rate; |
169 | int ret; | 169 | int ret; |
170 | 170 | ||
171 | clk = clk_get_sys("timer", NULL); | 171 | clk = clk_get_sys("timer", NULL); |
172 | BUG_ON(IS_ERR(clk)); | 172 | if (IS_ERR(clk)) { |
173 | clk_enable(clk); | 173 | pr_warn("Unable to get timer clock." |
174 | " Assuming 12Mhz input clock.\n"); | ||
175 | rate = 12000000; | ||
176 | } else { | ||
177 | clk_enable(clk); | ||
178 | rate = clk_get_rate(clk); | ||
179 | } | ||
174 | 180 | ||
175 | /* | 181 | /* |
176 | * rtc registers are used by read_persistent_clock, keep the rtc clock | 182 | * rtc registers are used by read_persistent_clock, keep the rtc clock |
177 | * enabled | 183 | * enabled |
178 | */ | 184 | */ |
179 | clk = clk_get_sys("rtc-tegra", NULL); | 185 | clk = clk_get_sys("rtc-tegra", NULL); |
180 | BUG_ON(IS_ERR(clk)); | 186 | if (IS_ERR(clk)) |
181 | clk_enable(clk); | 187 | pr_warn("Unable to get rtc-tegra clock\n"); |
188 | else | ||
189 | clk_enable(clk); | ||
182 | 190 | ||
183 | #ifdef CONFIG_HAVE_ARM_TWD | 191 | #ifdef CONFIG_HAVE_ARM_TWD |
184 | twd_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x600); | 192 | twd_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE + 0x600); |