fix fuer die B1-PCI. Jetzt geht z.B. auch IRQ 17 ...

This commit is contained in:
Carsten Paeth 1999-04-15 19:49:36 +00:00
parent deb2716fd4
commit 028b412fca
4 changed files with 38 additions and 10 deletions

View File

@ -6,6 +6,9 @@
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.13 1999/01/05 18:29:31 he
* merged remaining schedule_timeout() changes from 2.1.127
*
* Revision 1.12 1998/10/25 14:38:58 fritz
* Backported from MIPS (Cobalt).
*
@ -182,10 +185,11 @@ static char *cardtype2str(int cardtype)
{
switch (cardtype) {
default:
case AVM_CARDTYPE_B1: return "B1";
case AVM_CARDTYPE_M1: return "M1";
case AVM_CARDTYPE_M2: return "M2";
case AVM_CARDTYPE_T1: return "T1";
case AVM_CARDTYPE_B1: return "B1-ISA";
case AVM_CARDTYPE_B1PCI: return "B1-PCI";
case AVM_CARDTYPE_M1: return "M1";
case AVM_CARDTYPE_M2: return "M2";
case AVM_CARDTYPE_T1: return "T1";
}
}
@ -636,6 +640,7 @@ int avmb1_detectcard(int port, int irq, int cardtype)
case AVM_CARDTYPE_M1:
case AVM_CARDTYPE_M2:
case AVM_CARDTYPE_B1:
case AVM_CARDTYPE_B1PCI:
printk(KERN_NOTICE "b1capi: AVM-%s-Controller detected at 0x%x\n", cardtype2str(cardtype), port);
break;
case AVM_CARDTYPE_T1:

View File

@ -6,6 +6,9 @@
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.9 1999/01/05 18:33:23 he
* merged remaining 2.2pre{1,2} changes (jiffies and Config)
*
* Revision 1.8 1998/10/25 14:39:00 fritz
* Backported from MIPS (Cobalt).
*
@ -471,6 +474,8 @@ int B1_valid_irq(unsigned irq, int cardtype)
return irq_table[irq & 0xf] != 0;
case AVM_CARDTYPE_T1:
return hema_irq_table[irq & 0xf] != 0;
case AVM_CARDTYPE_B1PCI:
return 1;
}
}
@ -493,6 +498,8 @@ int B1_valid_port(unsigned port, int cardtype)
#else
return 1;
#endif
case AVM_CARDTYPE_B1PCI:
return 1;
case AVM_CARDTYPE_T1:
return ((port & 0x7) == 0) && ((port & 0x30) != 0x30);
}
@ -506,6 +513,7 @@ void B1_setinterrupt(unsigned int base,
t1outp(base, B1_INSTAT, 0x00);
t1outp(base, B1_INSTAT, 0x02);
t1outp(base, T1_IRQMASTER, 0x08);
break;
default:
case AVM_CARDTYPE_M1:
case AVM_CARDTYPE_M2:
@ -513,6 +521,12 @@ void B1_setinterrupt(unsigned int base,
b1outp(base, B1_INSTAT, 0x00);
b1outp(base, B1_RESET, irq_table[irq]);
b1outp(base, B1_INSTAT, 0x02);
break;
case AVM_CARDTYPE_B1PCI:
b1outp(base, B1_INSTAT, 0x00);
b1outp(base, B1_RESET, 0xf0);
b1outp(base, B1_INSTAT, 0x02);
break;
}
}

View File

@ -6,6 +6,11 @@
* (c) Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.8 1998/06/17 19:51:16 he
* merged with 2.1.10[34] (cosmetics and udelay() -> mdelay())
* brute force fix to avoid Ugh's in isdn_tty_write()
* cleaned up some dead code
*
* Revision 1.7 1998/03/29 16:06:02 calle
* changes from 2.0 tree merged.
*
@ -103,13 +108,13 @@ int b1pci_init(void)
printk(KERN_INFO
"b1pci: PCI BIOS reports AVM-B1 at i/o %#x, irq %d\n",
ioaddr, irq);
if ((rc = avmb1_probecard(ioaddr, irq, AVM_CARDTYPE_B1)) != 0) {
if ((rc = avmb1_probecard(ioaddr, irq, AVM_CARDTYPE_B1PCI)) != 0) {
printk(KERN_ERR
"b1pci: no AVM-B1 at i/o %#x, irq %d detected\n",
ioaddr, irq);
return rc;
}
if ((rc = avmb1_addcard(ioaddr, irq, AVM_CARDTYPE_B1)) < 0)
if ((rc = avmb1_addcard(ioaddr, irq, AVM_CARDTYPE_B1PCI)) < 0)
return rc;
}
return 0;

View File

@ -6,6 +6,9 @@
* Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log$
* Revision 1.5 1998/10/25 14:50:28 fritz
* Backported from MIPS (Cobalt).
*
* Revision 1.4 1998/03/29 16:05:02 calle
* changes from 2.0 tree merged.
*
@ -86,10 +89,11 @@ typedef struct avmb1_carddef {
int irq;
} avmb1_carddef;
#define AVM_CARDTYPE_B1 0
#define AVM_CARDTYPE_T1 1
#define AVM_CARDTYPE_M1 2
#define AVM_CARDTYPE_M2 3
#define AVM_CARDTYPE_B1 0
#define AVM_CARDTYPE_T1 1
#define AVM_CARDTYPE_M1 2
#define AVM_CARDTYPE_M2 3
#define AVM_CARDTYPE_B1PCI 4
typedef struct avmb1_extcarddef {
int port;