aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-01-25 21:50:56 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-02 16:00:16 -0500
commit6bbcbf22085e0b144899d6067e243dd26c0e7533 (patch)
tree5b604b1ca6fd4ca140dc1a1ca0f800dc430671f6
parentedbe5dbefe5b514d094558ab59c8dc7578e117dd (diff)
tty: serial: omap-serial: wakeup latency constraint is in microseconds, not milliseconds
The receive FIFO wakeup latency estimate in the omap-serial driver is three orders of magnitude too small. This effectively prevents the MPU from going to a low-power state when CONFIG_CPU_IDLE=y. This is a major power management regression and masks some other FIFO-related bugs in the driver. Fix by correcting the most egregious problem in the RX wakeup latency estimate. There are several other flaws in the estimator; these will be fixed by a separate patch series intended for 3.4. The difference in low-power states with this patch can be observed via debugfs in pm_debug/count. This estimate does not have any effect when CONFIG_CPU_IDLE=n. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Alan Cox <alan@linux.intel.com> Acked-by: Govindraj.R <govindraj.raja@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Tested-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/omap-serial.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 11fa15623e13..72fa783729d2 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -740,8 +740,7 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
740 quot = serial_omap_get_divisor(port, baud); 740 quot = serial_omap_get_divisor(port, baud);
741 741
742 /* calculate wakeup latency constraint */ 742 /* calculate wakeup latency constraint */
743 up->calc_latency = (1000000 * up->port.fifosize) / 743 up->calc_latency = (USEC_PER_SEC * up->port.fifosize) / (baud / 8);
744 (1000 * baud / 8);
745 up->latency = up->calc_latency; 744 up->latency = up->calc_latency;
746 schedule_work(&up->qos_work); 745 schedule_work(&up->qos_work);
747 746