diff options
author | Nicolas Pitre <nico@cam.org> | 2005-09-01 07:48:47 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-09-01 07:48:47 -0400 |
commit | 20e912680842504ab4633deaa644c2b855ad3d44 (patch) | |
tree | b92a5c0c287c9a115a43b85f55a818996df5e319 /arch/arm | |
parent | 5c53ff088cb76dca52bdf2ef36ea63147763f9ea (diff) |
[ARM] 2863/1: clarify comment in PXA2xx and SA1x00 timer code
Patch from Nicolas Pitre
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-pxa/time.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/time.c | 17 |
2 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c index 72b15e9a373a..7dad3f1465e0 100644 --- a/arch/arm/mach-pxa/time.c +++ b/arch/arm/mach-pxa/time.c | |||
@@ -91,9 +91,10 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
91 | 91 | ||
92 | /* Loop until we get ahead of the free running timer. | 92 | /* Loop until we get ahead of the free running timer. |
93 | * This ensures an exact clock tick count and time accuracy. | 93 | * This ensures an exact clock tick count and time accuracy. |
94 | * IRQs are disabled inside the loop to ensure coherence between | 94 | * Since IRQs are disabled at this point, coherence between |
95 | * lost_ticks (updated in do_timer()) and the match reg value, so we | 95 | * lost_ticks(updated in do_timer()) and the match reg value is |
96 | * can use do_gettimeofday() from interrupt handlers. | 96 | * ensured, hence we can use do_gettimeofday() from interrupt |
97 | * handlers. | ||
97 | * | 98 | * |
98 | * HACK ALERT: it seems that the PXA timer regs aren't updated right | 99 | * HACK ALERT: it seems that the PXA timer regs aren't updated right |
99 | * away in all cases when a write occurs. We therefore compare with | 100 | * away in all cases when a write occurs. We therefore compare with |
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c index 0eeb3616ffea..a084b38698cf 100644 --- a/arch/arm/mach-sa1100/time.c +++ b/arch/arm/mach-sa1100/time.c | |||
@@ -70,15 +70,6 @@ static unsigned long sa1100_gettimeoffset (void) | |||
70 | return usec; | 70 | return usec; |
71 | } | 71 | } |
72 | 72 | ||
73 | /* | ||
74 | * We will be entered with IRQs enabled. | ||
75 | * | ||
76 | * Loop until we get ahead of the free running timer. | ||
77 | * This ensures an exact clock tick count and time accuracy. | ||
78 | * IRQs are disabled inside the loop to ensure coherence between | ||
79 | * lost_ticks (updated in do_timer()) and the match reg value, so we | ||
80 | * can use do_gettimeofday() from interrupt handlers. | ||
81 | */ | ||
82 | static irqreturn_t | 73 | static irqreturn_t |
83 | sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 74 | sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) |
84 | { | 75 | { |
@@ -86,6 +77,14 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
86 | 77 | ||
87 | write_seqlock(&xtime_lock); | 78 | write_seqlock(&xtime_lock); |
88 | 79 | ||
80 | /* | ||
81 | * Loop until we get ahead of the free running timer. | ||
82 | * This ensures an exact clock tick count and time accuracy. | ||
83 | * Since IRQs are disabled at this point, coherence between | ||
84 | * lost_ticks(updated in do_timer()) and the match reg value is | ||
85 | * ensured, hence we can use do_gettimeofday() from interrupt | ||
86 | * handlers. | ||
87 | */ | ||
89 | do { | 88 | do { |
90 | timer_tick(regs); | 89 | timer_tick(regs); |
91 | OSSR = OSSR_M0; /* Clear match on timer 0 */ | 90 | OSSR = OSSR_M0; /* Clear match on timer 0 */ |