From: Leonid Yegoshin <Leonid.Yegoshin@xxxxxxxxxx> 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 <Leonid.Yegoshin@xxxxxxxxxx> Signed-off-by: Steven J. Hill <Steven.Hill@xxxxxxxxxx> --- arch/mips/include/asm/time.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/mips/include/asm/time.h b/arch/mips/include/asm/time.h index 2d7b9df..6ff85e6 100644 --- a/arch/mips/include/asm/time.h +++ b/arch/mips/include/asm/time.h @@ -18,6 +18,7 @@ #include <linux/spinlock.h> #include <linux/clockchips.h> #include <linux/clocksource.h> +#include <asm/gic.h> extern spinlock_t rtc_lock; @@ -75,11 +76,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