aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-s3c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-s3c')
-rw-r--r--arch/arm/plat-s3c/time.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/plat-s3c/time.c b/arch/arm/plat-s3c/time.c
index c6861a05a29..d35e149f4eb 100644
--- a/arch/arm/plat-s3c/time.c
+++ b/arch/arm/plat-s3c/time.c
@@ -36,6 +36,7 @@
36#include <plat/regs-timer.h> 36#include <plat/regs-timer.h>
37#include <mach/regs-irq.h> 37#include <mach/regs-irq.h>
38#include <asm/mach/time.h> 38#include <asm/mach/time.h>
39#include <mach/tick.h>
39 40
40#include <plat/clock.h> 41#include <plat/clock.h>
41#include <plat/cpu.h> 42#include <plat/cpu.h>
@@ -91,12 +92,9 @@ static inline unsigned long timer_ticks_to_usec(unsigned long ticks)
91 * IRQs are disabled before entering here from do_gettimeofday() 92 * IRQs are disabled before entering here from do_gettimeofday()
92 */ 93 */
93 94
94#define SRCPND_TIMER4 (1<<(IRQ_TIMER4 - IRQ_EINT0))
95
96static unsigned long s3c2410_gettimeoffset (void) 95static unsigned long s3c2410_gettimeoffset (void)
97{ 96{
98 unsigned long tdone; 97 unsigned long tdone;
99 unsigned long irqpend;
100 unsigned long tval; 98 unsigned long tval;
101 99
102 /* work out how many ticks have gone since last timer interrupt */ 100 /* work out how many ticks have gone since last timer interrupt */
@@ -106,8 +104,7 @@ static unsigned long s3c2410_gettimeoffset (void)
106 104
107 /* check to see if there is an interrupt pending */ 105 /* check to see if there is an interrupt pending */
108 106
109 irqpend = __raw_readl(S3C2410_SRCPND); 107 if (s3c24xx_ostimer_pending()) {
110 if (irqpend & SRCPND_TIMER4) {
111 /* re-read the timer, and try and fix up for the missed 108 /* re-read the timer, and try and fix up for the missed
112 * interrupt. Note, the interrupt may go off before the 109 * interrupt. Note, the interrupt may go off before the
113 * timer has re-loaded from wrapping. 110 * timer has re-loaded from wrapping.