diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-21 09:07:01 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-12-15 16:54:16 -0500 |
commit | c652d2ddb97ccdc4774e149ef998928263fd8886 (patch) | |
tree | 4233aa3f41c5e6fce27b07d59d2525553fc56554 /arch/arm/plat-s3c | |
parent | 4b31d8b2256db3ed825a63603f223f84d927ca39 (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 d35e149f4ebf..a581ff7ba664 100644 --- a/arch/arm/plat-s3c/time.c +++ b/arch/arm/plat-s3c/time.c | |||
@@ -44,6 +44,10 @@ | |||
44 | static unsigned long timer_startval; | 44 | static unsigned long timer_startval; |
45 | static unsigned long timer_usec_ticks; | 45 | static unsigned long timer_usec_ticks; |
46 | 46 | ||
47 | #ifndef TICK_MAX | ||
48 | #define TICK_MAX (0xffff) | ||
49 | #endif | ||
50 | |||
47 | #define TIMER_USEC_SHIFT 16 | 51 | #define TIMER_USEC_SHIFT 16 |
48 | 52 | ||
49 | /* we use the shifted arithmetic to work out the ratio of timer ticks | 53 | /* we use the shifted arithmetic to work out the ratio of timer ticks |
@@ -156,7 +160,7 @@ static void s3c2410_timer_setup (void) | |||
156 | unsigned long tcfg1; | 160 | unsigned long tcfg1; |
157 | unsigned long tcfg0; | 161 | unsigned long tcfg0; |
158 | 162 | ||
159 | tcnt = 0xffff; /* default value for tcnt */ | 163 | tcnt = TICK_MAX; /* default value for tcnt */ |
160 | 164 | ||
161 | /* read the current timer configuration bits */ | 165 | /* read the current timer configuration bits */ |
162 | 166 | ||
@@ -217,7 +221,7 @@ static void s3c2410_timer_setup (void) | |||
217 | tcon, tcnt, tcfg0, tcfg1, timer_usec_ticks); | 221 | tcon, tcnt, tcfg0, tcfg1, timer_usec_ticks); |
218 | 222 | ||
219 | /* check to see if timer is within 16bit range... */ | 223 | /* check to see if timer is within 16bit range... */ |
220 | if (tcnt > 0xffff) { | 224 | if (tcnt > TICK_MAX) { |
221 | panic("setup_timer: HZ is too small, cannot configure timer!"); | 225 | panic("setup_timer: HZ is too small, cannot configure timer!"); |
222 | return; | 226 | return; |
223 | } | 227 | } |