23 #define ADDRREG_OFFSET 0x02
24 #define DATAREG_OFFSET 0x03
25 #define ASL0_OFFSET 0x04
26 #define ASL1_OFFSET 0x05
27 #define MODREG_OFFSET 0x06
28 #define VERREG_OFFSET 0x07
31 #define ISAC_FIFO_OFFSET 0x00
32 #define ISAC_REG_OFFSET 0x20
33 #define HSCX_CH_DIFF 0x40
34 #define HSCX_FIFO_OFFSET 0x80
35 #define HSCX_REG_OFFSET 0xa0
38 #define ASL0_R_TIMER 0x10
39 #define ASL0_R_ISAC 0x20
40 #define ASL0_R_HSCX 0x40
41 #define ASL0_R_TESTBIT 0x80
42 #define ASL0_R_IRQPENDING (ASL0_R_ISAC | ASL0_R_HSCX | ASL0_R_TIMER)
45 #define ASL0_W_RESET 0x01
46 #define ASL0_W_TDISABLE 0x02
47 #define ASL0_W_TRESET 0x04
48 #define ASL0_W_IRQENABLE 0x08
49 #define ASL0_W_TESTBIT 0x80
52 #define ASL1_W_LED0 0x10
53 #define ASL1_W_LED1 0x20
54 #define ASL1_W_ENABLE_S0 0xC0
56 #define byteout(addr, val) outb(val, addr)
57 #define bytein(addr) inb(addr)
59 static const char *avm_revision =
"$Revision: 2.9.2.5 $";
135 #define READHSCX(cs, nr, reg) ReadHSCX(cs, nr, reg)
136 #define WRITEHSCX(cs, nr, reg, data) WriteHSCX(cs, nr, reg, data)
137 #define READHSCXFIFO(cs, nr, ptr, cnt) ReadHSCXfifo(cs, nr, ptr, cnt)
138 #define WRITEHSCXFIFO(cs, nr, ptr, cnt) WriteHSCXfifo(cs, nr, ptr, cnt)
143 avm_a1p_interrupt(
int intno,
void *
dev_id)
151 if (cs->debug & L1_DEB_INTSTAT)
152 debugl1(cs,
"avm IntStatus %x", sval);
156 hscx_int_main(cs, val);
170 spin_unlock_irqrestore(&cs->lock, flags);
175 AVM_card_msg(
struct IsdnCardState *
cs,
int mt,
void *
arg)
187 spin_unlock_irqrestore(&cs->lock, flags);
202 spin_unlock_irqrestore(&cs->lock, flags);
219 struct IsdnCardState *cs = card->
cs;
223 strcpy(tmp, avm_revision);
229 cs->hw.avm.cfg_reg = card->
para[1];
230 cs->irq = card->
para[0];
245 printk(
KERN_INFO "AVM A1 PCMCIA: io 0x%x irq %d model %d version %d\n",
246 cs->hw.avm.cfg_reg, cs->irq, model, vers);
251 cs->readisacfifo = &ReadISACfifo;
252 cs->writeisacfifo = &WriteISACfifo;
255 cs->BC_Send_Data = &hscx_fill_fifo;
256 cs->cardmsg = &AVM_card_msg;
258 cs->irq_func = &avm_a1p_interrupt;
263 "AVM A1 PCMCIA: wrong HSCX versions check IO address\n");