aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 3c2ad99fed34..212eb4c67797 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -44,7 +44,8 @@
44#define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */ 44#define PORT_RM9000 16 /* PMC-Sierra RM9xxx internal UART */
45#define PORT_OCTEON 17 /* Cavium OCTEON internal UART */ 45#define PORT_OCTEON 17 /* Cavium OCTEON internal UART */
46#define PORT_AR7 18 /* Texas Instruments AR7 internal UART */ 46#define PORT_AR7 18 /* Texas Instruments AR7 internal UART */
47#define PORT_MAX_8250 18 /* max port ID */ 47#define PORT_U6_16550A 19 /* ST-Ericsson U6xxx internal UART */
48#define PORT_MAX_8250 19 /* max port ID */
48 49
49/* 50/*
50 * ARM specific type numbers. These are not currently guaranteed 51 * ARM specific type numbers. These are not currently guaranteed
@@ -195,6 +196,9 @@
195/* High Speed UART for Medfield */ 196/* High Speed UART for Medfield */
196#define PORT_MFD 95 197#define PORT_MFD 95
197 198
199/* TI OMAP-UART */
200#define PORT_OMAP 96
201
198#ifdef __KERNEL__ 202#ifdef __KERNEL__
199 203
200#include <linux/compiler.h> 204#include <linux/compiler.h>
@@ -288,6 +292,8 @@ struct uart_port {
288 void (*set_termios)(struct uart_port *, 292 void (*set_termios)(struct uart_port *,
289 struct ktermios *new, 293 struct ktermios *new,
290 struct ktermios *old); 294 struct ktermios *old);
295 void (*pm)(struct uart_port *, unsigned int state,
296 unsigned int old);
291 unsigned int irq; /* irq number */ 297 unsigned int irq; /* irq number */
292 unsigned long irqflags; /* irq flags */ 298 unsigned long irqflags; /* irq flags */
293 unsigned int uartclk; /* base uart clock */ 299 unsigned int uartclk; /* base uart clock */
@@ -410,6 +416,14 @@ unsigned int uart_get_baud_rate(struct uart_port *port, struct ktermios *termios
410 unsigned int max); 416 unsigned int max);
411unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); 417unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud);
412 418
419/* Base timer interval for polling */
420static inline int uart_poll_timeout(struct uart_port *port)
421{
422 int timeout = port->timeout;
423
424 return timeout > 6 ? (timeout / 2 - 2) : 1;
425}
426
413/* 427/*
414 * Console helpers. 428 * Console helpers.
415 */ 429 */
@@ -465,7 +479,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
465#ifdef SUPPORT_SYSRQ 479#ifdef SUPPORT_SYSRQ
466 if (port->sysrq) { 480 if (port->sysrq) {
467 if (ch && time_before(jiffies, port->sysrq)) { 481 if (ch && time_before(jiffies, port->sysrq)) {
468 handle_sysrq(ch, port->state->port.tty); 482 handle_sysrq(ch);
469 port->sysrq = 0; 483 port->sysrq = 0;
470 return 1; 484 return 1;
471 } 485 }