summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/timer.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-01-06 23:09:14 +0000
committerArnd Bergmann <arnd@arndb.de>2012-01-06 23:09:14 +0000
commite067096c8d57d191f29d734cd5692695c95cc36e (patch)
treee1c200404c3ed3730d04837113d59ca898eb483a /arch/arm/mach-tegra/timer.c
parent1fc3eb81100c3f3cd44e706e54390151b0f1ce74 (diff)
parente5570bbc9c06634cfac94e06ac1432b53d8595e5 (diff)
downloadtalos-obmc-linux-e067096c8d57d191f29d734cd5692695c95cc36e.tar.gz
talos-obmc-linux-e067096c8d57d191f29d734cd5692695c95cc36e.zip
Merge branch 'tegra/soc' into next/boards
Conflicts: arch/arm/mach-tegra/board-harmony-pcie.c To fix an internal merge conflict between the tegra/soc and tegra/boards branches. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
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);
OpenPOWER on IntegriCloud