aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mac/psc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/mac/psc.c')
-rw-r--r--arch/m68k/mac/psc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 401147985a96..1dba88247c6f 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -131,11 +131,8 @@ irqreturn_t psc_irq(int irq, void *dev_id)
131{ 131{
132 int pIFR = pIFRbase + ((int) dev_id); 132 int pIFR = pIFRbase + ((int) dev_id);
133 int pIER = pIERbase + ((int) dev_id); 133 int pIER = pIERbase + ((int) dev_id);
134 int base_irq; 134 int irq_num;
135 int irq_bit,i; 135 unsigned char irq_bit, events;
136 unsigned char events;
137
138 base_irq = irq << 3;
139 136
140#ifdef DEBUG_IRQS 137#ifdef DEBUG_IRQS
141 printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n", 138 printk("psc_irq: irq %d pIFR = 0x%02X pIER = 0x%02X\n",
@@ -146,14 +143,18 @@ irqreturn_t psc_irq(int irq, void *dev_id)
146 if (!events) 143 if (!events)
147 return IRQ_NONE; 144 return IRQ_NONE;
148 145
149 for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) { 146 irq_num = irq << 3;
150 if (events & irq_bit) { 147 irq_bit = 1;
148 do {
149 if (events & irq_bit) {
151 psc_write_byte(pIER, irq_bit); 150 psc_write_byte(pIER, irq_bit);
152 psc_write_byte(pIFR, irq_bit); 151 psc_write_byte(pIFR, irq_bit);
153 m68k_handle_int(base_irq + i); 152 m68k_handle_int(irq_num);
154 psc_write_byte(pIER, irq_bit | 0x80); 153 psc_write_byte(pIER, irq_bit | 0x80);
155 } 154 }
156 } 155 irq_num++;
156 irq_bit <<= 1;
157 } while (events >= irq_bit);
157 return IRQ_HANDLED; 158 return IRQ_HANDLED;
158} 159}
159 160