diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-23 12:39:23 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-23 12:39:23 -0400 |
| commit | 10af77c193681398e5dbe830db181d86047fcd41 (patch) | |
| tree | b843eb8dae09a53efb410dd11d2132dba4fe4d15 /include/linux | |
| parent | 66f75a5d028beaf67c931435fdc3e7823125730c (diff) | |
| parent | 5f1a38952b7e932a1c169c28917b9a831f641bcc (diff) | |
Merge 3.4-rc4 into tty-next
This resolves the merge problem with:
drivers/tty/serial/pch_uart.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/generic_serial.h | 64 | ||||
| -rw-r--r-- | include/linux/isdn.h | 26 | ||||
| -rw-r--r-- | include/linux/of_serial.h | 17 | ||||
| -rw-r--r-- | include/linux/serial_8250.h | 1 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 5 |
5 files changed, 27 insertions, 86 deletions
diff --git a/include/linux/generic_serial.h b/include/linux/generic_serial.h index fadff28505bb..79b3eb37243a 100644 --- a/include/linux/generic_serial.h +++ b/include/linux/generic_serial.h | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | * Copyright (C) 1998 R.E.Wolff@BitWizard.nl | 4 | * Copyright (C) 1998 R.E.Wolff@BitWizard.nl |
| 5 | * | 5 | * |
| 6 | * written for the SX serial driver. | 6 | * written for the SX serial driver. |
| 7 | * Contains the code that should be shared over all the serial drivers. | ||
| 8 | * | 7 | * |
| 9 | * Version 0.1 -- December, 1998. | 8 | * Version 0.1 -- December, 1998. |
| 10 | */ | 9 | */ |
| @@ -12,45 +11,8 @@ | |||
| 12 | #ifndef GENERIC_SERIAL_H | 11 | #ifndef GENERIC_SERIAL_H |
| 13 | #define GENERIC_SERIAL_H | 12 | #define GENERIC_SERIAL_H |
| 14 | 13 | ||
| 15 | #ifdef __KERNEL__ | 14 | #warning Use of this header is deprecated. |
| 16 | #include <linux/mutex.h> | 15 | #warning Since nobody sets the constants defined here for you, you should not, in any case, use them. Including the header is thus pointless. |
| 17 | #include <linux/tty.h> | ||
| 18 | |||
| 19 | struct real_driver { | ||
| 20 | void (*disable_tx_interrupts) (void *); | ||
| 21 | void (*enable_tx_interrupts) (void *); | ||
| 22 | void (*disable_rx_interrupts) (void *); | ||
| 23 | void (*enable_rx_interrupts) (void *); | ||
| 24 | void (*shutdown_port) (void*); | ||
| 25 | int (*set_real_termios) (void*); | ||
| 26 | int (*chars_in_buffer) (void*); | ||
| 27 | void (*close) (void*); | ||
| 28 | void (*hungup) (void*); | ||
| 29 | void (*getserial) (void*, struct serial_struct *sp); | ||
| 30 | }; | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | struct gs_port { | ||
| 35 | int magic; | ||
| 36 | struct tty_port port; | ||
| 37 | unsigned char *xmit_buf; | ||
| 38 | int xmit_head; | ||
| 39 | int xmit_tail; | ||
| 40 | int xmit_cnt; | ||
| 41 | struct mutex port_write_mutex; | ||
| 42 | unsigned long event; | ||
| 43 | unsigned short closing_wait; | ||
| 44 | int close_delay; | ||
| 45 | struct real_driver *rd; | ||
| 46 | int wakeup_chars; | ||
| 47 | int baud_base; | ||
| 48 | int baud; | ||
| 49 | int custom_divisor; | ||
| 50 | spinlock_t driver_lock; | ||
| 51 | }; | ||
| 52 | |||
| 53 | #endif /* __KERNEL__ */ | ||
| 54 | 16 | ||
| 55 | /* Flags */ | 17 | /* Flags */ |
| 56 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" | 18 | /* Warning: serial.h defines some ASYNC_ flags, they say they are "only" |
| @@ -60,8 +22,6 @@ struct gs_port { | |||
| 60 | #define GS_RX_INTEN 0x00400000 | 22 | #define GS_RX_INTEN 0x00400000 |
| 61 | #define GS_ACTIVE 0x00200000 | 23 | #define GS_ACTIVE 0x00200000 |
| 62 | 24 | ||
| 63 | |||
| 64 | |||
| 65 | #define GS_TYPE_NORMAL 1 | 25 | #define GS_TYPE_NORMAL 1 |
| 66 | 26 | ||
| 67 | #define GS_DEBUG_FLUSH 0x00000001 | 27 | #define GS_DEBUG_FLUSH 0x00000001 |
| @@ -72,24 +32,4 @@ struct gs_port { | |||
| 72 | #define GS_DEBUG_FLOW 0x00000020 | 32 | #define GS_DEBUG_FLOW 0x00000020 |
| 73 | #define GS_DEBUG_WRITE 0x00000040 | 33 | #define GS_DEBUG_WRITE 0x00000040 |
| 74 | 34 | ||
| 75 | #ifdef __KERNEL__ | ||
| 76 | int gs_put_char(struct tty_struct *tty, unsigned char ch); | ||
| 77 | int gs_write(struct tty_struct *tty, | ||
| 78 | const unsigned char *buf, int count); | ||
| 79 | int gs_write_room(struct tty_struct *tty); | ||
| 80 | int gs_chars_in_buffer(struct tty_struct *tty); | ||
| 81 | void gs_flush_buffer(struct tty_struct *tty); | ||
| 82 | void gs_flush_chars(struct tty_struct *tty); | ||
| 83 | void gs_stop(struct tty_struct *tty); | ||
| 84 | void gs_start(struct tty_struct *tty); | ||
| 85 | void gs_hangup(struct tty_struct *tty); | ||
| 86 | int gs_block_til_ready(void *port, struct file *filp); | ||
| 87 | void gs_close(struct tty_struct *tty, struct file *filp); | ||
| 88 | void gs_set_termios (struct tty_struct * tty, | ||
| 89 | struct ktermios * old_termios); | ||
| 90 | int gs_init_port(struct gs_port *port); | ||
| 91 | int gs_setserial(struct gs_port *port, struct serial_struct __user *sp); | ||
| 92 | int gs_getserial(struct gs_port *port, struct serial_struct __user *sp); | ||
| 93 | void gs_got_break(struct gs_port *port); | ||
| 94 | #endif /* __KERNEL__ */ | ||
| 95 | #endif | 35 | #endif |
diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 292f27a793d4..215c41602af8 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #define __ISDN_H__ | 15 | #define __ISDN_H__ |
| 16 | 16 | ||
| 17 | #include <linux/ioctl.h> | 17 | #include <linux/ioctl.h> |
| 18 | #include <linux/tty.h> | ||
| 18 | 19 | ||
| 19 | #define ISDN_MAX_DRIVERS 32 | 20 | #define ISDN_MAX_DRIVERS 32 |
| 20 | #define ISDN_MAX_CHANNELS 64 | 21 | #define ISDN_MAX_CHANNELS 64 |
| @@ -392,21 +393,8 @@ typedef struct isdn_net_dev_s { | |||
| 392 | /*======================= Start of ISDN-tty stuff ===========================*/ | 393 | /*======================= Start of ISDN-tty stuff ===========================*/ |
| 393 | 394 | ||
| 394 | #define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ | 395 | #define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ |
| 395 | #define ISDN_ASYNC_INITIALIZED 0x80000000 /* port was initialized */ | ||
| 396 | #define ISDN_ASYNC_CALLOUT_ACTIVE 0x40000000 /* Call out device active */ | ||
| 397 | #define ISDN_ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device active */ | ||
| 398 | #define ISDN_ASYNC_CLOSING 0x08000000 /* Serial port is closing */ | ||
| 399 | #define ISDN_ASYNC_CTS_FLOW 0x04000000 /* Do CTS flow control */ | ||
| 400 | #define ISDN_ASYNC_CHECK_CD 0x02000000 /* i.e., CLOCAL */ | ||
| 401 | #define ISDN_ASYNC_HUP_NOTIFY 0x0001 /* Notify tty on hangups/closes */ | ||
| 402 | #define ISDN_ASYNC_SESSION_LOCKOUT 0x0100 /* Lock cua opens on session */ | ||
| 403 | #define ISDN_ASYNC_PGRP_LOCKOUT 0x0200 /* Lock cua opens on pgrp */ | ||
| 404 | #define ISDN_ASYNC_CALLOUT_NOHUP 0x0400 /* No hangup for cui */ | ||
| 405 | #define ISDN_ASYNC_SPLIT_TERMIOS 0x0008 /* Sep. termios for dialin/out */ | ||
| 406 | #define ISDN_SERIAL_XMIT_SIZE 1024 /* Default bufsize for write */ | 396 | #define ISDN_SERIAL_XMIT_SIZE 1024 /* Default bufsize for write */ |
| 407 | #define ISDN_SERIAL_XMIT_MAX 4000 /* Maximum bufsize for write */ | 397 | #define ISDN_SERIAL_XMIT_MAX 4000 /* Maximum bufsize for write */ |
| 408 | #define ISDN_SERIAL_TYPE_NORMAL 1 | ||
| 409 | #define ISDN_SERIAL_TYPE_CALLOUT 2 | ||
| 410 | 398 | ||
| 411 | #ifdef CONFIG_ISDN_AUDIO | 399 | #ifdef CONFIG_ISDN_AUDIO |
| 412 | /* For using sk_buffs with audio we need some private variables | 400 | /* For using sk_buffs with audio we need some private variables |
| @@ -448,17 +436,12 @@ typedef struct atemu { | |||
| 448 | /* Private data (similar to async_struct in <linux/serial.h>) */ | 436 | /* Private data (similar to async_struct in <linux/serial.h>) */ |
| 449 | typedef struct modem_info { | 437 | typedef struct modem_info { |
| 450 | int magic; | 438 | int magic; |
| 451 | struct module *owner; | 439 | struct tty_port port; |
| 452 | int flags; /* defined in tty.h */ | ||
| 453 | int x_char; /* xon/xoff character */ | 440 | int x_char; /* xon/xoff character */ |
| 454 | int mcr; /* Modem control register */ | 441 | int mcr; /* Modem control register */ |
| 455 | int msr; /* Modem status register */ | 442 | int msr; /* Modem status register */ |
| 456 | int lsr; /* Line status register */ | 443 | int lsr; /* Line status register */ |
| 457 | int line; | 444 | int line; |
| 458 | int count; /* # of fd on device */ | ||
| 459 | int blocked_open; /* # of blocked opens */ | ||
| 460 | long session; /* Session of opening process */ | ||
| 461 | long pgrp; /* pgrp of opening process */ | ||
| 462 | int online; /* 1 = B-Channel is up, drop data */ | 445 | int online; /* 1 = B-Channel is up, drop data */ |
| 463 | /* 2 = B-Channel is up, deliver d.*/ | 446 | /* 2 = B-Channel is up, deliver d.*/ |
| 464 | int dialing; /* Dial in progress or ATA */ | 447 | int dialing; /* Dial in progress or ATA */ |
| @@ -478,7 +461,6 @@ typedef struct modem_info { | |||
| 478 | int send_outstanding;/* # of outstanding send-requests */ | 461 | int send_outstanding;/* # of outstanding send-requests */ |
| 479 | int xmit_size; /* max. # of chars in xmit_buf */ | 462 | int xmit_size; /* max. # of chars in xmit_buf */ |
| 480 | int xmit_count; /* # of chars in xmit_buf */ | 463 | int xmit_count; /* # of chars in xmit_buf */ |
| 481 | unsigned char *xmit_buf; /* transmit buffer */ | ||
| 482 | struct sk_buff_head xmit_queue; /* transmit queue */ | 464 | struct sk_buff_head xmit_queue; /* transmit queue */ |
| 483 | atomic_t xmit_lock; /* Semaphore for isdn_tty_write */ | 465 | atomic_t xmit_lock; /* Semaphore for isdn_tty_write */ |
| 484 | #ifdef CONFIG_ISDN_AUDIO | 466 | #ifdef CONFIG_ISDN_AUDIO |
| @@ -496,11 +478,7 @@ typedef struct modem_info { | |||
| 496 | struct T30_s *fax; /* T30 Fax Group 3 data/interface */ | 478 | struct T30_s *fax; /* T30 Fax Group 3 data/interface */ |
| 497 | int faxonline; /* Fax-channel status */ | 479 | int faxonline; /* Fax-channel status */ |
| 498 | #endif | 480 | #endif |
| 499 | struct tty_struct *tty; /* Pointer to corresponding tty */ | ||
| 500 | atemu emu; /* AT-emulator data */ | 481 | atemu emu; /* AT-emulator data */ |
| 501 | struct ktermios normal_termios; /* For saving termios structs */ | ||
| 502 | struct ktermios callout_termios; | ||
| 503 | wait_queue_head_t open_wait, close_wait; | ||
| 504 | spinlock_t readlock; | 482 | spinlock_t readlock; |
| 505 | } modem_info; | 483 | } modem_info; |
| 506 | 484 | ||
diff --git a/include/linux/of_serial.h b/include/linux/of_serial.h new file mode 100644 index 000000000000..4a73ed80b4c0 --- /dev/null +++ b/include/linux/of_serial.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #ifndef __LINUX_OF_SERIAL_H | ||
| 2 | #define __LINUX_OF_SERIAL_H | ||
| 3 | |||
| 4 | /* | ||
| 5 | * FIXME remove this file when tegra finishes conversion to open firmware, | ||
| 6 | * expectation is that all quirks will then be self-contained in | ||
| 7 | * drivers/tty/serial/of_serial.c. | ||
| 8 | */ | ||
| 9 | #ifdef CONFIG_ARCH_TEGRA | ||
| 10 | extern void tegra_serial_handle_break(struct uart_port *port); | ||
| 11 | #else | ||
| 12 | static inline void tegra_serial_handle_break(struct uart_port *port) | ||
| 13 | { | ||
| 14 | } | ||
| 15 | #endif | ||
| 16 | |||
| 17 | #endif /* __LINUX_OF_SERIAL */ | ||
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 8f012f8ac8e9..a522fd977aad 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
| @@ -38,6 +38,7 @@ struct plat_serial8250_port { | |||
| 38 | int (*handle_irq)(struct uart_port *); | 38 | int (*handle_irq)(struct uart_port *); |
| 39 | void (*pm)(struct uart_port *, unsigned int state, | 39 | void (*pm)(struct uart_port *, unsigned int state, |
| 40 | unsigned old); | 40 | unsigned old); |
| 41 | void (*handle_break)(struct uart_port *); | ||
| 41 | }; | 42 | }; |
| 42 | 43 | ||
| 43 | /* | 44 | /* |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 2db407a40051..65db9928e15f 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -310,6 +310,7 @@ struct uart_port { | |||
| 310 | int (*handle_irq)(struct uart_port *); | 310 | int (*handle_irq)(struct uart_port *); |
| 311 | void (*pm)(struct uart_port *, unsigned int state, | 311 | void (*pm)(struct uart_port *, unsigned int state, |
| 312 | unsigned int old); | 312 | unsigned int old); |
| 313 | void (*handle_break)(struct uart_port *); | ||
| 313 | unsigned int irq; /* irq number */ | 314 | unsigned int irq; /* irq number */ |
| 314 | unsigned long irqflags; /* irq flags */ | 315 | unsigned long irqflags; /* irq flags */ |
| 315 | unsigned int uartclk; /* base uart clock */ | 316 | unsigned int uartclk; /* base uart clock */ |
| @@ -533,6 +534,10 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) | |||
| 533 | static inline int uart_handle_break(struct uart_port *port) | 534 | static inline int uart_handle_break(struct uart_port *port) |
| 534 | { | 535 | { |
| 535 | struct uart_state *state = port->state; | 536 | struct uart_state *state = port->state; |
| 537 | |||
| 538 | if (port->handle_break) | ||
| 539 | port->handle_break(port); | ||
| 540 | |||
| 536 | #ifdef SUPPORT_SYSRQ | 541 | #ifdef SUPPORT_SYSRQ |
| 537 | if (port->cons && port->cons->index == port->line) { | 542 | if (port->cons && port->cons->index == port->line) { |
| 538 | if (!port->sysrq) { | 543 | if (!port->sysrq) { |
