Index: arch/parisc/kernel/setup.c =================================================================== RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v retrieving revision 1.92 diff -u -p -r1.92 setup.c --- setup.c 2001/10/10 20:10:10 1.92 +++ setup.c 2001/10/11 01:20:45 @@ -211,13 +211,14 @@ void __init parisc_init(void) #if defined(CONFIG_GSC_DINO) dino_init(); #endif -#ifdef CONFIG_EISA - eisa_init(); -#endif #if defined(CONFIG_GSC_LASI) || defined(CONFIG_GSC_DINO) \ || defined(CONFIG_GSC_WAX) busdevices_init(); +#endif +#ifdef CONFIG_EISA + /* Needs to be after Asp / Wax have registered */ + eisa_init(); #endif #ifdef CONFIG_CHASSIS_LCD_LED Index: drivers/gsc/asp.c =================================================================== RCS file: /home/cvs/parisc/linux/drivers/gsc/asp.c,v retrieving revision 1.11 diff -u -p -r1.11 asp.c --- asp.c 2001/10/03 08:06:40 1.11 +++ asp.c 2001/10/11 01:20:45 @@ -34,27 +34,33 @@ static int asp_find_irq(struct busdevice *busdev_dev, struct parisc_device *dev) { int irq; - int off = dev->hpa & 0xffff; - /* - ** "irq" bits below are numbered relative to most significant bit. - */ - switch (off) { - case 0x1000: irq = 30; break; /* FIXME? (29,30 or 2 !)*/ /* HIL */ - case 0x2000: irq = 25; break; /* RS232 B */ - case 0x3000: irq = 26; break; /* RS232 A */ - case 0x4000: irq = 24; break; /* Centronics/Parallel Port */ - case 0x5000: irq = 22; break; /* SCSI */ - case 0x6000: irq = 23; break; /* LAN */ - - case 0x0000: irq = 18; break; /* Audio ??? */ - case 0x9000: irq = 18; break; /* Audio ??? */ - - case 0xF000: irq = 17; break; /* ASP itself */ - default: irq = -1; break; /* unknown */ + /* "irq" bits below are numbered relative to most significant bit. */ + switch (dev->id.sversion) { + case 0x71: irq = 22; break; /* SCSI */ + case 0x72: irq = 23; break; /* LAN */ + case 0x73: irq = 30; break; /* HIL */ + case 0x74: irq = 24; break; /* Centronics */ + case 0x75: if ((dev->hpa & 0xffff) == 0x3000) + irq = 26; /* RS232 A */ + else + irq = 25; /* RS232 B */ + break; + case 0x76: irq = 21; break; /* Centronics */ + case 0x77: irq = 20; break; /* Graphics1 */ + case 0x7a: irq = 18; break; /* Audio (Bushmaster) */ + case 0x7b: irq = 18; break; /* Audio (Scorpio) */ + case 0x7c: irq = 28; break; /* FW SCSI */ + case 0x7d: irq = 27; break; /* FDDI */ + case 0x7f: irq = 18; break; /* Audio (Outfield) */ } - return irq; +} + +/* Damn Snakes... */ +int asp_alloc_irq(struct parisc_device *dev) +{ + return asp_find_irq(NULL, dev) + 64; /* Shut up. This is a hack. */ } int __init Index: drivers/gsc/eisa.c =================================================================== RCS file: /home/cvs/parisc/linux/drivers/gsc/eisa.c,v retrieving revision 1.1 diff -u -p -r1.1 eisa.c --- eisa.c 2001/10/10 20:10:12 1.1 +++ eisa.c 2001/10/11 01:20:45 @@ -17,9 +17,11 @@ #include #include +#include #include #include #include +#include #include #include @@ -31,6 +33,7 @@ */ struct eisa_ba { struct resource mem; + struct irq_region *region; } eisa_dev; /* Port ops */ @@ -84,10 +87,54 @@ void eisa_out32(u32 data, u16 port) gsc_writel(cpu_to_le32(data), eisa_permute(port)); } +/* Interrupt handling */ + +static void eisa_irq(int _, void *intr_dev, struct pt_regs *regs) +{ + extern void do_irq(struct irqaction *a, int i, struct pt_regs *p); + int irq = gsc_readb(0xfc01f000); + + printk(KERN_DEBUG "EISA irq %d\n", irq); + + do_irq(&eisa_dev.region->action[irq], + eisa_dev.region->data.irqbase + irq, regs); +} + +static void eisa_disable_irq(void *irq_dev, int irq) +{ + return; +} + +static void eisa_enable_irq(void *irq_dev, int irq) +{ + return; +} + +static void eisa_mask_irq(void *irq_dev, int irq) +{ + return; +} + +static void eisa_unmask_irq(void *irq_dev, int irq) +{ + return; +} + +static struct irq_region_ops eisa_irq_ops = { + disable_irq: eisa_disable_irq, + enable_irq: eisa_enable_irq, + mask_irq: eisa_mask_irq, + unmask_irq: eisa_unmask_irq, +}; + +/* Device initialisation */ + +#define is_mongoose(dev) (dev->id.sversion == 0x00076) + static int __devinit eisa_probe(struct parisc_device *dev) { - int result; - char *name = (dev->id.sversion == 0x00076) ? "Mongoose" : "Wax"; + int result, irq; + char *name = is_mongoose(dev) ? "Mongoose" : "Wax"; printk("%s EISA Adapter found at 0x%08lx\n", name, dev->hpa); @@ -99,6 +146,33 @@ static int __devinit eisa_probe(struct p if (result < 0) { printk(KERN_ERR "EISA: failed to claim EISA Bus address space!\n"); return result; + } + + /* XXX: On Snakes systems, Mongoose is not the child of anything. + * But on other systems, Wax EISA is the child of Wax. Blah. + * When we have iotree, we can fix this in asp.c by walking + * ->sibling as well as ->child. + */ + if (is_mongoose(dev)) { + extern int asp_alloc_irq(struct parisc_device *dev); + irq = asp_alloc_irq(dev); + } else { + irq = busdevice_alloc_irq(dev); + } + if (!irq) { + printk(KERN_ERR "EISA: failed to claim IRQ\n"); + return -ENODEV; + } + result = request_irq(irq, eisa_irq, 0, name, NULL); + if (result) { + printk(KERN_ERR "EISA: request_irq failed!\n"); + return result; + } + eisa_dev.region = alloc_irq_region(8, &eisa_irq_ops, + IRQ_REG_MASK|IRQ_REG_DIS, name, NULL); + if (eisa_dev.region == NULL) { + printk(KERN_ERR "EISA: Couldn't allocate IRQ region\n"); + return -ENODEV; } EISA_bus = 1; Index: drivers/net/hp100.c =================================================================== RCS file: /home/cvs/parisc/linux/drivers/net/hp100.c,v retrieving revision 1.8 diff -u -p -r1.8 hp100.c --- hp100.c 2001/07/05 21:36:20 1.8 +++ hp100.c 2001/10/11 01:20:45 @@ -80,7 +80,7 @@ #define HP100_DEFAULT_PRIORITY_TX 0 -#undef HP100_DEBUG +#define HP100_DEBUG #undef HP100_DEBUG_B /* Trace */ #undef HP100_DEBUG_BM /* Debug busmaster code (PDL stuff) */ @@ -232,8 +232,11 @@ static struct hp100_eisa_id hp100_eisa_i /* 10/100 ISA card with Cascade chip */ { 0x5019F022, "HP J2573", HP100_BUS_ISA }, + /* 10/100 EISA card with AT&T chip */ + { 0x9019f022, "HP J2577", HP100_BUS_EISA }, + /* 10/100 PCI card - old J2585A */ - { 0x1030103c, "HP J2585A", HP100_BUS_PCI }, + { 0x1030103c, "HP J2585A", HP100_BUS_PCI }, /* 10/100 PCI card - new J2585B - master capable */ { 0x1041103c, "HP J2585B", HP100_BUS_PCI },