aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-s3c24xx/time.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-10-21 14:06:35 +0100
committerBen Dooks <ben-linux@fluff.org>2008-10-21 14:12:13 +0100
commit556eabb8bd16d4e817163aae96c25ea9b63d3953 (patch)
tree4d9680c2d24c51f1a69ad9e32d167e4bc12c1cf2 /arch/arm/plat-s3c24xx/time.c
parent06cc9dbf238fb43cf66d1bd068cfe6e81f669317 (diff)
[ARM] S3C24XX: Split timer pending code out
Split the timer pending code out to a seperate per-machine header so that when compiling for mach-s3c2410 or mach-s3c24a0 we can use the right timer code without having to #ifdef the timer driver. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c24xx/time.c')
-rw-r--r--arch/arm/plat-s3c24xx/time.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/plat-s3c24xx/time.c b/arch/arm/plat-s3c24xx/time.c
index c51916236ac..418654416bc 100644
--- a/arch/arm/plat-s3c24xx/time.c
+++ b/arch/arm/plat-s3c24xx/time.c
@@ -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>
@@ -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 */
@@ -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.