Lines Matching refs:modem
117 } modem; member
193 outb(0x0e | (!!bc->modem.ser12.tx_bit), MCR(dev->base_addr)); in ser12_tx()
194 if (bc->modem.shreg <= 1) in ser12_tx()
195 bc->modem.shreg = 0x10000 | hdlcdrv_getbits(&bc->hdrv); in ser12_tx()
196 bc->modem.ser12.tx_bit = !(bc->modem.ser12.tx_bit ^ in ser12_tx()
197 (bc->modem.shreg & 1)); in ser12_tx()
198 bc->modem.shreg >>= 1; in ser12_tx()
211 bc->modem.ser12.dcd_shreg = (bc->modem.ser12.dcd_shreg << 1) | in ser12_rx()
212 (cur_s != bc->modem.ser12.last_sample); in ser12_rx()
213 bc->modem.ser12.last_sample = cur_s; in ser12_rx()
214 if(bc->modem.ser12.dcd_shreg & 1) { in ser12_rx()
219 dcdspos += ((bc->modem.ser12.dcd_shreg >> 1) & 1); in ser12_rx()
220 if (!(bc->modem.ser12.dcd_shreg & 0x7ffffffe)) in ser12_rx()
222 dcdsneg += ((bc->modem.ser12.dcd_shreg >> 2) & 1); in ser12_rx()
223 dcdsneg += ((bc->modem.ser12.dcd_shreg >> 3) & 1); in ser12_rx()
224 dcdsneg += ((bc->modem.ser12.dcd_shreg >> 4) & 1); in ser12_rx()
226 bc->modem.ser12.dcd_sum0 += 16*dcdspos - dcdsneg; in ser12_rx()
228 bc->modem.ser12.dcd_sum0--; in ser12_rx()
230 if(!bc->modem.ser12.dcd_time) { in ser12_rx()
231 hdlcdrv_setdcd(&bc->hdrv, (bc->modem.ser12.dcd_sum0 + in ser12_rx()
232 bc->modem.ser12.dcd_sum1 + in ser12_rx()
233 bc->modem.ser12.dcd_sum2) < 0); in ser12_rx()
234 bc->modem.ser12.dcd_sum2 = bc->modem.ser12.dcd_sum1; in ser12_rx()
235 bc->modem.ser12.dcd_sum1 = bc->modem.ser12.dcd_sum0; in ser12_rx()
237 bc->modem.ser12.dcd_sum0 = 2; in ser12_rx()
238 bc->modem.ser12.dcd_time = SER12_DCD_INTERVAL(bc); in ser12_rx()
240 bc->modem.ser12.dcd_time--; in ser12_rx()
245 if (bc->modem.ser12.interm_sample) { in ser12_rx()
254 switch (bc->modem.ser12.dcd_shreg & 7) { in ser12_rx()
271 bc->modem.shreg >>= 1; in ser12_rx()
272 if (bc->modem.ser12.last_sample == in ser12_rx()
273 bc->modem.ser12.last_rxbit) in ser12_rx()
274 bc->modem.shreg |= 0x10000; in ser12_rx()
275 bc->modem.ser12.last_rxbit = in ser12_rx()
276 bc->modem.ser12.last_sample; in ser12_rx()
278 if (++bc->modem.ser12.interm_sample >= 3) in ser12_rx()
279 bc->modem.ser12.interm_sample = 0; in ser12_rx()
283 if (bc->modem.ser12.dcd_shreg & 1) { in ser12_rx()
287 dcdspos += ((bc->modem.ser12.dcd_shreg >> 1) & 1); in ser12_rx()
288 dcdspos += (!(bc->modem.ser12.dcd_shreg & 0x7ffffffe)) in ser12_rx()
290 dcdsneg += ((bc->modem.ser12.dcd_shreg >> 2) & 1); in ser12_rx()
291 dcdsneg += ((bc->modem.ser12.dcd_shreg >> 3) & 1); in ser12_rx()
292 dcdsneg += ((bc->modem.ser12.dcd_shreg >> 4) & 1); in ser12_rx()
294 bc->modem.ser12.dcd_sum0 += 16*dcdspos - dcdsneg; in ser12_rx()
300 if (bc->modem.ser12.interm_sample) { in ser12_rx()
309 switch (bc->modem.ser12.dcd_shreg & 3) { in ser12_rx()
326 bc->modem.shreg >>= 1; in ser12_rx()
327 if (bc->modem.ser12.last_sample == in ser12_rx()
328 bc->modem.ser12.last_rxbit) in ser12_rx()
329 bc->modem.shreg |= 0x10000; in ser12_rx()
330 bc->modem.ser12.last_rxbit = in ser12_rx()
331 bc->modem.ser12.last_sample; in ser12_rx()
333 bc->modem.ser12.interm_sample = !bc->modem.ser12.interm_sample; in ser12_rx()
337 bc->modem.ser12.dcd_sum0 -= (bc->modem.ser12.dcd_shreg & 1); in ser12_rx()
340 if (bc->modem.shreg & 1) { in ser12_rx()
341 hdlcdrv_putbits(&bc->hdrv, bc->modem.shreg >> 1); in ser12_rx()
342 bc->modem.shreg = 0x10000; in ser12_rx()
344 if(!bc->modem.ser12.dcd_time) { in ser12_rx()
348 hdlcdrv_setdcd(&bc->hdrv, (bc->modem.ser12.dcd_sum0 + in ser12_rx()
349 bc->modem.ser12.dcd_sum1 + in ser12_rx()
350 bc->modem.ser12.dcd_sum2) < 0); in ser12_rx()
351 bc->modem.ser12.dcd_sum2 = bc->modem.ser12.dcd_sum1; in ser12_rx()
352 bc->modem.ser12.dcd_sum1 = bc->modem.ser12.dcd_sum0; in ser12_rx()
354 bc->modem.ser12.dcd_sum0 = 2; in ser12_rx()
355 bc->modem.ser12.dcd_time = SER12_DCD_INTERVAL(bc); in ser12_rx()
357 bc->modem.ser12.dcd_time--; in ser12_rx()
392 bc->modem.arb_divider--; in ser12_interrupt()
403 if (bc->modem.arb_divider <= 0) { in ser12_interrupt()
404 bc->modem.arb_divider = SER12_ARB_DIVIDER(bc); in ser12_interrupt()
468 memset(&bc->modem, 0, sizeof(bc->modem)); in ser12_open()