• Home
  • Raw
  • Download

Lines Matching full:cs

103 ReadISAC(struct IsdnCardState *cs, u_char offset)  in ReadISAC()  argument
105 cs->hw.hfc.cip = offset; in ReadISAC()
106 return (readreg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, offset)); in ReadISAC()
110 WriteISAC(struct IsdnCardState *cs, u_char offset, u_char value) in WriteISAC() argument
112 cs->hw.hfc.cip = offset; in WriteISAC()
113 writereg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, offset, value); in WriteISAC()
117 ReadISACfifo(struct IsdnCardState *cs, u_char *data, int size) in ReadISACfifo() argument
119 cs->hw.hfc.cip = 0; in ReadISACfifo()
120 readfifo(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, 0, data, size); in ReadISACfifo()
124 WriteISACfifo(struct IsdnCardState *cs, u_char *data, int size) in WriteISACfifo() argument
126 cs->hw.hfc.cip = 0; in WriteISACfifo()
127 writefifo(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, 0, data, size); in WriteISACfifo()
131 ReadHFC(struct IsdnCardState *cs, int data, u_char reg) in ReadHFC() argument
136 cs->hw.hfc.cip = reg; in ReadHFC()
137 byteout(cs->hw.hfc.addr | 1, reg); in ReadHFC()
138 ret = bytein(cs->hw.hfc.addr); in ReadHFC()
139 if (cs->debug & L1_DEB_HSCX_FIFO && (data != 2)) in ReadHFC()
140 debugl1(cs, "hfc RD %02x %02x", reg, ret); in ReadHFC()
142 ret = bytein(cs->hw.hfc.addr | 1); in ReadHFC()
147 WriteHFC(struct IsdnCardState *cs, int data, u_char reg, u_char value) in WriteHFC() argument
149 byteout(cs->hw.hfc.addr | 1, reg); in WriteHFC()
150 cs->hw.hfc.cip = reg; in WriteHFC()
152 byteout(cs->hw.hfc.addr, value); in WriteHFC()
153 if (cs->debug & L1_DEB_HSCX_FIFO && (data != 2)) in WriteHFC()
154 debugl1(cs, "hfc W%c %02x %02x", data ? 'D' : 'C', reg, value); in WriteHFC()
160 struct IsdnCardState *cs = dev_id; in TeleInt_interrupt() local
164 spin_lock_irqsave(&cs->lock, flags); in TeleInt_interrupt()
165 val = readreg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, ISAC_ISTA); in TeleInt_interrupt()
168 isac_interrupt(cs, val); in TeleInt_interrupt()
169 val = readreg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, ISAC_ISTA); in TeleInt_interrupt()
171 if (cs->debug & L1_DEB_ISAC) in TeleInt_interrupt()
172 debugl1(cs, "ISAC IntStat after IntRoutine"); in TeleInt_interrupt()
175 writereg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, ISAC_MASK, 0xFF); in TeleInt_interrupt()
176 writereg(cs->hw.hfc.addr | 1, cs->hw.hfc.addr, ISAC_MASK, 0x0); in TeleInt_interrupt()
177 spin_unlock_irqrestore(&cs->lock, flags); in TeleInt_interrupt()
184 struct IsdnCardState *cs = from_timer(cs, t, hw.hfc.timer); in TeleInt_Timer() local
188 spin_lock_irqsave(&cs->lock, flags); in TeleInt_Timer()
189 if (cs->bcs[0].mode) { in TeleInt_Timer()
191 main_irq_hfc(&cs->bcs[0]); in TeleInt_Timer()
193 if (cs->bcs[1].mode) { in TeleInt_Timer()
195 main_irq_hfc(&cs->bcs[1]); in TeleInt_Timer()
197 spin_unlock_irqrestore(&cs->lock, flags); in TeleInt_Timer()
201 cs->hw.hfc.timer.expires = jiffies + stat; in TeleInt_Timer()
202 add_timer(&cs->hw.hfc.timer); in TeleInt_Timer()
206 release_io_TeleInt(struct IsdnCardState *cs) in release_io_TeleInt() argument
208 del_timer(&cs->hw.hfc.timer); in release_io_TeleInt()
209 releasehfc(cs); in release_io_TeleInt()
210 if (cs->hw.hfc.addr) in release_io_TeleInt()
211 release_region(cs->hw.hfc.addr, 2); in release_io_TeleInt()
215 reset_TeleInt(struct IsdnCardState *cs) in reset_TeleInt() argument
218 cs->hw.hfc.cirm |= HFC_RESET; in reset_TeleInt()
219 byteout(cs->hw.hfc.addr | 1, cs->hw.hfc.cirm); /* Reset On */ in reset_TeleInt()
221 cs->hw.hfc.cirm &= ~HFC_RESET; in reset_TeleInt()
222 byteout(cs->hw.hfc.addr | 1, cs->hw.hfc.cirm); /* Reset Off */ in reset_TeleInt()
227 TeleInt_card_msg(struct IsdnCardState *cs, int mt, void *arg) in TeleInt_card_msg() argument
234 spin_lock_irqsave(&cs->lock, flags); in TeleInt_card_msg()
235 reset_TeleInt(cs); in TeleInt_card_msg()
236 spin_unlock_irqrestore(&cs->lock, flags); in TeleInt_card_msg()
239 release_io_TeleInt(cs); in TeleInt_card_msg()
242 spin_lock_irqsave(&cs->lock, flags); in TeleInt_card_msg()
243 reset_TeleInt(cs); in TeleInt_card_msg()
244 inithfc(cs); in TeleInt_card_msg()
245 clear_pending_isac_ints(cs); in TeleInt_card_msg()
246 initisac(cs); in TeleInt_card_msg()
248 cs->writeisac(cs, ISAC_MASK, 0); in TeleInt_card_msg()
249 cs->writeisac(cs, ISAC_CMDR, 0x41); in TeleInt_card_msg()
250 spin_unlock_irqrestore(&cs->lock, flags); in TeleInt_card_msg()
254 cs->hw.hfc.timer.expires = jiffies + delay; in TeleInt_card_msg()
255 add_timer(&cs->hw.hfc.timer); in TeleInt_card_msg()
265 struct IsdnCardState *cs = card->cs; in setup_TeleInt() local
270 if (cs->typ != ISDN_CTYPE_TELEINT) in setup_TeleInt()
273 cs->hw.hfc.addr = card->para[1] & 0x3fe; in setup_TeleInt()
274 cs->irq = card->para[0]; in setup_TeleInt()
275 cs->hw.hfc.cirm = HFC_CIRM; in setup_TeleInt()
276 cs->hw.hfc.isac_spcr = 0x00; in setup_TeleInt()
277 cs->hw.hfc.cip = 0; in setup_TeleInt()
278 cs->hw.hfc.ctmt = HFC_CTMT | HFC_CLTIMER; in setup_TeleInt()
279 cs->bcs[0].hw.hfc.send = NULL; in setup_TeleInt()
280 cs->bcs[1].hw.hfc.send = NULL; in setup_TeleInt()
281 cs->hw.hfc.fifosize = 7 * 1024 + 512; in setup_TeleInt()
282 timer_setup(&cs->hw.hfc.timer, TeleInt_Timer, 0); in setup_TeleInt()
283 if (!request_region(cs->hw.hfc.addr, 2, "TeleInt isdn")) { in setup_TeleInt()
286 cs->hw.hfc.addr, in setup_TeleInt()
287 cs->hw.hfc.addr + 2); in setup_TeleInt()
291 byteout(cs->hw.hfc.addr, cs->hw.hfc.addr & 0xff); in setup_TeleInt()
292 byteout(cs->hw.hfc.addr | 1, ((cs->hw.hfc.addr & 0x300) >> 8) | 0x54); in setup_TeleInt()
293 switch (cs->irq) { in setup_TeleInt()
295 cs->hw.hfc.cirm |= HFC_INTA; in setup_TeleInt()
298 cs->hw.hfc.cirm |= HFC_INTB; in setup_TeleInt()
301 cs->hw.hfc.cirm |= HFC_INTC; in setup_TeleInt()
304 cs->hw.hfc.cirm |= HFC_INTD; in setup_TeleInt()
307 cs->hw.hfc.cirm |= HFC_INTE; in setup_TeleInt()
310 cs->hw.hfc.cirm |= HFC_INTF; in setup_TeleInt()
314 release_io_TeleInt(cs); in setup_TeleInt()
317 byteout(cs->hw.hfc.addr | 1, cs->hw.hfc.cirm); in setup_TeleInt()
318 byteout(cs->hw.hfc.addr | 1, cs->hw.hfc.ctmt); in setup_TeleInt()
321 cs->hw.hfc.addr, cs->irq); in setup_TeleInt()
323 setup_isac(cs); in setup_TeleInt()
324 cs->readisac = &ReadISAC; in setup_TeleInt()
325 cs->writeisac = &WriteISAC; in setup_TeleInt()
326 cs->readisacfifo = &ReadISACfifo; in setup_TeleInt()
327 cs->writeisacfifo = &WriteISACfifo; in setup_TeleInt()
328 cs->BC_Read_Reg = &ReadHFC; in setup_TeleInt()
329 cs->BC_Write_Reg = &WriteHFC; in setup_TeleInt()
330 cs->cardmsg = &TeleInt_card_msg; in setup_TeleInt()
331 cs->irq_func = &TeleInt_interrupt; in setup_TeleInt()
332 ISACVersion(cs, "TeleInt:"); in setup_TeleInt()