diff options
author | Laurent Pinchart <laurentp@cse-semaphore.com> | 2008-07-02 04:58:45 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2008-07-14 08:55:38 -0400 |
commit | dc320815305c5f019672d144f4c4c2710ef7732e (patch) | |
tree | f0336cf4dcffb605b0e65b3a16e2d3f52bb2f6b8 /drivers/serial | |
parent | 2f3804edf971d2080243d2b4552bfd61ddfbf969 (diff) |
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>
Diffstat (limited to 'drivers/serial')
-rw-r--r--[-rwxr-xr-x] | drivers/serial/cpm_uart/cpm_uart_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index d389a76b4afb..abe129cc927a 100755..100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -491,6 +491,11 @@ static void cpm_uart_set_termios(struct uart_port *port, | |||
491 | } | 491 | } |
492 | 492 | ||
493 | /* | 493 | /* |
494 | * Update the timeout | ||
495 | */ | ||
496 | uart_update_timeout(port, termios->c_cflag, baud); | ||
497 | |||
498 | /* | ||
494 | * Set up parity check flag | 499 | * Set up parity check flag |
495 | */ | 500 | */ |
496 | #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) | 501 | #define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) |
@@ -938,6 +943,7 @@ static int cpm_uart_init_port(struct device_node *np, | |||
938 | pinfo->port.type = PORT_CPM; | 943 | pinfo->port.type = PORT_CPM; |
939 | pinfo->port.ops = &cpm_uart_pops, | 944 | pinfo->port.ops = &cpm_uart_pops, |
940 | pinfo->port.iotype = UPIO_MEM; | 945 | pinfo->port.iotype = UPIO_MEM; |
946 | pinfo->port.fifosize = pinfo->tx_nrfifos * pinfo->tx_fifosize; | ||
941 | spin_lock_init(&pinfo->port.lock); | 947 | spin_lock_init(&pinfo->port.lock); |
942 | 948 | ||
943 | pinfo->port.irq = of_irq_to_resource(np, 0, NULL); | 949 | pinfo->port.irq = of_irq_to_resource(np, 0, NULL); |