12 #include <linux/pci.h>
14 #include <linux/ppp_defs.h>
17 static const char *NETjet_U_revision =
"$Revision: 2.14.2.3 $";
29 netjet_u_interrupt(
int intno,
void *
dev_id)
31 struct IsdnCardState *cs =
dev_id;
39 if (cs->debug & L1_DEB_ISAC)
40 debugl1(cs,
"tiger: i1 %x %x", sval, val);
61 if (sval != cs->hw.njet.last_is0)
64 spin_unlock_irqrestore(&cs->lock, flags);
67 cs->hw.njet.irqstat0 = sval;
79 spin_unlock_irqrestore(&cs->lock, flags);
84 reset_netjet_u(
struct IsdnCardState *cs)
86 cs->hw.njet.ctrl_reg = 0xff;
89 cs->hw.njet.ctrl_reg = 0x40;
93 cs->hw.njet.auxd = 0xC0;
94 cs->hw.njet.dmactrl = 0;
98 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
102 NETjet_U_card_msg(
struct IsdnCardState *cs,
int mt,
void *
arg)
110 spin_unlock_irqrestore(&cs->lock, flags);
123 spin_unlock_irqrestore(&cs->lock, flags);
132 struct IsdnCardState *cs)
137 cs->irq = dev_netjet->
irq;
143 if (!cs->hw.njet.base) {
152 struct IsdnCardState *cs)
158 cs->hw.njet.ctrl_reg = 0xff;
162 cs->hw.njet.ctrl_reg = 0x00;
166 cs->hw.njet.auxd = 0xC0;
167 cs->hw.njet.dmactrl = 0;
172 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd);
191 struct IsdnCardState *cs)
196 "NETspider-U: PCI card configured at %#lx IRQ %d\n",
197 cs->hw.njet.base, cs->irq);
198 if (!
request_region(cs->hw.njet.base, bytecnt,
"netspider-u isdn")) {
200 "HiSax: NETspider-U config port %#lx-%#lx "
203 cs->hw.njet.base + bytecnt);
211 cs->BC_Read_Reg = &dummyrr;
212 cs->BC_Write_Reg = &dummywr;
214 cs->cardmsg = &NETjet_U_card_msg;
215 cs->irq_func = &netjet_u_interrupt;
228 struct IsdnCardState *cs = card->
cs;
232 #error "not running on big endian machines now"
235 strcpy(tmp, NETjet_U_revision);
245 ret = nju_pci_probe(dev_netjet, cs);
253 ret = nju_cs_init(card, cs);
261 return nju_cs_init_rest(card, cs);