Lines Matching refs:hfc

29 				      (cs->hw.hfc.cip & 3));
61 if (bcs->hw.hfc.f1 == bcs->hw.hfc.f2)
62 return (bcs->cs->hw.hfc.fifosize);
63 s = bcs->hw.hfc.send[bcs->hw.hfc.f1] - bcs->hw.hfc.send[bcs->hw.hfc.f2];
65 s += bcs->cs->hw.hfc.fifosize;
66 s = bcs->cs->hw.hfc.fifosize - s;
93 if ((cip & 0xc3) != (cs->hw.hfc.cip & 0xc3)) {
107 debugl1(cs, "hfc clear %d f1(%d) f2(%d)",
111 rcnt += cs->hw.hfc.fifosize;
115 debugl1(cs, "hfc clear %d z1(%x) z2(%x) cnt(%d)",
251 if ((cip & 0xc3) != (cs->hw.hfc.cip & 0xc3)) {
257 bcs->hw.hfc.f1 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
260 bcs->hw.hfc.f2 = cs->BC_Read_Reg(cs, HFC_DATA, cip);
261 bcs->hw.hfc.send[bcs->hw.hfc.f1] = ReadZReg(bcs, HFC_Z1 | HFC_SEND | HFC_CHANNEL(bcs->channel));
264 bcs->channel, bcs->hw.hfc.f1, bcs->hw.hfc.f2,
265 bcs->hw.hfc.send[bcs->hw.hfc.f1]);
266 fcnt = bcs->hw.hfc.f1 - bcs->hw.hfc.f2;
282 count += cs->hw.hfc.fifosize;
337 if ((cip & 0xc3) != (cs->hw.hfc.cip & 0xc3)) {
350 debugl1(cs, "hfc rec %d f1(%d) f2(%d)",
361 rcnt += cs->hw.hfc.fifosize;
365 debugl1(cs, "hfc rec %d z1(%x) z2(%x) cnt(%d)",
412 cs->hw.hfc.ctmt &= ~1;
413 cs->hw.hfc.isac_spcr &= ~0x03;
416 cs->hw.hfc.ctmt &= ~2;
417 cs->hw.hfc.isac_spcr &= ~0x0c;
421 cs->hw.hfc.ctmt &= ~(1 << bc); /* set HDLC mode */
422 cs->BC_Write_Reg(cs, HFC_STATUS, cs->hw.hfc.ctmt, cs->hw.hfc.ctmt);
425 cs->hw.hfc.ctmt |= 1;
426 cs->hw.hfc.isac_spcr &= ~0x03;
427 cs->hw.hfc.isac_spcr |= 0x02;
429 cs->hw.hfc.ctmt |= 2;
430 cs->hw.hfc.isac_spcr &= ~0x0c;
431 cs->hw.hfc.isac_spcr |= 0x08;
436 cs->hw.hfc.ctmt &= ~1;
437 cs->hw.hfc.isac_spcr &= ~0x03;
438 cs->hw.hfc.isac_spcr |= 0x02;
440 cs->hw.hfc.ctmt &= ~2;
441 cs->hw.hfc.isac_spcr &= ~0x0c;
442 cs->hw.hfc.isac_spcr |= 0x08;
446 cs->BC_Write_Reg(cs, HFC_STATUS, cs->hw.hfc.ctmt, cs->hw.hfc.ctmt);
447 cs->writeisac(cs, ISAC_SPCR, cs->hw.hfc.isac_spcr);
560 if (!(bcs->hw.hfc.send = kmalloc(32 * sizeof(unsigned int), GFP_ATOMIC))) {
562 "HiSax: No memory for hfc.send\n");
566 bcs->hw.hfc.send[i] = 0x1fff;
586 kfree(cs->bcs[0].hw.hfc.send);
587 cs->bcs[0].hw.hfc.send = NULL;
588 kfree(cs->bcs[1].hw.hfc.send);
589 cs->bcs[1].hw.hfc.send = NULL;