From: Tony Lindgren Date: Sat, 1 Jul 2006 18:56:42 +0000 (+0100) Subject: [ARM] 3676/1: ARM: OMAP: Fix dmtimers and timer32k to compile on OMAP1 X-Git-Tag: MMI-PSA29.97-13-9~48515^2~9 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35912c799722f0c63b8c2c49c7650d4516a5fe8a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [ARM] 3676/1: ARM: OMAP: Fix dmtimers and timer32k to compile on OMAP1 Patch from Tony Lindgren Fixes compilation errors on OMAP1. Patch from Timo Teras. Signed-off-by: Timo Teras Signed-off-by: Juha Yrjola Signed-off-by: Tony Lindgren Signed-off-by: Russell King --- diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 804a53534370..50524436de63 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -260,7 +260,7 @@ __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) for (i = 0; i < dm_timer_count; i++) { u32 l; - l = omap_dm_timer_read_reg(&dm_timers[n], OMAP_TIMER_CTRL_REG); + l = omap_dm_timer_read_reg(&dm_timers[i], OMAP_TIMER_CTRL_REG); if (l & OMAP_TIMER_CTRL_ST) { if (((omap_readl(MOD_CONF_CTRL_1) >> (i * 2)) & 0x03) == 0) inputmask &= ~(1 << 1); diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c index f028e182215a..ea9f3732630b 100644 --- a/arch/arm/plat-omap/timer32k.c +++ b/arch/arm/plat-omap/timer32k.c @@ -51,6 +51,7 @@ #include #include #include +#include struct sys_timer omap_timer; @@ -118,8 +119,6 @@ static inline void omap_32k_timer_stop(void) #elif defined(CONFIG_ARCH_OMAP2) -#include - static struct omap_dm_timer *gptimer; static inline void omap_32k_timer_start(unsigned long load_val) @@ -275,6 +274,7 @@ static __init void omap_init_32k_timer(void) omap_timer.offset = omap_32k_timer_gettimeoffset; omap_32k_last_tick = omap_32k_sync_timer_read(); +#ifdef CONFIG_ARCH_OMAP2 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */ if (cpu_is_omap24xx()) { gptimer = omap_dm_timer_request_specific(1); @@ -286,6 +286,7 @@ static __init void omap_init_32k_timer(void) OMAP_TIMER_INT_CAPTURE | OMAP_TIMER_INT_OVERFLOW | OMAP_TIMER_INT_MATCH); } +#endif omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD); }