Lines Matching refs:elsa
51 u_int val = inb(cs->hw.elsa.base + 8 + offset); in serial_in()
55 return inb(cs->hw.elsa.base + 8 + offset); in serial_in()
63 u_int val = inb(cs->hw.elsa.base + 8 + offset); in serial_inp()
66 u_int val = inb_p(cs->hw.elsa.base + 8 + offset); in serial_inp()
72 return inb(cs->hw.elsa.base + 8 + offset); in serial_inp()
74 return inb_p(cs->hw.elsa.base + 8 + offset); in serial_inp()
84 outb(value, cs->hw.elsa.base + 8 + offset); in serial_out()
98 outb(value, cs->hw.elsa.base + 8 + offset); in serial_outp()
100 outb_p(value, cs->hw.elsa.base + 8 + offset); in serial_outp()
132 cs->hw.elsa.IER &= ~UART_IER_MSI; in change_speed()
133 cs->hw.elsa.IER |= UART_IER_MSI; in change_speed()
134 serial_outp(cs, UART_IER, cs->hw.elsa.IER); in change_speed()
183 cs->hw.elsa.MCR = 0; in mstartup()
184 cs->hw.elsa.MCR = UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2; in mstartup()
185 serial_outp(cs, UART_MCR, cs->hw.elsa.MCR); in mstartup()
190 cs->hw.elsa.IER = UART_IER_MSI | UART_IER_RLSI | UART_IER_RDI; in mstartup()
191 serial_outp(cs, UART_IER, cs->hw.elsa.IER); /* enable interrupts */ in mstartup()
201 cs->hw.elsa.transcnt = cs->hw.elsa.transp = 0; in mstartup()
202 cs->hw.elsa.rcvcnt = cs->hw.elsa.rcvp =0; in mstartup()
208 cs->hw.elsa.MFlag = 1; in mstartup()
234 cs->hw.elsa.IER = 0; in mshutdown()
236 cs->hw.elsa.MCR &= ~UART_MCR_OUT2; in mshutdown()
241 cs->hw.elsa.MCR &= ~(UART_MCR_DTR|UART_MCR_RTS); in mshutdown()
242 serial_outp(cs, UART_MCR, cs->hw.elsa.MCR); in mshutdown()
268 if (len > MAX_MODEM_BUF - cs->hw.elsa.transcnt) in write_modem()
269 len = MAX_MODEM_BUF - cs->hw.elsa.transcnt; in write_modem()
270 fp = cs->hw.elsa.transcnt + cs->hw.elsa.transp; in write_modem()
275 memcpy(cs->hw.elsa.transbuf + fp, bcs->tx_skb->data, count); in write_modem()
277 cs->hw.elsa.transcnt += count; in write_modem()
282 memcpy((cs->hw.elsa.transbuf + fp), bcs->tx_skb->data, count); in write_modem()
284 cs->hw.elsa.transcnt += count; in write_modem()
287 if (cs->hw.elsa.transcnt && in write_modem()
288 !(cs->hw.elsa.IER & UART_IER_THRI)) { in write_modem()
289 cs->hw.elsa.IER |= UART_IER_THRI; in write_modem()
290 serial_outp(cs, UART_IER, cs->hw.elsa.IER); in write_modem()
330 if (cs->hw.elsa.rcvcnt >= MAX_MODEM_BUF) in receive_chars()
332 cs->hw.elsa.rcvbuf[cs->hw.elsa.rcvcnt++] = ch; in receive_chars()
345 if (cs->hw.elsa.MFlag == 2) { in receive_chars()
346 if (!(skb = dev_alloc_skb(cs->hw.elsa.rcvcnt))) in receive_chars()
349 memcpy(skb_put(skb, cs->hw.elsa.rcvcnt), cs->hw.elsa.rcvbuf, in receive_chars()
350 cs->hw.elsa.rcvcnt); in receive_chars()
351 skb_queue_tail(& cs->hw.elsa.bcs->rqueue, skb); in receive_chars()
353 hscx_sched_event(cs->hw.elsa.bcs, B_RCVBUFREADY); in receive_chars()
358 t += sprintf(t, "modem read cnt %d", cs->hw.elsa.rcvcnt); in receive_chars()
359 QuickHex(t, cs->hw.elsa.rcvbuf, cs->hw.elsa.rcvcnt); in receive_chars()
362 cs->hw.elsa.rcvcnt = 0; in receive_chars()
369 debugl1(cs, "transmit_chars: p(%x) cnt(%x)", cs->hw.elsa.transp, in transmit_chars()
370 cs->hw.elsa.transcnt); in transmit_chars()
372 if (cs->hw.elsa.transcnt <= 0) { in transmit_chars()
373 cs->hw.elsa.IER &= ~UART_IER_THRI; in transmit_chars()
374 serial_out(cs, UART_IER, cs->hw.elsa.IER); in transmit_chars()
379 serial_outp(cs, UART_TX, cs->hw.elsa.transbuf[cs->hw.elsa.transp++]); in transmit_chars()
380 if (cs->hw.elsa.transp >= MAX_MODEM_BUF) in transmit_chars()
381 cs->hw.elsa.transp=0; in transmit_chars()
382 if (--cs->hw.elsa.transcnt <= 0) in transmit_chars()
385 if ((cs->hw.elsa.transcnt < WAKEUP_CHARS) && (cs->hw.elsa.MFlag==2)) in transmit_chars()
386 modem_fill(cs->hw.elsa.bcs); in transmit_chars()
393 if (cs->hw.elsa.transcnt <= 0) { in transmit_chars()
394 cs->hw.elsa.IER &= ~UART_IER_THRI; in transmit_chars()
395 serial_outp(cs, UART_IER, cs->hw.elsa.IER); in transmit_chars()
469 if (len > (MAX_MODEM_BUF - cs->hw.elsa.transcnt)) { in modem_write_cmd()
473 fp = cs->hw.elsa.transcnt + cs->hw.elsa.transp; in modem_write_cmd()
478 memcpy(cs->hw.elsa.transbuf + fp, msg, count); in modem_write_cmd()
479 cs->hw.elsa.transcnt += count; in modem_write_cmd()
484 memcpy(cs->hw.elsa.transbuf + fp, msg, count); in modem_write_cmd()
485 cs->hw.elsa.transcnt += count; in modem_write_cmd()
486 if (cs->hw.elsa.transcnt && in modem_write_cmd()
487 !(cs->hw.elsa.IER & UART_IER_THRI)) { in modem_write_cmd()
488 cs->hw.elsa.IER |= UART_IER_THRI; in modem_write_cmd()
489 serial_outp(cs, UART_IER, cs->hw.elsa.IER); in modem_write_cmd()
504 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_init()
510 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_init()
516 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_init()
522 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_init()
528 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_init()
534 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_init()
540 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_init()
557 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_dial()
566 while(timeout-- && cs->hw.elsa.transcnt) in modem_set_dial()
598 st->l1.bcs->cs->hw.elsa.MFlag=2; in modem_l2l1()
604 st->l1.bcs->cs->hw.elsa.MFlag=1; in modem_l2l1()
625 bcs->hw.hscx.rcvbuf = bcs->cs->hw.elsa.rcvbuf; in setstack_elsa()
634 bcs->cs->hw.elsa.bcs = bcs; in setstack_elsa()
652 if (!(cs->hw.elsa.rcvbuf = kmalloc(MAX_MODEM_BUF, in init_modem()
658 if (!(cs->hw.elsa.transbuf = kmalloc(MAX_MODEM_BUF, in init_modem()
662 kfree(cs->hw.elsa.rcvbuf); in init_modem()
663 cs->hw.elsa.rcvbuf = NULL; in init_modem()
675 cs->hw.elsa.MFlag = 0; in release_modem()
676 if (cs->hw.elsa.transbuf) { in release_modem()
677 if (cs->hw.elsa.rcvbuf) { in release_modem()
679 kfree(cs->hw.elsa.rcvbuf); in release_modem()
680 cs->hw.elsa.rcvbuf = NULL; in release_modem()
682 kfree(cs->hw.elsa.transbuf); in release_modem()
683 cs->hw.elsa.transbuf = NULL; in release_modem()