Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123831
b: refs/heads/master
c: 9bc1aae
h: refs/heads/master
i:
  123829: b835dbd
  123827: e54c095
  123823: 5248f17
v: v3
  • Loading branch information
Ben Dooks committed Dec 15, 2008
1 parent 5ba9774 commit 221ca99
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 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: bcae8aeb320dfe8dde4b3512237a5b76737b0120
refs/heads/master: 9bc1aaeac0118611c30edf84995ebad5adfd6822
15 changes: 15 additions & 0 deletions trunk/arch/arm/mach-s3c2410/include/mach/tick.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* linux/arch/arm/mach-s3c2410/include/mach/tick.h
*
* Copyright 2008 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* S3C2410 - timer tick support
*/

#define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0))

static inline int s3c24xx_ostimer_pending(void)
{
return __raw_readl(S3C2410_SRCPND) & SRCPND_TIMER4;
}
15 changes: 15 additions & 0 deletions trunk/arch/arm/mach-s3c24a0/include/mach/tick.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* linux/arch/arm/mach-s3c24a0/include/mach/tick.h
*
* Copyright 2008 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* S3C24A0 - timer tick support
*/

#define SUBSRC_TIMER4 (1 << (IRQ_TIMER4 - IRQ_S3CUART_RX0))

static inline int s3c24xx_ostimer_pending(void)
{
return __raw_readl(S3C2410_SUBSRCPND) & SUBSRC_TIMER4;
}
7 changes: 2 additions & 5 deletions trunk/arch/arm/plat-s3c/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <plat/regs-timer.h>
#include <mach/regs-irq.h>
#include <asm/mach/time.h>
#include <mach/tick.h>

#include <plat/clock.h>
#include <plat/cpu.h>
Expand Down Expand Up @@ -91,12 +92,9 @@ static inline unsigned long timer_ticks_to_usec(unsigned long ticks)
* IRQs are disabled before entering here from do_gettimeofday()
*/

#define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0))

static unsigned long s3c2410_gettimeoffset (void)
{
unsigned long tdone;
unsigned long irqpend;
unsigned long tval;

/* work out how many ticks have gone since last timer interrupt */
Expand All @@ -106,8 +104,7 @@ static unsigned long s3c2410_gettimeoffset (void)

/* check to see if there is an interrupt pending */

irqpend = __raw_readl(S3C2410_SRCPND);
if (irqpend & SRCPND_TIMER4) {
if (s3c24xx_ostimer_pending()) {
/* re-read the timer, and try and fix up for the missed
* interrupt. Note, the interrupt may go off before the
* timer has re-loaded from wrapping.
Expand Down

0 comments on commit 221ca99

Please sign in to comment.