예제 #1
0
/* port->lock is not held.  */
static void sc26xx_shutdown(struct uart_port *port)
{
	/* disable interrupst */
	sc26xx_disable_irq(port, IMR_TXRDY | IMR_RXRDY);

	/* stop tx/rx */
	WRITE_SC_PORT(port, CR, CR_DIS_TX | CR_DIS_RX);
}
예제 #2
0
static void sc26xx_shutdown(struct uart_port *port)
{

    sc26xx_disable_irq(port, IMR_TXRDY | IMR_RXRDY);


    WRITE_SC_PORT(port, CR, CR_DIS_TX | CR_DIS_RX);
}
예제 #3
0
/* port->lock is not held.  */
static int sc26xx_startup(struct uart_port *port)
{
	sc26xx_disable_irq(port, IMR_TXRDY | IMR_RXRDY);
	WRITE_SC(port, OPCR, 0);

	/* reset tx and rx */
	WRITE_SC_PORT(port, CR, CR_RES_RX);
	WRITE_SC_PORT(port, CR, CR_RES_TX);

	/* start rx/tx */
	WRITE_SC_PORT(port, CR, CR_ENA_TX | CR_ENA_RX);

	/* enable irqs */
	sc26xx_enable_irq(port, IMR_RXRDY);
	return 0;
}
예제 #4
0
static int sc26xx_startup(struct uart_port *port)
{
    sc26xx_disable_irq(port, IMR_TXRDY | IMR_RXRDY);
    WRITE_SC(port, OPCR, 0);


    WRITE_SC_PORT(port, CR, CR_RES_RX);
    WRITE_SC_PORT(port, CR, CR_RES_TX);


    WRITE_SC_PORT(port, CR, CR_ENA_TX | CR_ENA_RX);


    sc26xx_enable_irq(port, IMR_RXRDY);
    return 0;
}
예제 #5
0
static void transmit_chars(struct uart_port *port)
{
	struct circ_buf *xmit;

	if (!port->state)
		return;

	xmit = &port->state->xmit;
	if (uart_circ_empty(xmit) || uart_tx_stopped(port)) {
		sc26xx_disable_irq(port, IMR_TXRDY);
		return;
	}
	while (!uart_circ_empty(xmit)) {
		if (!(READ_SC_PORT(port, SR) & SR_TXRDY))
			break;

		WRITE_SC_PORT(port, THR, xmit->buf[xmit->tail]);
		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
		port->icount.tx++;
	}
	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
		uart_write_wakeup(port);
}