aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2007-10-23 22:03:20 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-23 23:45:44 -0400
commit846757162d3f92629b3ab6189366cd8febbb4995 (patch)
treef49534bd5429336c659236388045397c4655d3bf
parent0e298ebec4ddc84741340fb085887ad8732f727b (diff)
m68knommu: cleanup 68328 timer code
Use common function naming for 68328 timer functions to make them consistent with the various other hardware m68knommu timers. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--arch/m68knommu/platform/68328/timers.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/arch/m68knommu/platform/68328/timers.c b/arch/m68knommu/platform/68328/timers.c
index 0396476f955d..04cbc661d4bd 100644
--- a/arch/m68knommu/platform/68328/timers.c
+++ b/arch/m68knommu/platform/68328/timers.c
@@ -53,18 +53,28 @@
53 53
54/***************************************************************************/ 54/***************************************************************************/
55 55
56static irqreturn_t hw_tick(int irq, void *dummy)
57{
58 /* Reset Timer1 */
59 TSTAT &= 0;
60
61 return arch_timer_interrupt(irq, dummy);
62}
63
64/***************************************************************************/
65
56static struct irqaction m68328_timer_irq = { 66static struct irqaction m68328_timer_irq = {
57 .name = "timer", 67 .name = "timer",
58 .flags = IRQF_DISABLED | IRQF_TIMER, 68 .flags = IRQF_DISABLED | IRQF_TIMER,
69 .handler = hw_tick,
59}; 70};
60 71
61void m68328_timer_init(irq_handler_t timer_routine) 72void hw_timer_init(void)
62{ 73{
63 /* disable timer 1 */ 74 /* disable timer 1 */
64 TCTL = 0; 75 TCTL = 0;
65 76
66 /* set ISR */ 77 /* set ISR */
67 m68328_timer_irq.handler = timer_routine;
68 setup_irq(TMR_IRQ_NUM, &m68328_timer_irq); 78 setup_irq(TMR_IRQ_NUM, &m68328_timer_irq);
69 79
70 /* Restart mode, Enable int, Set clock source */ 80 /* Restart mode, Enable int, Set clock source */
@@ -78,14 +88,7 @@ void m68328_timer_init(irq_handler_t timer_routine)
78 88
79/***************************************************************************/ 89/***************************************************************************/
80 90
81void m68328_timer_tick(void) 91unsigned long hw_timer_offset(void)
82{
83 /* Reset Timer1 */
84 TSTAT &= 0;
85}
86/***************************************************************************/
87
88unsigned long m68328_timer_gettimeoffset(void)
89{ 92{
90 unsigned long ticks = TCN, offset = 0; 93 unsigned long ticks = TCN, offset = 0;
91 94