From: Laurent Pinchart Date: Wed, 2 Jul 2008 08:58:45 +0000 (+0200) Subject: cpm_uart: Support uart_wait_until_sent() X-Git-Tag: v2.6.27-rc1~1058^2~23 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc320815305c5f019672d144f4c4c2710ef7732e;p=linux-2.6 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 Signed-off-by: Kumar Gala --- diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c old mode 100755 new mode 100644 index d389a76b4a..abe129cc92 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c @@ -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);