Commit 846757162d3f92629b3ab6189366cd8febbb4995
Committed by
Linus Torvalds
1 parent
0e298ebec4
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 15 additions and 12 deletions Side-by-side Diff
arch/m68knommu/platform/68328/timers.c
... | ... | @@ -53,18 +53,28 @@ |
53 | 53 | |
54 | 54 | /***************************************************************************/ |
55 | 55 | |
56 | +static 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 | + | |
56 | 66 | static struct irqaction m68328_timer_irq = { |
57 | - .name = "timer", | |
58 | - .flags = IRQF_DISABLED | IRQF_TIMER, | |
67 | + .name = "timer", | |
68 | + .flags = IRQF_DISABLED | IRQF_TIMER, | |
69 | + .handler = hw_tick, | |
59 | 70 | }; |
60 | 71 | |
61 | -void m68328_timer_init(irq_handler_t timer_routine) | |
72 | +void hw_timer_init(void) | |
62 | 73 | { |
63 | 74 | /* disable timer 1 */ |
64 | 75 | TCTL = 0; |
65 | 76 | |
66 | 77 | /* set ISR */ |
67 | - m68328_timer_irq.handler = timer_routine; | |
68 | 78 | setup_irq(TMR_IRQ_NUM, &m68328_timer_irq); |
69 | 79 | |
70 | 80 | /* Restart mode, Enable int, Set clock source */ |
... | ... | @@ -78,14 +88,7 @@ |
78 | 88 | |
79 | 89 | /***************************************************************************/ |
80 | 90 | |
81 | -void m68328_timer_tick(void) | |
82 | -{ | |
83 | - /* Reset Timer1 */ | |
84 | - TSTAT &= 0; | |
85 | -} | |
86 | -/***************************************************************************/ | |
87 | - | |
88 | -unsigned long m68328_timer_gettimeoffset(void) | |
91 | +unsigned long hw_timer_offset(void) | |
89 | 92 | { |
90 | 93 | unsigned long ticks = TCN, offset = 0; |
91 | 94 |