aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 22:59:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-22 22:59:04 -0400
commit73ecf3a6e3f0206bf56a0fefe3b3eda042fb7034 (patch)
tree866f0ebb2b148479e93b5ac955097b1cc94ceb4e /include
parentb9da0571050c09863e59f94d0b8594a290d61b88 (diff)
parentcd3ecad19aea8debae9a48b53de2ec7a571f24e9 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: (49 commits) serial8250: ratelimit "too much work" error serial: bfin_sport_uart: speed up sport RX sample rate to be 3% faster serial: abstraction for 8250 legacy ports serial/imx: check that the buffer is non-empty before sending it out serial: mfd: add more baud rates support jsm: Remove the uart port on errors Alchemy: Add UART PM methods. 8250: allow platforms to override PM hook. altera_uart: Don't use plain integer as NULL pointer altera_uart: Fix missing prototype for registering an early console altera_uart: Fixup type usage of port flags altera_uart: Make it possible to use Altera UART and 8250 ports together altera_uart: Add support for different address strides altera_uart: Add support for getting mapbase and IRQ from resources altera_uart: Add support for polling mode (IRQ-less) serial: Factor out uart_poll_timeout() from 8250 driver serial: mark the 8250 driver as maintained serial: 8250: Don't delay after transmitter is ready. tty: MAINTAINERS: add drivers/serial/jsm/ as maintained driver vcs: invoke the vt update callback when /dev/vcs* is written to ...
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/ioctls.h2
-rw-r--r--include/linux/altera_uart.h5
-rw-r--r--include/linux/selection.h1
-rw-r--r--include/linux/serial_8250.h8
-rw-r--r--include/linux/serial_core.h10
-rw-r--r--include/linux/tty.h3
-rw-r--r--include/linux/tty_driver.h9
-rw-r--r--include/linux/usb/serial.h2
8 files changed, 39 insertions, 1 deletions
diff --git a/include/asm-generic/ioctls.h b/include/asm-generic/ioctls.h
index 8554cb6a81b9..a3216655d657 100644
--- a/include/asm-generic/ioctls.h
+++ b/include/asm-generic/ioctls.h
@@ -62,7 +62,9 @@
62#define TCSETSW2 _IOW('T', 0x2C, struct termios2) 62#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
63#define TCSETSF2 _IOW('T', 0x2D, struct termios2) 63#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
64#define TIOCGRS485 0x542E 64#define TIOCGRS485 0x542E
65#ifndef TIOCSRS485
65#define TIOCSRS485 0x542F 66#define TIOCSRS485 0x542F
67#endif
66#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ 68#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
67#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ 69#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
68#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ 70#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
diff --git a/include/linux/altera_uart.h b/include/linux/altera_uart.h
index 8d441064a30d..a10a90791976 100644
--- a/include/linux/altera_uart.h
+++ b/include/linux/altera_uart.h
@@ -5,10 +5,15 @@
5#ifndef __ALTUART_H 5#ifndef __ALTUART_H
6#define __ALTUART_H 6#define __ALTUART_H
7 7
8#include <linux/init.h>
9
8struct altera_uart_platform_uart { 10struct altera_uart_platform_uart {
9 unsigned long mapbase; /* Physical address base */ 11 unsigned long mapbase; /* Physical address base */
10 unsigned int irq; /* Interrupt vector */ 12 unsigned int irq; /* Interrupt vector */
11 unsigned int uartclk; /* UART clock rate */ 13 unsigned int uartclk; /* UART clock rate */
14 unsigned int bus_shift; /* Bus shift (address stride) */
12}; 15};
13 16
17int __init early_altera_uart_setup(struct altera_uart_platform_uart *platp);
18
14#endif /* __ALTUART_H */ 19#endif /* __ALTUART_H */
diff --git a/include/linux/selection.h b/include/linux/selection.h
index 8cdaa1151d2e..85193aa8c1e3 100644
--- a/include/linux/selection.h
+++ b/include/linux/selection.h
@@ -39,5 +39,6 @@ extern void putconsxy(struct vc_data *vc, unsigned char *p);
39 39
40extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org); 40extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org);
41extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); 41extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org);
42extern void vcs_scr_updated(struct vc_data *vc);
42 43
43#endif 44#endif
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index 7638deaaba65..97f5b45bbc07 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -35,6 +35,8 @@ struct plat_serial8250_port {
35 void (*set_termios)(struct uart_port *, 35 void (*set_termios)(struct uart_port *,
36 struct ktermios *new, 36 struct ktermios *new,
37 struct ktermios *old); 37 struct ktermios *old);
38 void (*pm)(struct uart_port *, unsigned int state,
39 unsigned old);
38}; 40};
39 41
40/* 42/*
@@ -76,5 +78,11 @@ extern int serial8250_find_port_for_earlycon(void);
76extern int setup_early_serial8250_console(char *cmdline); 78extern int setup_early_serial8250_console(char *cmdline);
77extern void serial8250_do_set_termios(struct uart_port *port, 79extern void serial8250_do_set_termios(struct uart_port *port,
78 struct ktermios *termios, struct ktermios *old); 80 struct ktermios *termios, struct ktermios *old);
81extern void serial8250_do_pm(struct uart_port *port, unsigned int state,
82 unsigned int oldstate);
83
84extern void serial8250_set_isa_configurator(void (*v)
85 (int port, struct uart_port *up,
86 unsigned short *capabilities));
79 87
80#endif 88#endif
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 563e23400913..99e5994e6f84 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -289,6 +289,8 @@ struct uart_port {
289 void (*set_termios)(struct uart_port *, 289 void (*set_termios)(struct uart_port *,
290 struct ktermios *new, 290 struct ktermios *new,
291 struct ktermios *old); 291 struct ktermios *old);
292 void (*pm)(struct uart_port *, unsigned int state,
293 unsigned int old);
292 unsigned int irq; /* irq number */ 294 unsigned int irq; /* irq number */
293 unsigned long irqflags; /* irq flags */ 295 unsigned long irqflags; /* irq flags */
294 unsigned int uartclk; /* base uart clock */ 296 unsigned int uartclk; /* base uart clock */
@@ -411,6 +413,14 @@ unsigned int uart_get_baud_rate(struct uart_port *port, struct ktermios *termios
411 unsigned int max); 413 unsigned int max);
412unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); 414unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud);
413 415
416/* Base timer interval for polling */
417static inline int uart_poll_timeout(struct uart_port *port)
418{
419 int timeout = port->timeout;
420
421 return timeout > 6 ? (timeout / 2 - 2) : 1;
422}
423
414/* 424/*
415 * Console helpers. 425 * Console helpers.
416 */ 426 */
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 67d64e6efe7a..86be0cdeb11b 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -256,6 +256,7 @@ struct tty_operations;
256struct tty_struct { 256struct tty_struct {
257 int magic; 257 int magic;
258 struct kref kref; 258 struct kref kref;
259 struct device *dev;
259 struct tty_driver *driver; 260 struct tty_driver *driver;
260 const struct tty_operations *ops; 261 const struct tty_operations *ops;
261 int index; 262 int index;
@@ -465,7 +466,7 @@ extern void proc_clear_tty(struct task_struct *p);
465extern struct tty_struct *get_current_tty(void); 466extern struct tty_struct *get_current_tty(void);
466extern void tty_default_fops(struct file_operations *fops); 467extern void tty_default_fops(struct file_operations *fops);
467extern struct tty_struct *alloc_tty_struct(void); 468extern struct tty_struct *alloc_tty_struct(void);
468extern void tty_add_file(struct tty_struct *tty, struct file *file); 469extern int tty_add_file(struct tty_struct *tty, struct file *file);
469extern void free_tty_struct(struct tty_struct *tty); 470extern void free_tty_struct(struct tty_struct *tty);
470extern void initialize_tty_struct(struct tty_struct *tty, 471extern void initialize_tty_struct(struct tty_struct *tty,
471 struct tty_driver *driver, int idx); 472 struct tty_driver *driver, int idx);
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index b08677982525..db2d227694da 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -224,6 +224,12 @@
224 * unless the tty also has a valid tty->termiox pointer. 224 * unless the tty also has a valid tty->termiox pointer.
225 * 225 *
226 * Optional: Called under the termios lock 226 * Optional: Called under the termios lock
227 *
228 * int (*get_icount)(struct tty_struct *tty, struct serial_icounter *icount);
229 *
230 * Called when the device receives a TIOCGICOUNT ioctl. Passed a kernel
231 * structure to complete. This method is optional and will only be called
232 * if provided (otherwise EINVAL will be returned).
227 */ 233 */
228 234
229#include <linux/fs.h> 235#include <linux/fs.h>
@@ -232,6 +238,7 @@
232 238
233struct tty_struct; 239struct tty_struct;
234struct tty_driver; 240struct tty_driver;
241struct serial_icounter_struct;
235 242
236struct tty_operations { 243struct tty_operations {
237 struct tty_struct * (*lookup)(struct tty_driver *driver, 244 struct tty_struct * (*lookup)(struct tty_driver *driver,
@@ -268,6 +275,8 @@ struct tty_operations {
268 unsigned int set, unsigned int clear); 275 unsigned int set, unsigned int clear);
269 int (*resize)(struct tty_struct *tty, struct winsize *ws); 276 int (*resize)(struct tty_struct *tty, struct winsize *ws);
270 int (*set_termiox)(struct tty_struct *tty, struct termiox *tnew); 277 int (*set_termiox)(struct tty_struct *tty, struct termiox *tnew);
278 int (*get_icount)(struct tty_struct *tty,
279 struct serial_icounter_struct *icount);
271#ifdef CONFIG_CONSOLE_POLL 280#ifdef CONFIG_CONSOLE_POLL
272 int (*poll_init)(struct tty_driver *driver, int line, char *options); 281 int (*poll_init)(struct tty_driver *driver, int line, char *options);
273 int (*poll_get_char)(struct tty_driver *driver, int line); 282 int (*poll_get_char)(struct tty_driver *driver, int line);
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 55675b1efb28..16d682f4f7c3 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -271,6 +271,8 @@ struct usb_serial_driver {
271 int (*tiocmget)(struct tty_struct *tty, struct file *file); 271 int (*tiocmget)(struct tty_struct *tty, struct file *file);
272 int (*tiocmset)(struct tty_struct *tty, struct file *file, 272 int (*tiocmset)(struct tty_struct *tty, struct file *file,
273 unsigned int set, unsigned int clear); 273 unsigned int set, unsigned int clear);
274 int (*get_icount)(struct tty_struct *tty,
275 struct serial_icounter_struct *icount);
274 /* Called by the tty layer for port level work. There may or may not 276 /* Called by the tty layer for port level work. There may or may not
275 be an attached tty at this point */ 277 be an attached tty at this point */
276 void (*dtr_rts)(struct usb_serial_port *port, int on); 278 void (*dtr_rts)(struct usb_serial_port *port, int on);