aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2007-07-26 11:09:00 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-26 14:05:20 -0400
commitc52a2cda561fd40543d839e8e0c75b6d964a67ad (patch)
treecf0327c2897ea50b2ec09d1f558674cfef3ece09 /arch/m68knommu
parent374c3f552d7c7731cf25b0d4938e9d14d9251bf4 (diff)
m68knommu: use setup_irq() in ColdFire simple timer
Use setup_irq() instead of request_irq() to set up system timer in ColdFire simple timer code. With the old m68knommu irq code this was safe, but it is not now within the generic irq framework. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68knommu')
-rw-r--r--arch/m68knommu/platform/5307/timers.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index fb66eadd5896..64bd0ff9029e 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -3,7 +3,7 @@
3/* 3/*
4 * timers.c -- generic ColdFire hardware timer support. 4 * timers.c -- generic ColdFire hardware timer support.
5 * 5 *
6 * Copyright (C) 1999-2006, Greg Ungerer (gerg@snapgear.com) 6 * Copyright (C) 1999-2007, Greg Ungerer (gerg@snapgear.com)
7 */ 7 */
8 8
9/***************************************************************************/ 9/***************************************************************************/
@@ -13,8 +13,8 @@
13#include <linux/param.h> 13#include <linux/param.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/irq.h>
16#include <asm/io.h> 17#include <asm/io.h>
17#include <asm/irq.h>
18#include <asm/traps.h> 18#include <asm/traps.h>
19#include <asm/machdep.h> 19#include <asm/machdep.h>
20#include <asm/coldfire.h> 20#include <asm/coldfire.h>
@@ -62,17 +62,24 @@ void coldfire_tick(void)
62 62
63/***************************************************************************/ 63/***************************************************************************/
64 64
65static struct irqaction coldfire_timer_irq = {
66 .name = "timer",
67 .flags = IRQF_DISABLED | IRQF_TIMER,
68};
69
65static int ticks_per_intr; 70static int ticks_per_intr;
66 71
67void coldfire_timer_init(irq_handler_t handler) 72void coldfire_timer_init(irq_handler_t handler)
68{ 73{
74 coldfire_timer_irq.handler = handler;
75 setup_irq(mcf_timervector, &coldfire_timer_irq);
76
69 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 77 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
70 ticks_per_intr = (MCF_BUSCLK / 16) / HZ; 78 ticks_per_intr = (MCF_BUSCLK / 16) / HZ;
71 __raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR)); 79 __raw_writetrr(ticks_per_intr - 1, TA(MCFTIMER_TRR));
72 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 80 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
73 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); 81 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
74 82
75 request_irq(mcf_timervector, handler, IRQF_DISABLED, "timer", NULL);
76 mcf_settimericr(1, mcf_timerlevel); 83 mcf_settimericr(1, mcf_timerlevel);
77 84
78#ifdef CONFIG_HIGHPROFILE 85#ifdef CONFIG_HIGHPROFILE