diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-21 14:07:01 +0100 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-10-21 14:12:23 +0100 |
commit | 25a2305033e2f29cd178ecaee1fbb025db84601f (patch) | |
tree | 6de9e752a4ac7191baaacc205529bec707206b18 /arch/arm/plat-s3c | |
parent | 21b4a62fe8bac04d70a0bc10b12fd4b2799c9397 (diff) |
[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>
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r-- | arch/arm/plat-s3c/time.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/plat-s3c/time.c b/arch/arm/plat-s3c/time.c index d35e149f4eb..a581ff7ba66 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; } |