aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-05-17 18:12:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-19 19:51:01 -0400
commit4539c24fe4f92c09ee668ef959d3e8180df619b9 (patch)
treed198ea0f07a6f6ba697747d6243ce6b89c319091 /drivers/tty/serial/8250.c
parentee4f6b4b89665b92ead67deaa2e5d2ffa1af2b5f (diff)
tty/serial: Add explicit PORT_TEGRA type
Tegra's UART is currently auto-detected as PORT_XSCALE due to register bit UART_IER.UUE being writable. However, the Tegra documentation states that this register bit is reserved. Hence, we should not program it. Instead, the documentation specifies that the UART is 16550 compatible. However, Tegra does need register bit UART_IER.RTOIE set, which is not enabled by any 16550 port type. This was not noticed before, since PORT_XSCALE enables CAP_UUE, which conflates both UUE and RTOIE bit programming. This change defines PORT_TEGRA that doesn't set UART_CAP_UUE, but does set UART_CAP_RTOIE, which is a new capability indicating that the RTOIE bit needs to be enabled. Based-on-code-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/8250.c')
-rw-r--r--drivers/tty/serial/8250.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 54482d724fee..a5e290de8c93 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -271,7 +271,7 @@ static const struct serial8250_config uart_config[] = {
271 .fifo_size = 32, 271 .fifo_size = 32,
272 .tx_loadsz = 32, 272 .tx_loadsz = 32,
273 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, 273 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
274 .flags = UART_CAP_FIFO | UART_CAP_UUE, 274 .flags = UART_CAP_FIFO | UART_CAP_UUE | UART_CAP_RTOIE,
275 }, 275 },
276 [PORT_RM9000] = { 276 [PORT_RM9000] = {
277 .name = "RM9000", 277 .name = "RM9000",
@@ -301,6 +301,14 @@ static const struct serial8250_config uart_config[] = {
301 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, 301 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10,
302 .flags = UART_CAP_FIFO | UART_CAP_AFE, 302 .flags = UART_CAP_FIFO | UART_CAP_AFE,
303 }, 303 },
304 [PORT_TEGRA] = {
305 .name = "Tegra",
306 .fifo_size = 32,
307 .tx_loadsz = 8,
308 .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_01 |
309 UART_FCR_T_TRIG_01,
310 .flags = UART_CAP_FIFO | UART_CAP_RTOIE,
311 },
304}; 312};
305 313
306#if defined(CONFIG_MIPS_ALCHEMY) 314#if defined(CONFIG_MIPS_ALCHEMY)
@@ -2403,7 +2411,9 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios,
2403 UART_ENABLE_MS(&up->port, termios->c_cflag)) 2411 UART_ENABLE_MS(&up->port, termios->c_cflag))
2404 up->ier |= UART_IER_MSI; 2412 up->ier |= UART_IER_MSI;
2405 if (up->capabilities & UART_CAP_UUE) 2413 if (up->capabilities & UART_CAP_UUE)
2406 up->ier |= UART_IER_UUE | UART_IER_RTOIE; 2414 up->ier |= UART_IER_UUE;
2415 if (up->capabilities & UART_CAP_RTOIE)
2416 up->ier |= UART_IER_RTOIE;
2407 2417
2408 serial_out(up, UART_IER, up->ier); 2418 serial_out(up, UART_IER, up->ier);
2409 2419