Lines Matching refs:cs
26 HscxVersion(struct IsdnCardState *cs, char *s) in HscxVersion() argument
30 verA = cs->BC_Read_Reg(cs, 0, HSCX_VSTR) & 0xf; in HscxVersion()
31 verB = cs->BC_Read_Reg(cs, 1, HSCX_VSTR) & 0xf; in HscxVersion()
43 struct IsdnCardState *cs = bcs->cs; in modehscx() local
46 if (cs->debug & L1_DEB_HSCX) in modehscx()
47 debugl1(cs, "hscx %c mode %d ichan %d", in modehscx()
51 cs->BC_Write_Reg(cs, hscx, HSCX_XAD1, 0xFF); in modehscx()
52 cs->BC_Write_Reg(cs, hscx, HSCX_XAD2, 0xFF); in modehscx()
53 cs->BC_Write_Reg(cs, hscx, HSCX_RAH2, 0xFF); in modehscx()
54 cs->BC_Write_Reg(cs, hscx, HSCX_XBCH, 0x0); in modehscx()
55 cs->BC_Write_Reg(cs, hscx, HSCX_RLCR, 0x0); in modehscx()
56 cs->BC_Write_Reg(cs, hscx, HSCX_CCR1, in modehscx()
57 test_bit(HW_IPAC, &cs->HW_Flags) ? 0x82 : 0x85); in modehscx()
58 cs->BC_Write_Reg(cs, hscx, HSCX_CCR2, 0x30); in modehscx()
59 cs->BC_Write_Reg(cs, hscx, HSCX_XCCR, 7); in modehscx()
60 cs->BC_Write_Reg(cs, hscx, HSCX_RCCR, 7); in modehscx()
63 if (test_bit(HW_IOM1, &cs->HW_Flags) && (hscx == 0)) in modehscx()
67 cs->BC_Write_Reg(cs, hscx, HSCX_TSAX, in modehscx()
68 test_bit(HW_IOM1, &cs->HW_Flags) ? 0x7 : bcs->hw.hscx.tsaxr0); in modehscx()
69 cs->BC_Write_Reg(cs, hscx, HSCX_TSAR, in modehscx()
70 test_bit(HW_IOM1, &cs->HW_Flags) ? 0x7 : bcs->hw.hscx.tsaxr0); in modehscx()
72 cs->BC_Write_Reg(cs, hscx, HSCX_TSAX, bcs->hw.hscx.tsaxr1); in modehscx()
73 cs->BC_Write_Reg(cs, hscx, HSCX_TSAR, bcs->hw.hscx.tsaxr1); in modehscx()
77 cs->BC_Write_Reg(cs, hscx, HSCX_TSAX, 0x1f); in modehscx()
78 cs->BC_Write_Reg(cs, hscx, HSCX_TSAR, 0x1f); in modehscx()
79 cs->BC_Write_Reg(cs, hscx, HSCX_MODE, 0x84); in modehscx()
82 cs->BC_Write_Reg(cs, hscx, HSCX_MODE, 0xe4); in modehscx()
85 cs->BC_Write_Reg(cs, hscx, HSCX_CCR1, in modehscx()
86 test_bit(HW_IPAC, &cs->HW_Flags) ? 0x8a : 0x8d); in modehscx()
87 cs->BC_Write_Reg(cs, hscx, HSCX_MODE, 0x8c); in modehscx()
91 cs->BC_Write_Reg(cs, hscx, HSCX_CMDR, 0x41); in modehscx()
92 cs->BC_Write_Reg(cs, hscx, HSCX_ISTA, 0x00); in modehscx()
104 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
111 bcs->cs->BC_Send_Data(bcs); in hscx_l2l1()
113 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
116 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
123 bcs->cs->BC_Send_Data(bcs); in hscx_l2l1()
125 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
135 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
138 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
145 spin_lock_irqsave(&bcs->cs->lock, flags); in hscx_l2l1()
149 spin_unlock_irqrestore(&bcs->cs->lock, flags); in hscx_l2l1()
175 open_hscxstate(struct IsdnCardState *cs, struct BCState *bcs) in open_hscxstate() argument
218 clear_pending_hscx_ints(struct IsdnCardState *cs) in clear_pending_hscx_ints() argument
222 val = cs->BC_Read_Reg(cs, 1, HSCX_ISTA); in clear_pending_hscx_ints()
223 debugl1(cs, "HSCX B ISTA %x", val); in clear_pending_hscx_ints()
225 eval = cs->BC_Read_Reg(cs, 1, HSCX_EXIR); in clear_pending_hscx_ints()
226 debugl1(cs, "HSCX B EXIR %x", eval); in clear_pending_hscx_ints()
229 eval = cs->BC_Read_Reg(cs, 0, HSCX_EXIR); in clear_pending_hscx_ints()
230 debugl1(cs, "HSCX A EXIR %x", eval); in clear_pending_hscx_ints()
232 val = cs->BC_Read_Reg(cs, 0, HSCX_ISTA); in clear_pending_hscx_ints()
233 debugl1(cs, "HSCX A ISTA %x", val); in clear_pending_hscx_ints()
234 val = cs->BC_Read_Reg(cs, 1, HSCX_STAR); in clear_pending_hscx_ints()
235 debugl1(cs, "HSCX B STAR %x", val); in clear_pending_hscx_ints()
236 val = cs->BC_Read_Reg(cs, 0, HSCX_STAR); in clear_pending_hscx_ints()
237 debugl1(cs, "HSCX A STAR %x", val); in clear_pending_hscx_ints()
239 cs->BC_Write_Reg(cs, 0, HSCX_MASK, 0xFF); in clear_pending_hscx_ints()
240 cs->BC_Write_Reg(cs, 1, HSCX_MASK, 0xFF); in clear_pending_hscx_ints()
244 inithscx(struct IsdnCardState *cs) in inithscx() argument
246 cs->bcs[0].BC_SetStack = setstack_hscx; in inithscx()
247 cs->bcs[1].BC_SetStack = setstack_hscx; in inithscx()
248 cs->bcs[0].BC_Close = close_hscxstate; in inithscx()
249 cs->bcs[1].BC_Close = close_hscxstate; in inithscx()
250 cs->bcs[0].hw.hscx.hscx = 0; in inithscx()
251 cs->bcs[1].hw.hscx.hscx = 1; in inithscx()
252 cs->bcs[0].hw.hscx.tsaxr0 = 0x2f; in inithscx()
253 cs->bcs[0].hw.hscx.tsaxr1 = 3; in inithscx()
254 cs->bcs[1].hw.hscx.tsaxr0 = 0x2f; in inithscx()
255 cs->bcs[1].hw.hscx.tsaxr1 = 3; in inithscx()
256 modehscx(cs->bcs, 0, 0); in inithscx()
257 modehscx(cs->bcs + 1, 0, 0); in inithscx()
261 inithscxisac(struct IsdnCardState *cs, int part) in inithscxisac() argument
264 clear_pending_isac_ints(cs); in inithscxisac()
265 clear_pending_hscx_ints(cs); in inithscxisac()
266 initisac(cs); in inithscxisac()
267 inithscx(cs); in inithscxisac()
271 cs->writeisac(cs, ISAC_MASK, 0); in inithscxisac()
272 cs->BC_Write_Reg(cs, 0, HSCX_MASK, 0); in inithscxisac()
273 cs->BC_Write_Reg(cs, 1, HSCX_MASK, 0); in inithscxisac()
275 cs->writeisac(cs, ISAC_CMDR, 0x41); in inithscxisac()