diff options
| -rw-r--r-- | arch/arm/mach-omap2/serial.c | 8 | ||||
| -rw-r--r-- | drivers/tty/serial/8250/8250.c | 2 | ||||
| -rw-r--r-- | drivers/tty/serial/m32r_sio.c (renamed from drivers/tty/serial/8250/m32r_sio.c) | 0 | ||||
| -rw-r--r-- | drivers/tty/serial/m32r_sio.h (renamed from drivers/tty/serial/8250/m32r_sio.h) | 0 | ||||
| -rw-r--r-- | drivers/tty/serial/m32r_sio_reg.h (renamed from drivers/tty/serial/8250/m32r_sio_reg.h) | 0 | ||||
| -rw-r--r-- | drivers/tty/serial/omap-serial.c | 30 | ||||
| -rw-r--r-- | drivers/tty/serial/samsung.c | 3 |
7 files changed, 32 insertions, 11 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/8250/8250.c b/drivers/tty/serial/8250/8250.c index 9f50c4e3c2be..9b7336fcfbb3 100644 --- a/drivers/tty/serial/8250/8250.c +++ b/drivers/tty/serial/8250/8250.c | |||
| @@ -45,7 +45,7 @@ | |||
| 45 | #include "8250.h" | 45 | #include "8250.h" |
| 46 | 46 | ||
| 47 | #ifdef CONFIG_SPARC | 47 | #ifdef CONFIG_SPARC |
| 48 | #include "suncore.h" | 48 | #include "../suncore.h" |
| 49 | #endif | 49 | #endif |
| 50 | 50 | ||
| 51 | /* | 51 | /* |
diff --git a/drivers/tty/serial/8250/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 94a6792bf97b..94a6792bf97b 100644 --- a/drivers/tty/serial/8250/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c | |||
diff --git a/drivers/tty/serial/8250/m32r_sio.h b/drivers/tty/serial/m32r_sio.h index e9b7e11793b1..e9b7e11793b1 100644 --- a/drivers/tty/serial/8250/m32r_sio.h +++ b/drivers/tty/serial/m32r_sio.h | |||
diff --git a/drivers/tty/serial/8250/m32r_sio_reg.h b/drivers/tty/serial/m32r_sio_reg.h index 4671473793e3..4671473793e3 100644 --- a/drivers/tty/serial/8250/m32r_sio_reg.h +++ b/drivers/tty/serial/m32r_sio_reg.h | |||
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 1c2426931484..f80904145fd4 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
| @@ -46,6 +46,13 @@ | |||
| 46 | 46 | ||
| 47 | #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/ | 47 | #define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/ |
| 48 | 48 | ||
| 49 | /* SCR register bitmasks */ | ||
| 50 | #define OMAP_UART_SCR_RX_TRIG_GRANU1_MASK (1 << 7) | ||
| 51 | |||
| 52 | /* FCR register bitmasks */ | ||
| 53 | #define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT 6 | ||
| 54 | #define OMAP_UART_FCR_RX_FIFO_TRIG_MASK (0x3 << 6) | ||
| 55 | |||
| 49 | static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS]; | 56 | static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS]; |
| 50 | 57 | ||
| 51 | /* Forward declaration of functions */ | 58 | /* Forward declaration of functions */ |
| @@ -129,6 +136,7 @@ static void serial_omap_enable_ms(struct uart_port *port) | |||
| 129 | static void serial_omap_stop_tx(struct uart_port *port) | 136 | static void serial_omap_stop_tx(struct uart_port *port) |
| 130 | { | 137 | { |
| 131 | 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; | ||
| 132 | 140 | ||
| 133 | if (up->use_dma && | 141 | if (up->use_dma && |
| 134 | up->uart_dma.tx_dma_channel != OMAP_UART_DMA_CH_FREE) { | 142 | up->uart_dma.tx_dma_channel != OMAP_UART_DMA_CH_FREE) { |
| @@ -151,6 +159,9 @@ static void serial_omap_stop_tx(struct uart_port *port) | |||
| 151 | serial_out(up, UART_IER, up->ier); | 159 | serial_out(up, UART_IER, up->ier); |
| 152 | } | 160 | } |
| 153 | 161 | ||
| 162 | if (!up->use_dma && pdata->set_forceidle) | ||
| 163 | pdata->set_forceidle(up->pdev); | ||
| 164 | |||
| 154 | pm_runtime_mark_last_busy(&up->pdev->dev); | 165 | pm_runtime_mark_last_busy(&up->pdev->dev); |
| 155 | pm_runtime_put_autosuspend(&up->pdev->dev); | 166 | pm_runtime_put_autosuspend(&up->pdev->dev); |
| 156 | } | 167 | } |
| @@ -279,6 +290,7 @@ static inline void serial_omap_enable_ier_thri(struct uart_omap_port *up) | |||
| 279 | static void serial_omap_start_tx(struct uart_port *port) | 290 | static void serial_omap_start_tx(struct uart_port *port) |
| 280 | { | 291 | { |
| 281 | 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; | ||
| 282 | struct circ_buf *xmit; | 294 | struct circ_buf *xmit; |
| 283 | unsigned int start; | 295 | unsigned int start; |
| 284 | int ret = 0; | 296 | int ret = 0; |
| @@ -286,6 +298,8 @@ static void serial_omap_start_tx(struct uart_port *port) | |||
| 286 | if (!up->use_dma) { | 298 | if (!up->use_dma) { |
| 287 | pm_runtime_get_sync(&up->pdev->dev); | 299 | pm_runtime_get_sync(&up->pdev->dev); |
| 288 | serial_omap_enable_ier_thri(up); | 300 | serial_omap_enable_ier_thri(up); |
| 301 | if (pdata->set_noidle) | ||
| 302 | pdata->set_noidle(up->pdev); | ||
| 289 | pm_runtime_mark_last_busy(&up->pdev->dev); | 303 | pm_runtime_mark_last_busy(&up->pdev->dev); |
| 290 | pm_runtime_put_autosuspend(&up->pdev->dev); | 304 | pm_runtime_put_autosuspend(&up->pdev->dev); |
| 291 | return; | 305 | return; |
| @@ -726,8 +740,7 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios, | |||
| 726 | quot = serial_omap_get_divisor(port, baud); | 740 | quot = serial_omap_get_divisor(port, baud); |
| 727 | 741 | ||
| 728 | /* calculate wakeup latency constraint */ | 742 | /* calculate wakeup latency constraint */ |
| 729 | up->calc_latency = (1000000 * up->port.fifosize) / | 743 | up->calc_latency = (USEC_PER_SEC * up->port.fifosize) / (baud / 8); |
| 730 | (1000 * baud / 8); | ||
| 731 | up->latency = up->calc_latency; | 744 | up->latency = up->calc_latency; |
| 732 | schedule_work(&up->qos_work); | 745 | schedule_work(&up->qos_work); |
| 733 | 746 | ||
| @@ -811,14 +824,21 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios, | |||
| 811 | up->mcr = serial_in(up, UART_MCR); | 824 | up->mcr = serial_in(up, UART_MCR); |
| 812 | serial_out(up, UART_MCR, up->mcr | UART_MCR_TCRTLR); | 825 | serial_out(up, UART_MCR, up->mcr | UART_MCR_TCRTLR); |
| 813 | /* FIFO ENABLE, DMA MODE */ | 826 | /* FIFO ENABLE, DMA MODE */ |
| 814 | serial_out(up, UART_FCR, up->fcr); | 827 | |
| 815 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); | 828 | up->scr |= OMAP_UART_SCR_RX_TRIG_GRANU1_MASK; |
| 816 | 829 | ||
| 817 | if (up->use_dma) { | 830 | if (up->use_dma) { |
| 818 | serial_out(up, UART_TI752_TLR, 0); | 831 | serial_out(up, UART_TI752_TLR, 0); |
| 819 | up->scr |= (UART_FCR_TRIGGER_4 | UART_FCR_TRIGGER_8); | 832 | up->scr |= UART_FCR_TRIGGER_4; |
| 833 | } else { | ||
| 834 | /* Set receive FIFO threshold to 1 byte */ | ||
| 835 | up->fcr &= ~OMAP_UART_FCR_RX_FIFO_TRIG_MASK; | ||
| 836 | up->fcr |= (0x1 << OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT); | ||
| 820 | } | 837 | } |
| 821 | 838 | ||
| 839 | serial_out(up, UART_FCR, up->fcr); | ||
| 840 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); | ||
| 841 | |||
| 822 | serial_out(up, UART_OMAP_SCR, up->scr); | 842 | serial_out(up, UART_OMAP_SCR, up->scr); |
| 823 | 843 | ||
| 824 | serial_out(up, UART_EFR, up->efr); | 844 | serial_out(up, UART_EFR, up->efr); |
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index f96f37b5fec6..c55e5fb16fa3 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c | |||
| @@ -1593,7 +1593,8 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = { | |||
| 1593 | #define S5PV210_SERIAL_DRV_DATA (kernel_ulong_t)NULL | 1593 | #define S5PV210_SERIAL_DRV_DATA (kernel_ulong_t)NULL |
| 1594 | #endif | 1594 | #endif |
| 1595 | 1595 | ||
| 1596 | #ifdef CONFIG_CPU_EXYNOS4210 | 1596 | #if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS4212) || \ |
| 1597 | defined(CONFIG_SOC_EXYNOS4412) || defined(CONFIG_SOC_EXYNOS5250) | ||
| 1597 | static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = { | 1598 | static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = { |
| 1598 | .info = &(struct s3c24xx_uart_info) { | 1599 | .info = &(struct s3c24xx_uart_info) { |
| 1599 | .name = "Samsung Exynos4 UART", | 1600 | .name = "Samsung Exynos4 UART", |
