Thread (2 messages) 2 messages, 2 authors, 2013-09-11

[PATCH] MIPS: GIC: Select R4K counter as fallback.

From: Steven J. Hill <hidden>
Date: 2013-09-11 18:54:10
Subsystem: mips, the rest · Maintainers: Thomas Bogendoerfer, Linus Torvalds

From: Leonid Yegoshin <redacted>

If CONFIG_CSRC_GIC is selected and the GIC is not found during
boot, then fallback to the R4K counter gracefully.

Signed-off-by: Leonid Yegoshin <redacted>
Signed-off-by: Steven J. Hill <redacted>
---
 arch/mips/include/asm/time.h |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h
index 2d7b9df..1194c31 100644
--- a/arch/mips/include/asm/time.h
+++ b/arch/mips/include/asm/time.h
@@ -75,11 +75,13 @@ extern int init_r4k_clocksource(void);
 
 static inline int init_mips_clocksource(void)
 {
-#if defined(CONFIG_CSRC_R4K) && !defined(CONFIG_CSRC_GIC)
-	return init_r4k_clocksource();
-#else
-	return 0;
+#ifdef CONFIG_CSRC_R4K
+#ifdef CONFIG_CSRC_GIC
+	if (!gic_present)
 #endif
+		return init_r4k_clocksource();
+#endif
+	return 0;
 }
 
 static inline void clockevent_set_clock(struct clock_event_device *cd,
-- 
1.7.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help