Skip to content

Commit

Permalink
arm/tegra: clk_get should not be fatal
Browse files Browse the repository at this point in the history
The timer and rtc-timer clocks aren't gated by default, so there is no reason
to crash the system if the dummy enable call failed.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Peter De Schrijver authored and Olof Johansson committed Dec 18, 2011
1 parent d695cfa commit 2d85b5d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions arch/arm/mach-tegra/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,20 @@ static void __init tegra_init_timer(void)
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\n");
else
clk_enable(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);
Expand Down

0 comments on commit 2d85b5d

Please sign in to comment.