diff options
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 8 | ||||
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 7 |
2 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 247d89478f24..f590afc1f673 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -107,18 +107,18 @@ static void omap_uart_set_noidle(struct platform_device *pdev) | |||
107 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO); | 107 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_NO); |
108 | } | 108 | } |
109 | 109 | ||
110 | static void omap_uart_set_forceidle(struct platform_device *pdev) | 110 | static void omap_uart_set_smartidle(struct platform_device *pdev) |
111 | { | 111 | { |
112 | struct omap_device *od = to_omap_device(pdev); | 112 | struct omap_device *od = to_omap_device(pdev); |
113 | 113 | ||
114 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_FORCE); | 114 | omap_hwmod_set_slave_idlemode(od->hwmods[0], HWMOD_IDLEMODE_SMART); |
115 | } | 115 | } |
116 | 116 | ||
117 | #else | 117 | #else |
118 | static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) | 118 | static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable) |
119 | {} | 119 | {} |
120 | static void omap_uart_set_noidle(struct platform_device *pdev) {} | 120 | static void omap_uart_set_noidle(struct platform_device *pdev) {} |
121 | static void omap_uart_set_forceidle(struct platform_device *pdev) {} | 121 | static void omap_uart_set_smartidle(struct platform_device *pdev) {} |
122 | #endif /* CONFIG_PM */ | 122 | #endif /* CONFIG_PM */ |
123 | 123 | ||
124 | #ifdef CONFIG_OMAP_MUX | 124 | #ifdef CONFIG_OMAP_MUX |
@@ -349,7 +349,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, | |||
349 | omap_up.uartclk = OMAP24XX_BASE_BAUD * 16; | 349 | omap_up.uartclk = OMAP24XX_BASE_BAUD * 16; |
350 | omap_up.flags = UPF_BOOT_AUTOCONF; | 350 | omap_up.flags = UPF_BOOT_AUTOCONF; |
351 | omap_up.get_context_loss_count = omap_pm_get_dev_context_loss_count; | 351 | omap_up.get_context_loss_count = omap_pm_get_dev_context_loss_count; |
352 | omap_up.set_forceidle = omap_uart_set_forceidle; | 352 | omap_up.set_forceidle = omap_uart_set_smartidle; |
353 | omap_up.set_noidle = omap_uart_set_noidle; | 353 | omap_up.set_noidle = omap_uart_set_noidle; |
354 | omap_up.enable_wakeup = omap_uart_enable_wakeup; | 354 | omap_up.enable_wakeup = omap_uart_enable_wakeup; |
355 | omap_up.dma_rx_buf_size = info->dma_rx_buf_size; | 355 | omap_up.dma_rx_buf_size = info->dma_rx_buf_size; |
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index a3f5ea46f345..18d13248d9ba 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -136,6 +136,7 @@ static void serial_omap_enable_ms(struct uart_port *port) | |||
136 | static void serial_omap_stop_tx(struct uart_port *port) | 136 | static void serial_omap_stop_tx(struct uart_port *port) |
137 | { | 137 | { |
138 | struct uart_omap_port *up = (struct uart_omap_port *)port; | 138 | struct uart_omap_port *up = (struct uart_omap_port *)port; |
139 | struct omap_uart_port_info *pdata = up->pdev->dev.platform_data; | ||
139 | 140 | ||
140 | if (up->use_dma && | 141 | if (up->use_dma && |
141 | up->uart_dma.tx_dma_channel != OMAP_UART_DMA_CH_FREE) { | 142 | up->uart_dma.tx_dma_channel != OMAP_UART_DMA_CH_FREE) { |
@@ -158,6 +159,9 @@ static void serial_omap_stop_tx(struct uart_port *port) | |||
158 | serial_out(up, UART_IER, up->ier); | 159 | serial_out(up, UART_IER, up->ier); |
159 | } | 160 | } |
160 | 161 | ||
162 | if (!up->use_dma && pdata->set_forceidle) | ||
163 | pdata->set_forceidle(up->pdev); | ||
164 | |||
161 | pm_runtime_mark_last_busy(&up->pdev->dev); | 165 | pm_runtime_mark_last_busy(&up->pdev->dev); |
162 | pm_runtime_put_autosuspend(&up->pdev->dev); | 166 | pm_runtime_put_autosuspend(&up->pdev->dev); |
163 | } | 167 | } |
@@ -286,6 +290,7 @@ static inline void serial_omap_enable_ier_thri(struct uart_omap_port *up) | |||
286 | static void serial_omap_start_tx(struct uart_port *port) | 290 | static void serial_omap_start_tx(struct uart_port *port) |
287 | { | 291 | { |
288 | struct uart_omap_port *up = (struct uart_omap_port *)port; | 292 | struct uart_omap_port *up = (struct uart_omap_port *)port; |
293 | struct omap_uart_port_info *pdata = up->pdev->dev.platform_data; | ||
289 | struct circ_buf *xmit; | 294 | struct circ_buf *xmit; |
290 | unsigned int start; | 295 | unsigned int start; |
291 | int ret = 0; | 296 | int ret = 0; |
@@ -293,6 +298,8 @@ static void serial_omap_start_tx(struct uart_port *port) | |||
293 | if (!up->use_dma) { | 298 | if (!up->use_dma) { |
294 | pm_runtime_get_sync(&up->pdev->dev); | 299 | pm_runtime_get_sync(&up->pdev->dev); |
295 | serial_omap_enable_ier_thri(up); | 300 | serial_omap_enable_ier_thri(up); |
301 | if (pdata->set_noidle) | ||
302 | pdata->set_noidle(up->pdev); | ||
296 | pm_runtime_mark_last_busy(&up->pdev->dev); | 303 | pm_runtime_mark_last_busy(&up->pdev->dev); |
297 | pm_runtime_put_autosuspend(&up->pdev->dev); | 304 | pm_runtime_put_autosuspend(&up->pdev->dev); |
298 | return; | 305 | return; |