diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/altera_uart.h | 5 | ||||
| -rw-r--r-- | include/linux/selection.h | 1 | ||||
| -rw-r--r-- | include/linux/serial_8250.h | 8 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 10 | ||||
| -rw-r--r-- | include/linux/tty.h | 3 | ||||
| -rw-r--r-- | include/linux/tty_driver.h | 9 | ||||
| -rw-r--r-- | include/linux/usb/serial.h | 2 |
7 files changed, 37 insertions, 1 deletions
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 | |||
| 8 | struct altera_uart_platform_uart { | 10 | struct 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 | ||
| 17 | int __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 | ||
| 40 | extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org); | 40 | extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org); |
| 41 | extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); | 41 | extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); |
| 42 | extern 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); | |||
| 76 | extern int setup_early_serial8250_console(char *cmdline); | 78 | extern int setup_early_serial8250_console(char *cmdline); |
| 77 | extern void serial8250_do_set_termios(struct uart_port *port, | 79 | extern void serial8250_do_set_termios(struct uart_port *port, |
| 78 | struct ktermios *termios, struct ktermios *old); | 80 | struct ktermios *termios, struct ktermios *old); |
| 81 | extern void serial8250_do_pm(struct uart_port *port, unsigned int state, | ||
| 82 | unsigned int oldstate); | ||
| 83 | |||
| 84 | extern 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); |
| 412 | unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); | 414 | unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud); |
| 413 | 415 | ||
| 416 | /* Base timer interval for polling */ | ||
| 417 | static 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; | |||
| 256 | struct tty_struct { | 256 | struct 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); | |||
| 465 | extern struct tty_struct *get_current_tty(void); | 466 | extern struct tty_struct *get_current_tty(void); |
| 466 | extern void tty_default_fops(struct file_operations *fops); | 467 | extern void tty_default_fops(struct file_operations *fops); |
| 467 | extern struct tty_struct *alloc_tty_struct(void); | 468 | extern struct tty_struct *alloc_tty_struct(void); |
| 468 | extern void tty_add_file(struct tty_struct *tty, struct file *file); | 469 | extern int tty_add_file(struct tty_struct *tty, struct file *file); |
| 469 | extern void free_tty_struct(struct tty_struct *tty); | 470 | extern void free_tty_struct(struct tty_struct *tty); |
| 470 | extern void initialize_tty_struct(struct tty_struct *tty, | 471 | extern 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 | ||
| 233 | struct tty_struct; | 239 | struct tty_struct; |
| 234 | struct tty_driver; | 240 | struct tty_driver; |
| 241 | struct serial_icounter_struct; | ||
| 235 | 242 | ||
| 236 | struct tty_operations { | 243 | struct 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); |
