]> git.hungrycats.org Git - linux/commitdiff
[PATCH] merge the NEC98 parsing code
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Sat, 15 Feb 2003 04:30:06 +0000 (20:30 -0800)
committerJens Axboe <axboe@suse.de>
Sat, 15 Feb 2003 04:30:06 +0000 (20:30 -0800)
This is nice and clean (your tree already knows the idents)

arch/i386/kernel/io_apic.c

index 319b80d13be3108f33f8d8533443fca1555784f7..f5eb2d1f5bfc771fffdcdfb9216ac79e70dc13db 100644 (file)
@@ -668,7 +668,9 @@ static int __init find_isa_irq_pin(int irq, int type)
 
                if ((mp_bus_id_to_type[lbus] == MP_BUS_ISA ||
                     mp_bus_id_to_type[lbus] == MP_BUS_EISA ||
-                    mp_bus_id_to_type[lbus] == MP_BUS_MCA) &&
+                    mp_bus_id_to_type[lbus] == MP_BUS_MCA ||
+                    mp_bus_id_to_type[lbus] == MP_BUS_NEC98
+                   ) &&
                    (mp_irqs[i].mpc_irqtype == type) &&
                    (mp_irqs[i].mpc_srcbusirq == irq))
 
@@ -762,6 +764,12 @@ static int __init EISA_ELCR(unsigned int irq)
 #define default_MCA_trigger(idx)       (1)
 #define default_MCA_polarity(idx)      (0)
 
+/* NEC98 interrupts are always polarity zero edge triggered,
+ * when listed as conforming in the MP table. */
+
+#define default_NEC98_trigger(idx)     (0)
+#define default_NEC98_polarity(idx)    (0)
+
 static int __init MPBIOS_polarity(int idx)
 {
        int bus = mp_irqs[idx].mpc_srcbus;
@@ -796,6 +804,11 @@ static int __init MPBIOS_polarity(int idx)
                                        polarity = default_MCA_polarity(idx);
                                        break;
                                }
+                               case MP_BUS_NEC98: /* NEC 98 pin */
+                               {
+                                       polarity = default_NEC98_polarity(idx);
+                                       break;
+                               }
                                default:
                                {
                                        printk(KERN_WARNING "broken BIOS!!\n");
@@ -865,6 +878,11 @@ static int __init MPBIOS_trigger(int idx)
                                        trigger = default_MCA_trigger(idx);
                                        break;
                                }
+                               case MP_BUS_NEC98: /* NEC 98 pin */
+                               {
+                                       trigger = default_NEC98_trigger(idx);
+                                       break;
+                               }
                                default:
                                {
                                        printk(KERN_WARNING "broken BIOS!!\n");
@@ -926,6 +944,7 @@ static int pin_2_irq(int idx, int apic, int pin)
                case MP_BUS_ISA: /* ISA pin */
                case MP_BUS_EISA:
                case MP_BUS_MCA:
+               case MP_BUS_NEC98:
                {
                        irq = mp_irqs[idx].mpc_srcbusirq;
                        break;