Skip to contentSkip to conversation

plat-nomadik: handle clocking properly

PATCH New Linus Walleij 2 participants 2 messages Jan 11, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/3 plat-nomadik: handle clocking properly

From: Linus Walleij <[email protected]>

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.

Cc Alessandro Rubini <[email protected]>
---
 arch/arm/plat-nomadik/timer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/plat-nomadik/timer.c +2 -2
index 46f50f2..954a862 100644
@@ -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
Signature · 1 line
1.7.8