diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-21 14:07:01 +0100 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-12-15 21:54:16 +0000 |
commit | c652d2ddb97ccdc4774e149ef998928263fd8886 (patch) | |
tree | 4233aa3f41c5e6fce27b07d59d2525553fc56554 | |
parent | 4b31d8b2256db3ed825a63603f223f84d927ca39 (diff) | |
download | kernel_samsung_smdk4412-c652d2ddb97ccdc4774e149ef998928263fd8886.zip kernel_samsung_smdk4412-c652d2ddb97ccdc4774e149ef998928263fd8886.tar.gz kernel_samsung_smdk4412-c652d2ddb97ccdc4774e149ef998928263fd8886.tar.bz2 |
[ARM] S3C: Add TICK_MAX for timer code
Add TICK_MAX definition for the timer code
as the S3C64XX series have 32bit capable
PWM timers.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
-rw-r--r-- | arch/arm/mach-s3c6400/include/mach/tick.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-s3c/time.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-s3c6400/include/mach/tick.h b/arch/arm/mach-s3c6400/include/mach/tick.h index 95e5ec9..d9c0dc7 100644 --- a/arch/arm/mach-s3c6400/include/mach/tick.h +++ b/arch/arm/mach-s3c6400/include/mach/tick.h @@ -24,4 +24,6 @@ static inline u32 s3c24xx_ostimer_pending(void) return pend & 1 << (IRQ_TIMER4_VIC - S3C64XX_IRQ_VIC0(0)); } +#define TICK_MAX (0xffffffff) + #endif /* __ASM_ARCH_6400_TICK_H */ diff --git a/arch/arm/plat-s3c/time.c b/arch/arm/plat-s3c/time.c index d35e149..a581ff7 100644 --- a/arch/arm/plat-s3c/time.c +++ b/arch/arm/plat-s3c/time.c @@ -44,6 +44,10 @@ static unsigned long timer_startval; static unsigned long timer_usec_ticks; +#ifndef TICK_MAX +#define TICK_MAX (0xffff) +#endif + #define TIMER_USEC_SHIFT 16 /* we use the shifted arithmetic to work out the ratio of timer ticks @@ -156,7 +160,7 @@ static void s3c2410_timer_setup (void) unsigned long tcfg1; unsigned long tcfg0; - tcnt = 0xffff; /* default value for tcnt */ + tcnt = TICK_MAX; /* default value for tcnt */ /* read the current timer configuration bits */ @@ -217,7 +221,7 @@ static void s3c2410_timer_setup (void) tcon, tcnt, tcfg0, tcfg1, timer_usec_ticks); /* check to see if timer is within 16bit range... */ - if (tcnt > 0xffff) { + if (tcnt > TICK_MAX) { panic("setup_timer: HZ is too small, cannot configure timer!"); return; } |