diff mbox

arm/twd: use smp_twd clock even with DT

Message ID 1396813085-15363-1-git-send-email-gilles.chanteperdrix@xenomai.org (mailing list archive)
State New, archived
Headers show

Commit Message

Gilles Chanteperdrix April 6, 2014, 7:38 p.m. UTC
Booting Linux 3.14 on Pandaboard currently gets the following
message displayed:

smp_twd: clock not found -2

Whereas an "smp_twd" clock exists for omap4. The following change
avoids this.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
---
 arch/arm/kernel/smp_twd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Russell King - ARM Linux April 7, 2014, 9:03 a.m. UTC | #1
On Sun, Apr 06, 2014 at 09:38:05PM +0200, Gilles Chanteperdrix wrote:
> Booting Linux 3.14 on Pandaboard currently gets the following
> message displayed:
> 
> smp_twd: clock not found -2
> 
> Whereas an "smp_twd" clock exists for omap4. The following change
> avoids this.

NAK.  The TWD has required this clock for 15 months, and all OMAP has
to do is to supply the clock in its DT description.  Why is OMAP not
supplying this clock?
diff mbox

Patch

diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index 6591e26..67754af 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -246,7 +246,7 @@  static void twd_get_clock(struct device_node *np)
 
 	if (np)
 		twd_clk = of_clk_get(np, 0);
-	else
+	if (np == NULL || IS_ERR(twd_clk))
 		twd_clk = clk_get_sys("smp_twd", NULL);
 
 	if (IS_ERR(twd_clk)) {