Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123849
b: refs/heads/master
c: c652d2d
h: refs/heads/master
i:
  123847: 178bb84
v: v3
  • Loading branch information
Ben Dooks committed Dec 15, 2008
1 parent 915ecff commit e8fd81a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b31d8b2256db3ed825a63603f223f84d927ca39
refs/heads/master: c652d2ddb97ccdc4774e149ef998928263fd8886
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-s3c6400/include/mach/tick.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
8 changes: 6 additions & 2 deletions trunk/arch/arm/plat-s3c/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 */

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit e8fd81a

Please sign in to comment.