Skip to content

Commit

Permalink
ARM: plat-nomadik: handle clocking properly
Browse files Browse the repository at this point in the history
clk_prepare() was missing from the Nomadik MTU driver, also handle
errors on prepare and enable in the simplest way possible, by
bugging out - we cannot start the system without time anyway.

Acked-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Linus Walleij committed Jan 30, 2012
1 parent b957662 commit d3e8b75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-nomadik/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ void __init nmdk_timer_init(void __iomem *base)
mtu_base = base;
clk0 = clk_get_sys("mtu0", NULL);
BUG_ON(IS_ERR(clk0));

clk_enable(clk0);
BUG_ON(clk_prepare(clk0) < 0);
BUG_ON(clk_enable(clk0) < 0);

/*
* Tick rate is 2.4MHz for Nomadik and 2.4Mhz, 100MHz or 133 MHz
Expand Down

0 comments on commit d3e8b75

Please sign in to comment.