diff options
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index bbf78aaf9e01f0..13864c3667abdd 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -193,6 +193,9 @@ static const struct serial8250_config uart_config[] = { .fifo_size = 32, .tx_loadsz = 16, .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_01 | +#ifdef CONFIG_SH_RTS7751R2D + UART_FCR_TRIGGER_14 | +#endif UART_FCR_T_TRIG_00, .flags = UART_CAP_FIFO | UART_CAP_EFR | UART_CAP_SLEEP, }, @@ -440,8 +443,13 @@ static inline void serial8250_set_sleep(struct uart_8250_port *p, int sleep) { if (p->capabilities & UART_CAP_SLEEP) { if (p->capabilities & UART_CAP_EFR) { + int efr = UART_EFR_ECB; + serial_outp(p, UART_LCR, 0xBF); - serial_outp(p, UART_EFR, UART_EFR_ECB); +#ifdef CONFIG_SH_RTS7751R2D + efr |= UART_EFR_CTS | UART_EFR_RTS; +#endif + serial_outp(p, UART_EFR, efr); serial_outp(p, UART_LCR, 0); } serial_outp(p, UART_IER, sleep ? UART_IERX_SLEEP : 0); @@ -672,10 +680,16 @@ static void autoconfig_has_efr(struct uart_8250_port *up) * since that's the technique that was sent to me in the * serial driver update, but I'm not convinced this works. * I've had problems doing this in the past. -TYT + * + * No, this won't work for everyone. At least in the RTS7751R2D + * case we have a '650 with a 64 byte FIFO, so this ends up breaking + * there. -PFM */ +#ifndef CONFIG_SH_RTS7751R2D if (size_fifo(up) == 64) up->port.type = PORT_16654; else +#endif up->port.type = PORT_16650V2; } |