aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
committerMichal Marek <mmarek@suse.cz>2010-10-27 18:15:57 -0400
commitb74b953b998bcc2db91b694446f3a2619ec32de6 (patch)
tree6ce24caabd730f6ae9287ed0676ec32e6ff31e9d /include/linux/serial_core.h
parentabb438526201c6a79949ad45375c051b6681c253 (diff)
parentf6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff)
Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c (commit eda603f).
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h35
1 files changed, 31 insertions, 4 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 8c3dd36fe91a..563e23400913 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
@@ -182,6 +183,19 @@
182/* Aeroflex Gaisler GRLIB APBUART */ 183/* Aeroflex Gaisler GRLIB APBUART */
183#define PORT_APBUART 90 184#define PORT_APBUART 90
184 185
186/* Altera UARTs */
187#define PORT_ALTERA_JTAGUART 91
188#define PORT_ALTERA_UART 92
189
190/* SH-SCI */
191#define PORT_SCIFB 93
192
193/* MAX3107 */
194#define PORT_MAX3107 94
195
196/* High Speed UART for Medfield */
197#define PORT_MFD 95
198
185#ifdef __KERNEL__ 199#ifdef __KERNEL__
186 200
187#include <linux/compiler.h> 201#include <linux/compiler.h>
@@ -216,7 +230,7 @@ struct uart_ops {
216 void (*flush_buffer)(struct uart_port *); 230 void (*flush_buffer)(struct uart_port *);
217 void (*set_termios)(struct uart_port *, struct ktermios *new, 231 void (*set_termios)(struct uart_port *, struct ktermios *new,
218 struct ktermios *old); 232 struct ktermios *old);
219 void (*set_ldisc)(struct uart_port *); 233 void (*set_ldisc)(struct uart_port *, int new);
220 void (*pm)(struct uart_port *, unsigned int state, 234 void (*pm)(struct uart_port *, unsigned int state,
221 unsigned int oldstate); 235 unsigned int oldstate);
222 int (*set_wake)(struct uart_port *, unsigned int state); 236 int (*set_wake)(struct uart_port *, unsigned int state);
@@ -246,6 +260,7 @@ struct uart_ops {
246#endif 260#endif
247}; 261};
248 262
263#define NO_POLL_CHAR 0x00ff0000
249#define UART_CONFIG_TYPE (1 << 0) 264#define UART_CONFIG_TYPE (1 << 0)
250#define UART_CONFIG_IRQ (1 << 1) 265#define UART_CONFIG_IRQ (1 << 1)
251 266
@@ -271,6 +286,9 @@ struct uart_port {
271 unsigned char __iomem *membase; /* read/write[bwl] */ 286 unsigned char __iomem *membase; /* read/write[bwl] */
272 unsigned int (*serial_in)(struct uart_port *, int); 287 unsigned int (*serial_in)(struct uart_port *, int);
273 void (*serial_out)(struct uart_port *, int, int); 288 void (*serial_out)(struct uart_port *, int, int);
289 void (*set_termios)(struct uart_port *,
290 struct ktermios *new,
291 struct ktermios *old);
274 unsigned int irq; /* irq number */ 292 unsigned int irq; /* irq number */
275 unsigned long irqflags; /* irq flags */ 293 unsigned long irqflags; /* irq flags */
276 unsigned int uartclk; /* base uart clock */ 294 unsigned int uartclk; /* base uart clock */
@@ -448,7 +466,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch)
448#ifdef SUPPORT_SYSRQ 466#ifdef SUPPORT_SYSRQ
449 if (port->sysrq) { 467 if (port->sysrq) {
450 if (ch && time_before(jiffies, port->sysrq)) { 468 if (ch && time_before(jiffies, port->sysrq)) {
451 handle_sysrq(ch, port->state->port.tty); 469 handle_sysrq(ch);
452 port->sysrq = 0; 470 port->sysrq = 0;
453 return 1; 471 return 1;
454 } 472 }
@@ -491,9 +509,13 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
491{ 509{
492 struct uart_state *state = uport->state; 510 struct uart_state *state = uport->state;
493 struct tty_port *port = &state->port; 511 struct tty_port *port = &state->port;
512 struct tty_ldisc *ld = tty_ldisc_ref(port->tty);
513 struct timespec ts;
494 514
495 uport->icount.dcd++; 515 if (ld && ld->ops->dcd_change)
516 getnstimeofday(&ts);
496 517
518 uport->icount.dcd++;
497#ifdef CONFIG_HARD_PPS 519#ifdef CONFIG_HARD_PPS
498 if ((uport->flags & UPF_HARDPPS_CD) && status) 520 if ((uport->flags & UPF_HARDPPS_CD) && status)
499 hardpps(); 521 hardpps();
@@ -505,6 +527,11 @@ uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
505 else if (port->tty) 527 else if (port->tty)
506 tty_hangup(port->tty); 528 tty_hangup(port->tty);
507 } 529 }
530
531 if (ld && ld->ops->dcd_change)
532 ld->ops->dcd_change(port->tty, status, &ts);
533 if (ld)
534 tty_ldisc_deref(ld);
508} 535}
509 536
510/** 537/**