* [M68KNOMMU]: cleanup 68328 timer code
@ 2007-10-24 2:03 Greg Ungerer
0 siblings, 0 replies; only message in thread
From: Greg Ungerer @ 2007-10-24 2:03 UTC (permalink / raw)
To: torvalds; +Cc: gerg, linux-kernel
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>
---
diff -Naurp linux-2.6.23/arch/m68knommu/platform/68328/timers.c linux-2.6.23-uc0/arch/m68knommu/platform/68328/timers.c
--- linux-2.6.23/arch/m68knommu/platform/68328/timers.c 2007-10-19 10:30:55.000000000 +1000
+++ linux-2.6.23-uc0/arch/m68knommu/platform/68328/timers.c 2007-10-19 10:35:40.000000000 +1000
@@ -53,18 +53,28 @@
/***************************************************************************/
+static irqreturn_t hw_tick(int irq, void *dummy)
+{
+ /* Reset Timer1 */
+ TSTAT &= 0;
+
+ return arch_timer_interrupt(irq, dummy);
+}
+
+/***************************************************************************/
+
static struct irqaction m68328_timer_irq = {
- .name = "timer",
- .flags = IRQF_DISABLED | IRQF_TIMER,
+ .name = "timer",
+ .flags = IRQF_DISABLED | IRQF_TIMER,
+ .handler = hw_tick,
};
-void m68328_timer_init(irq_handler_t timer_routine)
+void hw_timer_init(void)
{
/* disable timer 1 */
TCTL = 0;
/* set ISR */
- m68328_timer_irq.handler = timer_routine;
setup_irq(TMR_IRQ_NUM, &m68328_timer_irq);
/* Restart mode, Enable int, Set clock source */
@@ -78,14 +88,7 @@ void m68328_timer_init(irq_handler_t tim
/***************************************************************************/
-void m68328_timer_tick(void)
-{
- /* Reset Timer1 */
- TSTAT &= 0;
-}
-/***************************************************************************/
-
-unsigned long m68328_timer_gettimeoffset(void)
+unsigned long hw_timer_offset(void)
{
unsigned long ticks = TCN, offset = 0;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-24 2:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-24 2:03 [M68KNOMMU]: cleanup 68328 timer code Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®