2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00

cpm_uart: Support uart_wait_until_sent()

Set port->fifosize to the software FIFO size, and update the port timeout
when the baud rate is modified. SCC ports have an optional 32 byte hardware
FIFO which is currently not taken into account, as there is no documented way
to check when the FIFO becomes empty.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
This commit is contained in:
Laurent Pinchart 2008-07-02 10:58:45 +02:00 committed by Kumar Gala
parent 2f3804edf9
commit dc32081530

6
drivers/serial/cpm_uart/cpm_uart_core.c Executable file → Normal file
View File

@ -490,6 +490,11 @@ static void cpm_uart_set_termios(struct uart_port *port,
}
}
/*
* Update the timeout
*/
uart_update_timeout(port, termios->c_cflag, baud);
/*
* Set up parity check flag
*/
@ -938,6 +943,7 @@ static int cpm_uart_init_port(struct device_node *np,
pinfo->port.type = PORT_CPM;
pinfo->port.ops = &cpm_uart_pops,
pinfo->port.iotype = UPIO_MEM;
pinfo->port.fifosize = pinfo->tx_nrfifos * pinfo->tx_fifosize;
spin_lock_init(&pinfo->port.lock);
pinfo->port.irq = of_irq_to_resource(np, 0, NULL);