Lines Matching refs:hw
41 cs->hw.njet.auxd &= 0xfc; in NETjet_ReadIC()
42 cs->hw.njet.auxd |= (offset>>4) & 3; in NETjet_ReadIC()
43 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); in NETjet_ReadIC()
44 ret = bytein(cs->hw.njet.isac + ((offset & 0xf)<<2)); in NETjet_ReadIC()
56 cs->hw.njet.auxd &= 0xfc; in NETjet_WriteIC()
57 cs->hw.njet.auxd |= (offset>>4) & 3; in NETjet_WriteIC()
58 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); in NETjet_WriteIC()
59 byteout(cs->hw.njet.isac + ((offset & 0xf)<<2), value); in NETjet_WriteIC()
66 cs->hw.njet.auxd &= 0xfc; in NETjet_ReadICfifo()
67 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); in NETjet_ReadICfifo()
68 insb(cs->hw.njet.isac, data, size); in NETjet_ReadICfifo()
110 cs->hw.njet.auxd &= 0xfc; in NETjet_WriteICfifo()
111 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); in NETjet_WriteICfifo()
112 outsb(cs->hw.njet.isac, data, size); in NETjet_WriteICfifo()
129 if (p > bcs->hw.tiger.s_end) in fill_mem()
130 p = bcs->hw.tiger.send; in fill_mem()
147 fill_mem(bcs, bcs->hw.tiger.send, in mode_tiger()
151 bcs->hw.tiger.r_tot, bcs->hw.tiger.r_err, in mode_tiger()
152 bcs->hw.tiger.s_tot); in mode_tiger()
155 cs->hw.njet.dmactrl = 0; in mode_tiger()
156 byteout(cs->hw.njet.base + NETJET_DMACTRL, in mode_tiger()
157 cs->hw.njet.dmactrl); in mode_tiger()
158 byteout(cs->hw.njet.base + NETJET_IRQMASK0, 0); in mode_tiger()
166 cs->hw.njet.auxd &= led; in mode_tiger()
167 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); in mode_tiger()
174 fill_mem(bcs, bcs->hw.tiger.send, in mode_tiger()
176 bcs->hw.tiger.r_state = HDLC_ZERO_SEARCH; in mode_tiger()
177 bcs->hw.tiger.r_tot = 0; in mode_tiger()
178 bcs->hw.tiger.r_bitcnt = 0; in mode_tiger()
179 bcs->hw.tiger.r_one = 0; in mode_tiger()
180 bcs->hw.tiger.r_err = 0; in mode_tiger()
181 bcs->hw.tiger.s_tot = 0; in mode_tiger()
182 if (! cs->hw.njet.dmactrl) { in mode_tiger()
183 fill_mem(bcs, bcs->hw.tiger.send, in mode_tiger()
185 cs->hw.njet.dmactrl = 1; in mode_tiger()
186 byteout(cs->hw.njet.base + NETJET_DMACTRL, in mode_tiger()
187 cs->hw.njet.dmactrl); in mode_tiger()
188 byteout(cs->hw.njet.base + NETJET_IRQMASK0, 0x0f); in mode_tiger()
191 bcs->hw.tiger.sendp = bcs->hw.tiger.send; in mode_tiger()
192 bcs->hw.tiger.free = NETJET_DMA_TXSIZE; in mode_tiger()
199 cs->hw.njet.auxd |= led; in mode_tiger()
200 byteout(cs->hw.njet.auxa, cs->hw.njet.auxd); in mode_tiger()
206 bytein(cs->hw.njet.base + NETJET_DMACTRL), in mode_tiger()
207 bytein(cs->hw.njet.base + NETJET_IRQMASK0), in mode_tiger()
208 bytein(cs->hw.njet.base + NETJET_IRQSTAT0), in mode_tiger()
209 inl(cs->hw.njet.base + NETJET_DMA_READ_ADR), in mode_tiger()
210 inl(cs->hw.njet.base + NETJET_DMA_WRITE_ADR), in mode_tiger()
211 bytein(cs->hw.njet.base + NETJET_PULSE_CNT)); in mode_tiger()
248 bcs->hw.tiger.sendbuf[s_cnt++] = s_val;\
258 bcs->hw.tiger.sendbuf[s_cnt++] = s_val;\
278 bcs->hw.tiger.sendbuf[s_cnt++] = HDLC_FLAG_VALUE; in make_raw_data()
299 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data()
312 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data()
313 bcs->hw.tiger.sendbuf[s_cnt++] = 0xff; // NJ<->NJ thoughput bug fix in make_raw_data()
315 bcs->hw.tiger.sendcnt = s_cnt; in make_raw_data()
317 bcs->hw.tiger.sp = bcs->hw.tiger.sendbuf; in make_raw_data()
336 bcs->hw.tiger.sendbuf[s_cnt++] = s_val;\
348 bcs->hw.tiger.sendbuf[s_cnt++] = s_val;\
379 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data_56k()
406 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data_56k()
419 bcs->hw.tiger.sendbuf[s_cnt++] = s_val; in make_raw_data_56k()
420 bcs->hw.tiger.sendbuf[s_cnt++] = 0xff; // NJ<->NJ thoughput bug fix in make_raw_data_56k()
422 bcs->hw.tiger.sendcnt = s_cnt; in make_raw_data_56k()
424 bcs->hw.tiger.sp = bcs->hw.tiger.sendbuf; in make_raw_data_56k()
434 memcpy(skb_put(skb, count), bcs->hw.tiger.rcvbuf, count); in got_frame()
442 printframe(bcs->cs, bcs->hw.tiger.rcvbuf, count, "rec"); in got_frame()
451 u_int *pend = bcs->hw.tiger.rec +NETJET_DMA_RXSIZE -1; in read_raw()
452 register u_char state = bcs->hw.tiger.r_state; in read_raw()
453 register u_char r_one = bcs->hw.tiger.r_one; in read_raw()
454 register u_char r_val = bcs->hw.tiger.r_val; in read_raw()
455 register u_int bitcnt = bcs->hw.tiger.r_bitcnt; in read_raw()
472 p = bcs->hw.tiger.rec; in read_raw()
475 bcs->hw.tiger.r_tot++; in read_raw()
489 bcs->hw.tiger.r_tot,i,j,val); in read_raw()
504 bcs->hw.tiger.r_tot,i,j,val); in read_raw()
535 bcs->hw.tiger.r_fcs = PPP_INITFCS; in read_raw()
536 bcs->hw.tiger.rcvbuf[0] = r_val; in read_raw()
537 bcs->hw.tiger.r_fcs = PPP_FCS (bcs->hw.tiger.r_fcs, r_val); in read_raw()
540 bcs->hw.tiger.r_tot,i,j,r_val,val, in read_raw()
541 bcs->cs->hw.njet.irqstat0); in read_raw()
562 bcs->hw.tiger.r_err++; in read_raw()
569 i,j,bcs->hw.tiger.r_fcs, bcs->cs->hw.njet.irqstat0); in read_raw()
570 if (bcs->hw.tiger.r_fcs == PPP_GOODFCS) { in read_raw()
575 printframe(bcs->cs, bcs->hw.tiger.rcvbuf, in read_raw()
577 bcs->hw.tiger.r_err++; in read_raw()
603 bcs->hw.tiger.r_err++; in read_raw()
608 bcs->hw.tiger.rcvbuf[(bitcnt>>3)-1] = r_val; in read_raw()
609 bcs->hw.tiger.r_fcs = in read_raw()
610 PPP_FCS (bcs->hw.tiger.r_fcs, r_val); in read_raw()
616 bcs->hw.tiger.r_tot++; in read_raw()
618 bcs->hw.tiger.r_state = state; in read_raw()
619 bcs->hw.tiger.r_one = r_one; in read_raw()
620 bcs->hw.tiger.r_val = r_val; in read_raw()
621 bcs->hw.tiger.r_bitcnt = bitcnt; in read_raw()
628 if ((cs->hw.njet.irqstat0 & cs->hw.njet.last_is0) & NETJET_IRQM0_READ) { in read_tiger()
630 cs->hw.njet.irqstat0, cs->hw.njet.last_is0); in read_tiger()
639 cs->hw.njet.last_is0 &= ~NETJET_IRQM0_READ; in read_tiger()
640 cs->hw.njet.last_is0 |= (cs->hw.njet.irqstat0 & NETJET_IRQM0_READ); in read_tiger()
642 if (cs->hw.njet.irqstat0 & NETJET_IRQM0_READ_1) in read_tiger()
643 p = cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE - 1; in read_tiger()
645 p = cs->bcs[0].hw.tiger.rec + cnt - 1; in read_tiger()
651 cs->hw.njet.irqstat0 &= ~NETJET_IRQM0_READ; in read_tiger()
680 write_raw(bcs, bcs->hw.tiger.sendp, bcs->hw.tiger.free); in netjet_fill_dma()
682 p = bus_to_virt(inl(bcs->cs->hw.njet.base + NETJET_DMA_READ_ADR)); in netjet_fill_dma()
683 sp = bcs->hw.tiger.sendp; in netjet_fill_dma()
684 if (p == bcs->hw.tiger.s_end) in netjet_fill_dma()
685 p = bcs->hw.tiger.send -1; in netjet_fill_dma()
686 if (sp == bcs->hw.tiger.s_end) in netjet_fill_dma()
687 sp = bcs->hw.tiger.send -1; in netjet_fill_dma()
690 write_raw(bcs, bcs->hw.tiger.sendp, bcs->hw.tiger.free); in netjet_fill_dma()
694 if (p > bcs->hw.tiger.s_end) in netjet_fill_dma()
695 p = bcs->hw.tiger.send; in netjet_fill_dma()
698 if (p > bcs->hw.tiger.s_end) in netjet_fill_dma()
699 p = bcs->hw.tiger.send; in netjet_fill_dma()
700 write_raw(bcs, p, bcs->hw.tiger.free - cnt); in netjet_fill_dma()
703 p = bus_to_virt(inl(bcs->cs->hw.njet.base + NETJET_DMA_READ_ADR)); in netjet_fill_dma()
704 cnt = bcs->hw.tiger.s_end - p; in netjet_fill_dma()
706 p = bcs->hw.tiger.send + 1; in netjet_fill_dma()
730 if (bcs->hw.tiger.sendcnt> cnt) { in write_raw()
732 bcs->hw.tiger.sendcnt -= cnt; in write_raw()
734 s_cnt = bcs->hw.tiger.sendcnt; in write_raw()
735 bcs->hw.tiger.sendcnt = 0; in write_raw()
742 val = bcs->channel ? ((bcs->hw.tiger.sp[i] <<8) & 0xff00) : in write_raw()
743 (bcs->hw.tiger.sp[i]); in write_raw()
746 if (p>bcs->hw.tiger.s_end) in write_raw()
747 p = bcs->hw.tiger.send; in write_raw()
749 bcs->hw.tiger.s_tot += s_cnt; in write_raw()
753 bcs->hw.tiger.sendcnt, bcs->cs->hw.njet.irqstat0); in write_raw()
755 printframe(bcs->cs, bcs->hw.tiger.sp, s_cnt, "snd"); in write_raw()
756 bcs->hw.tiger.sp += s_cnt; in write_raw()
757 bcs->hw.tiger.sendp = p; in write_raw()
758 if (!bcs->hw.tiger.sendcnt) { in write_raw()
769 bcs->hw.tiger.free = cnt - s_cnt; in write_raw()
770 if (bcs->hw.tiger.free > (NETJET_DMA_TXSIZE/2)) in write_raw()
783 if (p>bcs->hw.tiger.s_end) in write_raw()
784 p = bcs->hw.tiger.send; in write_raw()
798 bcs->hw.tiger.free += cnt; in write_raw()
812 if ((cs->hw.njet.irqstat0 & cs->hw.njet.last_is0) & NETJET_IRQM0_WRITE) { in write_tiger()
814 cs->hw.njet.irqstat0, cs->hw.njet.last_is0); in write_tiger()
823 cs->hw.njet.last_is0 &= ~NETJET_IRQM0_WRITE; in write_tiger()
824 cs->hw.njet.last_is0 |= (cs->hw.njet.irqstat0 & NETJET_IRQM0_WRITE); in write_tiger()
826 if (cs->hw.njet.irqstat0 & NETJET_IRQM0_WRITE_1) in write_tiger()
827 p = cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE - 1; in write_tiger()
829 p = cs->bcs[0].hw.tiger.send + cnt - 1; in write_tiger()
834 cs->hw.njet.irqstat0 &= ~NETJET_IRQM0_WRITE; in write_tiger()
901 if (bcs->hw.tiger.rcvbuf) { in close_tigerstate()
902 kfree(bcs->hw.tiger.rcvbuf); in close_tigerstate()
903 bcs->hw.tiger.rcvbuf = NULL; in close_tigerstate()
905 if (bcs->hw.tiger.sendbuf) { in close_tigerstate()
906 kfree(bcs->hw.tiger.sendbuf); in close_tigerstate()
907 bcs->hw.tiger.sendbuf = NULL; in close_tigerstate()
923 if (!(bcs->hw.tiger.rcvbuf = kmalloc(HSCX_BUFMAX, GFP_ATOMIC))) { in open_tigerstate()
928 if (!(bcs->hw.tiger.sendbuf = kmalloc(RAW_BUFMAX, GFP_ATOMIC))) { in open_tigerstate()
937 bcs->hw.tiger.sendcnt = 0; in open_tigerstate()
962 if (!(cs->bcs[0].hw.tiger.send = kmalloc(NETJET_DMA_TXSIZE * sizeof(unsigned int), in inittiger()
968 cs->bcs[0].hw.tiger.s_irq = cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE/2 - 1; in inittiger()
969 cs->bcs[0].hw.tiger.s_end = cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE - 1; in inittiger()
970 cs->bcs[1].hw.tiger.send = cs->bcs[0].hw.tiger.send; in inittiger()
971 cs->bcs[1].hw.tiger.s_irq = cs->bcs[0].hw.tiger.s_irq; in inittiger()
972 cs->bcs[1].hw.tiger.s_end = cs->bcs[0].hw.tiger.s_end; in inittiger()
974 memset(cs->bcs[0].hw.tiger.send, 0xff, NETJET_DMA_TXSIZE * sizeof(unsigned int)); in inittiger()
975 debugl1(cs, "tiger: send buf %x - %x", (u_int)cs->bcs[0].hw.tiger.send, in inittiger()
976 (u_int)(cs->bcs[0].hw.tiger.send + NETJET_DMA_TXSIZE - 1)); in inittiger()
977 outl(virt_to_bus(cs->bcs[0].hw.tiger.send), in inittiger()
978 cs->hw.njet.base + NETJET_DMA_READ_START); in inittiger()
979 outl(virt_to_bus(cs->bcs[0].hw.tiger.s_irq), in inittiger()
980 cs->hw.njet.base + NETJET_DMA_READ_IRQ); in inittiger()
981 outl(virt_to_bus(cs->bcs[0].hw.tiger.s_end), in inittiger()
982 cs->hw.njet.base + NETJET_DMA_READ_END); in inittiger()
983 if (!(cs->bcs[0].hw.tiger.rec = kmalloc(NETJET_DMA_RXSIZE * sizeof(unsigned int), in inittiger()
989 debugl1(cs, "tiger: rec buf %x - %x", (u_int)cs->bcs[0].hw.tiger.rec, in inittiger()
990 (u_int)(cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE - 1)); in inittiger()
991 cs->bcs[1].hw.tiger.rec = cs->bcs[0].hw.tiger.rec; in inittiger()
992 memset(cs->bcs[0].hw.tiger.rec, 0xff, NETJET_DMA_RXSIZE * sizeof(unsigned int)); in inittiger()
993 outl(virt_to_bus(cs->bcs[0].hw.tiger.rec), in inittiger()
994 cs->hw.njet.base + NETJET_DMA_WRITE_START); in inittiger()
995 outl(virt_to_bus(cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE/2 - 1), in inittiger()
996 cs->hw.njet.base + NETJET_DMA_WRITE_IRQ); in inittiger()
997 outl(virt_to_bus(cs->bcs[0].hw.tiger.rec + NETJET_DMA_RXSIZE - 1), in inittiger()
998 cs->hw.njet.base + NETJET_DMA_WRITE_END); in inittiger()
1000 inl(cs->hw.njet.base + NETJET_DMA_WRITE_ADR), in inittiger()
1001 inl(cs->hw.njet.base + NETJET_DMA_READ_ADR), in inittiger()
1002 bytein(cs->hw.njet.base + NETJET_PULSE_CNT)); in inittiger()
1003 cs->hw.njet.last_is0 = 0; in inittiger()
1013 if (cs->bcs[0].hw.tiger.send) { in releasetiger()
1014 kfree(cs->bcs[0].hw.tiger.send); in releasetiger()
1015 cs->bcs[0].hw.tiger.send = NULL; in releasetiger()
1017 if (cs->bcs[1].hw.tiger.send) { in releasetiger()
1018 cs->bcs[1].hw.tiger.send = NULL; in releasetiger()
1020 if (cs->bcs[0].hw.tiger.rec) { in releasetiger()
1021 kfree(cs->bcs[0].hw.tiger.rec); in releasetiger()
1022 cs->bcs[0].hw.tiger.rec = NULL; in releasetiger()
1024 if (cs->bcs[1].hw.tiger.rec) { in releasetiger()
1025 cs->bcs[1].hw.tiger.rec = NULL; in releasetiger()
1032 byteout(cs->hw.njet.base + NETJET_IRQMASK0, 0); in release_io_netjet()
1033 byteout(cs->hw.njet.base + NETJET_IRQMASK1, 0); in release_io_netjet()
1035 release_region(cs->hw.njet.base, 256); in release_io_netjet()