Skip to content

Commit

Permalink
m68knommu: fix 68328 local setting of timer interrupt handler
Browse files Browse the repository at this point in the history
Compiling for 68328 based targets fails with:

    arch/m68k/platform/68328/timers.c: In function ‘hw_tick’:
    arch/m68k/platform/68328/timers.c:65:2: error: implicit declaration of function ‘arch_timer_interrupt’
    arch/m68k/platform/68328/timers.c: At top level:
    arch/m68k/platform/68328/timers.c:102:6: error: conflicting types for ‘hw_timer_init’
    arch/m68k/include/asm/machdep.h:36:13: note: previous declaration of ‘hw_timer_init’ was here

Changes made to hw_timer_init() didn't get updated in the 68328 timer code.
So process and call the "handler" arg that is now passed into that
hw_timer_init() function.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
  • Loading branch information
Greg Ungerer committed Jun 12, 2012
1 parent b13b3f5 commit dc5588a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/m68k/platform/68328/timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
#endif

static u32 m68328_tick_cnt;
static irq_handler_t timer_interrupt;

/***************************************************************************/

Expand All @@ -62,7 +63,7 @@ static irqreturn_t hw_tick(int irq, void *dummy)
TSTAT &= 0;

m68328_tick_cnt += TICKS_PER_JIFFY;
return arch_timer_interrupt(irq, dummy);
return timer_interrupt(irq, dummy);
}

/***************************************************************************/
Expand Down Expand Up @@ -99,7 +100,7 @@ static struct clocksource m68328_clk = {

/***************************************************************************/

void hw_timer_init(void)
void hw_timer_init(irq_handler_t handler)
{
/* disable timer 1 */
TCTL = 0;
Expand All @@ -115,6 +116,7 @@ void hw_timer_init(void)
/* Enable timer 1 */
TCTL |= TCTL_TEN;
clocksource_register_hz(&m68328_clk, TICKS_PER_JIFFY*HZ);
timer_interrupt = handler;
}

/***************************************************************************/
Expand Down

0 comments on commit dc5588a

Please sign in to comment.