diff options
Diffstat (limited to 'arch/sh/kernel/timers/timer-mtu2.c')
-rw-r--r-- | arch/sh/kernel/timers/timer-mtu2.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/sh/kernel/timers/timer-mtu2.c b/arch/sh/kernel/timers/timer-mtu2.c index 92c98b5b11ea..201f0a62132f 100644 --- a/arch/sh/kernel/timers/timer-mtu2.c +++ b/arch/sh/kernel/timers/timer-mtu2.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/spinlock.h> | ||
16 | #include <linux/seqlock.h> | 15 | #include <linux/seqlock.h> |
17 | #include <asm/timer.h> | 16 | #include <asm/timer.h> |
18 | #include <asm/io.h> | 17 | #include <asm/io.h> |
@@ -28,9 +27,6 @@ | |||
28 | * However, we can implement channel cascade if we go the overflow route and | 27 | * However, we can implement channel cascade if we go the overflow route and |
29 | * get away with using 2 MTU2 channels as a 32-bit timer. | 28 | * get away with using 2 MTU2 channels as a 32-bit timer. |
30 | */ | 29 | */ |
31 | |||
32 | static DEFINE_SPINLOCK(mtu2_lock); | ||
33 | |||
34 | #define MTU2_TSTR 0xfffe4280 | 30 | #define MTU2_TSTR 0xfffe4280 |
35 | #define MTU2_TCR_1 0xfffe4380 | 31 | #define MTU2_TCR_1 0xfffe4380 |
36 | #define MTU2_TMDR_1 0xfffe4381 | 32 | #define MTU2_TMDR_1 0xfffe4381 |
@@ -55,8 +51,6 @@ static DEFINE_SPINLOCK(mtu2_lock); | |||
55 | static unsigned long mtu2_timer_get_offset(void) | 51 | static unsigned long mtu2_timer_get_offset(void) |
56 | { | 52 | { |
57 | int count; | 53 | int count; |
58 | unsigned long flags; | ||
59 | |||
60 | static int count_p = 0x7fff; /* for the first call after boot */ | 54 | static int count_p = 0x7fff; /* for the first call after boot */ |
61 | static unsigned long jiffies_p = 0; | 55 | static unsigned long jiffies_p = 0; |
62 | 56 | ||
@@ -65,7 +59,6 @@ static unsigned long mtu2_timer_get_offset(void) | |||
65 | */ | 59 | */ |
66 | unsigned long jiffies_t; | 60 | unsigned long jiffies_t; |
67 | 61 | ||
68 | spin_lock_irqsave(&mtu2_lock, flags); | ||
69 | /* timer count may underflow right here */ | 62 | /* timer count may underflow right here */ |
70 | count = ctrl_inw(MTU2_TCNT_1); /* read the latched count */ | 63 | count = ctrl_inw(MTU2_TCNT_1); /* read the latched count */ |
71 | 64 | ||
@@ -90,7 +83,6 @@ static unsigned long mtu2_timer_get_offset(void) | |||
90 | jiffies_p = jiffies_t; | 83 | jiffies_p = jiffies_t; |
91 | 84 | ||
92 | count_p = count; | 85 | count_p = count; |
93 | spin_unlock_irqrestore(&mtu2_lock, flags); | ||
94 | 86 | ||
95 | count = ((LATCH-1) - count) * TICK_SIZE; | 87 | count = ((LATCH-1) - count) * TICK_SIZE; |
96 | count = (count + LATCH/2) / LATCH; | 88 | count = (count + LATCH/2) / LATCH; |
@@ -118,7 +110,7 @@ static irqreturn_t mtu2_timer_interrupt(int irq, void *dev_id) | |||
118 | static struct irqaction mtu2_irq = { | 110 | static struct irqaction mtu2_irq = { |
119 | .name = "timer", | 111 | .name = "timer", |
120 | .handler = mtu2_timer_interrupt, | 112 | .handler = mtu2_timer_interrupt, |
121 | .flags = IRQF_DISABLED, | 113 | .flags = IRQF_DISABLED | IRQF_TIMER, |
122 | .mask = CPU_MASK_NONE, | 114 | .mask = CPU_MASK_NONE, |
123 | }; | 115 | }; |
124 | 116 | ||