diff options
| -rw-r--r-- | arch/arm/plat-omap/include/plat/omap-serial.h | 1 | ||||
| -rw-r--r-- | drivers/tty/serial/omap-serial.c | 51 |
2 files changed, 1 insertions, 51 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap-serial.h b/arch/arm/plat-omap/include/plat/omap-serial.h index 12a64eb8c624..9ff444469f3d 100644 --- a/arch/arm/plat-omap/include/plat/omap-serial.h +++ b/arch/arm/plat-omap/include/plat/omap-serial.h | |||
| @@ -131,7 +131,6 @@ struct uart_omap_port { | |||
| 131 | u32 context_loss_cnt; | 131 | u32 context_loss_cnt; |
| 132 | u32 errata; | 132 | u32 errata; |
| 133 | u8 wakeups_enabled; | 133 | u8 wakeups_enabled; |
| 134 | u8 max_tx_count; | ||
| 135 | 134 | ||
| 136 | struct pm_qos_request pm_qos_request; | 135 | struct pm_qos_request pm_qos_request; |
| 137 | u32 latency; | 136 | u32 latency; |
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index e00ac05cfdb4..ca54f038ab45 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
| @@ -88,49 +88,6 @@ static inline void serial_omap_clear_fifos(struct uart_omap_port *up) | |||
| 88 | serial_out(up, UART_FCR, 0); | 88 | serial_out(up, UART_FCR, 0); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | /** | ||
| 92 | * serial_omap_block_cpu_low_power_state - prevent MPU pwrdm from leaving ON | ||
| 93 | * @up: struct uart_omap_port * | ||
| 94 | * | ||
| 95 | * Prevent the MPU powerdomain from entering a power state lower than | ||
| 96 | * ON. (It should be sufficient to prevent it from entering INACTIVE, | ||
| 97 | * but there is presently no easy way to do this.) This works around | ||
| 98 | * a suspected silicon bug in the OMAP UART IP blocks. The UARTs should | ||
| 99 | * wake the PRCM when the transmit FIFO threshold interrupt is raised, but | ||
| 100 | * they do not. See also serial_omap_allow_cpu_low_power_state(). No | ||
| 101 | * return value. | ||
| 102 | */ | ||
| 103 | static void serial_omap_block_cpu_low_power_state(struct uart_omap_port *up) | ||
| 104 | { | ||
| 105 | #ifdef CONFIG_CPU_IDLE | ||
| 106 | up->latency = 1; | ||
| 107 | schedule_work(&up->qos_work); | ||
| 108 | #else | ||
| 109 | up->max_tx_count = 1; | ||
| 110 | #endif | ||
| 111 | } | ||
| 112 | |||
| 113 | /** | ||
| 114 | * serial_omap_allow_cpu_low_power_state - remove power state restriction on MPU | ||
| 115 | * @up: struct uart_omap_port * | ||
| 116 | * | ||
| 117 | * Cancel the effects of serial_omap_block_cpu_low_power_state(). | ||
| 118 | * This should allow the MPU powerdomain to enter a power state lower | ||
| 119 | * than ON, assuming the rest of the kernel is not restricting it. | ||
| 120 | * This works around a suspected silicon bug in the OMAP UART IP | ||
| 121 | * blocks. The UARTs should wake the PRCM when the transmit FIFO | ||
| 122 | * threshold interrupt is raised, but they do not. No return value. | ||
| 123 | */ | ||
| 124 | static void serial_omap_allow_cpu_low_power_state(struct uart_omap_port *up) | ||
| 125 | { | ||
| 126 | #ifdef CONFIG_CPU_IDLE | ||
| 127 | up->latency = up->calc_latency; | ||
| 128 | schedule_work(&up->qos_work); | ||
| 129 | #else | ||
| 130 | up->max_tx_count = up->port.fifosize / 4; | ||
| 131 | #endif | ||
| 132 | } | ||
| 133 | |||
| 134 | /* | 91 | /* |
| 135 | * serial_omap_get_divisor - calculate divisor value | 92 | * serial_omap_get_divisor - calculate divisor value |
| 136 | * @port: uart port info | 93 | * @port: uart port info |
| @@ -206,9 +163,6 @@ static void serial_omap_stop_tx(struct uart_port *port) | |||
| 206 | serial_out(up, UART_IER, up->ier); | 163 | serial_out(up, UART_IER, up->ier); |
| 207 | } | 164 | } |
| 208 | 165 | ||
| 209 | if (!up->use_dma) | ||
| 210 | serial_omap_allow_cpu_low_power_state(up); | ||
| 211 | |||
| 212 | pm_runtime_mark_last_busy(&up->pdev->dev); | 166 | pm_runtime_mark_last_busy(&up->pdev->dev); |
| 213 | pm_runtime_put_autosuspend(&up->pdev->dev); | 167 | pm_runtime_put_autosuspend(&up->pdev->dev); |
| 214 | } | 168 | } |
| @@ -310,7 +264,7 @@ static void transmit_chars(struct uart_omap_port *up) | |||
| 310 | serial_omap_stop_tx(&up->port); | 264 | serial_omap_stop_tx(&up->port); |
| 311 | return; | 265 | return; |
| 312 | } | 266 | } |
| 313 | count = up->max_tx_count; | 267 | count = up->port.fifosize / 4; |
| 314 | do { | 268 | do { |
| 315 | serial_out(up, UART_TX, xmit->buf[xmit->tail]); | 269 | serial_out(up, UART_TX, xmit->buf[xmit->tail]); |
| 316 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); | 270 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); |
| @@ -343,7 +297,6 @@ static void serial_omap_start_tx(struct uart_port *port) | |||
| 343 | 297 | ||
| 344 | if (!up->use_dma) { | 298 | if (!up->use_dma) { |
| 345 | pm_runtime_get_sync(&up->pdev->dev); | 299 | pm_runtime_get_sync(&up->pdev->dev); |
| 346 | serial_omap_block_cpu_low_power_state(up); | ||
| 347 | serial_omap_enable_ier_thri(up); | 300 | serial_omap_enable_ier_thri(up); |
| 348 | pm_runtime_mark_last_busy(&up->pdev->dev); | 301 | pm_runtime_mark_last_busy(&up->pdev->dev); |
| 349 | pm_runtime_put_autosuspend(&up->pdev->dev); | 302 | pm_runtime_put_autosuspend(&up->pdev->dev); |
| @@ -1468,8 +1421,6 @@ static int serial_omap_probe(struct platform_device *pdev) | |||
| 1468 | up->port.fifosize = 64; | 1421 | up->port.fifosize = 64; |
| 1469 | up->port.ops = &serial_omap_pops; | 1422 | up->port.ops = &serial_omap_pops; |
| 1470 | 1423 | ||
| 1471 | up->max_tx_count = up->port.fifosize / 4; | ||
| 1472 | |||
| 1473 | if (pdev->dev.of_node) | 1424 | if (pdev->dev.of_node) |
| 1474 | up->port.line = of_alias_get_id(pdev->dev.of_node, "serial"); | 1425 | up->port.line = of_alias_get_id(pdev->dev.of_node, "serial"); |
| 1475 | else | 1426 | else |
