aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/cchips/voyagergx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/cchips/voyagergx')
-rw-r--r--arch/sh/cchips/voyagergx/irq.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c
index 4cfa7c990553..392c8b12ce36 100644
--- a/arch/sh/cchips/voyagergx/irq.c
+++ b/arch/sh/cchips/voyagergx/irq.c
@@ -36,32 +36,26 @@
36 36
37static void disable_voyagergx_irq(unsigned int irq) 37static void disable_voyagergx_irq(unsigned int irq)
38{ 38{
39 unsigned long flags, val; 39 unsigned long val;
40 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); 40 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE);
41 41
42 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); 42 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask);
43 local_irq_save(flags);
44 val = inl(VOYAGER_INT_MASK); 43 val = inl(VOYAGER_INT_MASK);
45 val &= ~mask; 44 val &= ~mask;
46 outl(val, VOYAGER_INT_MASK); 45 outl(val, VOYAGER_INT_MASK);
47 local_irq_restore(flags);
48} 46}
49 47
50
51static void enable_voyagergx_irq(unsigned int irq) 48static void enable_voyagergx_irq(unsigned int irq)
52{ 49{
53 unsigned long flags, val; 50 unsigned long val;
54 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE); 51 unsigned long mask = 1 << (irq - VOYAGER_IRQ_BASE);
55 52
56 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask); 53 pr_debug("disable_voyagergx_irq(%d): mask=%x\n", irq, mask);
57 local_irq_save(flags);
58 val = inl(VOYAGER_INT_MASK); 54 val = inl(VOYAGER_INT_MASK);
59 val |= mask; 55 val |= mask;
60 outl(val, VOYAGER_INT_MASK); 56 outl(val, VOYAGER_INT_MASK);
61 local_irq_restore(flags);
62} 57}
63 58
64
65static void mask_and_ack_voyagergx(unsigned int irq) 59static void mask_and_ack_voyagergx(unsigned int irq)
66{ 60{
67 disable_voyagergx_irq(irq); 61 disable_voyagergx_irq(irq);
@@ -94,7 +88,8 @@ static struct hw_interrupt_type voyagergx_irq_type = {
94 .end = end_voyagergx_irq, 88 .end = end_voyagergx_irq,
95}; 89};
96 90
97static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, struct pt_regs *regs) 91static irqreturn_t voyagergx_interrupt(int irq, void *dev_id,
92 struct pt_regs *regs)
98{ 93{
99 printk(KERN_INFO 94 printk(KERN_INFO
100 "VoyagerGX: spurious interrupt, status: 0x%x\n", 95 "VoyagerGX: spurious interrupt, status: 0x%x\n",
@@ -102,9 +97,6 @@ static irqreturn_t voyagergx_interrupt(int irq, void *dev_id, struct pt_regs *re
102 return IRQ_HANDLED; 97 return IRQ_HANDLED;
103} 98}
104 99
105
106/*====================================================*/
107
108static struct { 100static struct {
109 int (*func)(int, void *); 101 int (*func)(int, void *);
110 void *dev; 102 void *dev;