diff options
Diffstat (limited to 'arch/arm/mach-omap2/timer.c')
| -rw-r--r-- | arch/arm/mach-omap2/timer.c | 15 | 
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 2c5a45d8ca8..a9c9b3dbc82 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -36,17 +36,20 @@  #include <linux/clocksource.h>  #include <linux/clockchips.h>  #include <linux/slab.h> +#include <linux/of.h>  #include <asm/mach/time.h> -#include <plat/dmtimer.h>  #include <asm/smp_twd.h>  #include <asm/sched_clock.h> +  #include <asm/arch_timer.h> -#include "common.h"  #include <plat/omap_hwmod.h>  #include <plat/omap_device.h> +#include <plat/dmtimer.h>  #include <plat/omap-pm.h> +#include "soc.h" +#include "common.h"  #include "powerdomain.h"  /* Parent clocks, eventually these will come from the clock framework */ @@ -464,8 +467,7 @@ OMAP_SYS_TIMER(3_am33xx)  #ifdef CONFIG_ARCH_OMAP4  #ifdef CONFIG_LOCAL_TIMERS  static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, -			      OMAP44XX_LOCAL_TWD_BASE, -			      OMAP44XX_IRQ_LOCALTIMER); +			      OMAP44XX_LOCAL_TWD_BASE, 29 + OMAP_INTC_START);  #endif  static void __init omap4_timer_init(void) @@ -477,6 +479,11 @@ static void __init omap4_timer_init(void)  	if (omap_rev() != OMAP4430_REV_ES1_0) {  		int err; +		if (of_have_populated_dt()) { +			twd_local_timer_of_register(); +			return; +		} +  		err = twd_local_timer_register(&twd_local_timer);  		if (err)  			pr_err("twd_local_timer_register failed %d\n", err);  |