diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/kernel.h | 3 | ||||
| -rw-r--r-- | include/linux/serial_8250.h | 3 | ||||
| -rw-r--r-- | include/linux/serial_bcm63xx.h | 2 | ||||
| -rw-r--r-- | include/linux/serial_core.h | 67 | ||||
| -rw-r--r-- | include/linux/tty.h | 28 | ||||
| -rw-r--r-- | include/uapi/linux/serial_core.h | 3 | ||||
| -rw-r--r-- | include/uapi/linux/serial_reg.h | 1 | ||||
| -rw-r--r-- | include/uapi/linux/tty_flags.h | 19 | ||||
| -rw-r--r-- | include/uapi/linux/vt.h | 3 |
9 files changed, 66 insertions, 63 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 233ea8107038..5449d2f4a1ef 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -416,9 +416,6 @@ extern int __kernel_text_address(unsigned long addr); | |||
| 416 | extern int kernel_text_address(unsigned long addr); | 416 | extern int kernel_text_address(unsigned long addr); |
| 417 | extern int func_ptr_is_kernel_text(void *ptr); | 417 | extern int func_ptr_is_kernel_text(void *ptr); |
| 418 | 418 | ||
| 419 | struct pid; | ||
| 420 | extern struct pid *session_of_pgrp(struct pid *pgrp); | ||
| 421 | |||
| 422 | unsigned long int_sqrt(unsigned long); | 419 | unsigned long int_sqrt(unsigned long); |
| 423 | 420 | ||
| 424 | extern void bust_spinlocks(int yes); | 421 | extern void bust_spinlocks(int yes); |
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index 3df10d5f154b..e02acf0a0ec9 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h | |||
| @@ -97,13 +97,10 @@ struct uart_8250_port { | |||
| 97 | unsigned char msr_saved_flags; | 97 | unsigned char msr_saved_flags; |
| 98 | 98 | ||
| 99 | struct uart_8250_dma *dma; | 99 | struct uart_8250_dma *dma; |
| 100 | struct serial_rs485 rs485; | ||
| 101 | 100 | ||
| 102 | /* 8250 specific callbacks */ | 101 | /* 8250 specific callbacks */ |
| 103 | int (*dl_read)(struct uart_8250_port *); | 102 | int (*dl_read)(struct uart_8250_port *); |
| 104 | void (*dl_write)(struct uart_8250_port *, int); | 103 | void (*dl_write)(struct uart_8250_port *, int); |
| 105 | int (*rs485_config)(struct uart_8250_port *, | ||
| 106 | struct serial_rs485 *rs485); | ||
| 107 | }; | 104 | }; |
| 108 | 105 | ||
| 109 | static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up) | 106 | static inline struct uart_8250_port *up_to_u8250p(struct uart_port *up) |
diff --git a/include/linux/serial_bcm63xx.h b/include/linux/serial_bcm63xx.h index a80aa1a5bee2..570e964dc899 100644 --- a/include/linux/serial_bcm63xx.h +++ b/include/linux/serial_bcm63xx.h | |||
| @@ -116,6 +116,4 @@ | |||
| 116 | UART_FIFO_PARERR_MASK | \ | 116 | UART_FIFO_PARERR_MASK | \ |
| 117 | UART_FIFO_BRKDET_MASK) | 117 | UART_FIFO_BRKDET_MASK) |
| 118 | 118 | ||
| 119 | #define UART_REG_SIZE 24 | ||
| 120 | |||
| 121 | #endif /* _LINUX_SERIAL_BCM63XX_H */ | 119 | #endif /* _LINUX_SERIAL_BCM63XX_H */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 21c2e05c1bc3..057038cf2788 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -63,7 +63,7 @@ struct uart_ops { | |||
| 63 | void (*flush_buffer)(struct uart_port *); | 63 | void (*flush_buffer)(struct uart_port *); |
| 64 | void (*set_termios)(struct uart_port *, struct ktermios *new, | 64 | void (*set_termios)(struct uart_port *, struct ktermios *new, |
| 65 | struct ktermios *old); | 65 | struct ktermios *old); |
| 66 | void (*set_ldisc)(struct uart_port *, int new); | 66 | void (*set_ldisc)(struct uart_port *, struct ktermios *); |
| 67 | void (*pm)(struct uart_port *, unsigned int state, | 67 | void (*pm)(struct uart_port *, unsigned int state, |
| 68 | unsigned int oldstate); | 68 | unsigned int oldstate); |
| 69 | 69 | ||
| @@ -131,6 +131,8 @@ struct uart_port { | |||
| 131 | void (*pm)(struct uart_port *, unsigned int state, | 131 | void (*pm)(struct uart_port *, unsigned int state, |
| 132 | unsigned int old); | 132 | unsigned int old); |
| 133 | void (*handle_break)(struct uart_port *); | 133 | void (*handle_break)(struct uart_port *); |
| 134 | int (*rs485_config)(struct uart_port *, | ||
| 135 | struct serial_rs485 *rs485); | ||
| 134 | unsigned int irq; /* irq number */ | 136 | unsigned int irq; /* irq number */ |
| 135 | unsigned long irqflags; /* irq flags */ | 137 | unsigned long irqflags; /* irq flags */ |
| 136 | unsigned int uartclk; /* base uart clock */ | 138 | unsigned int uartclk; /* base uart clock */ |
| @@ -140,12 +142,13 @@ struct uart_port { | |||
| 140 | unsigned char iotype; /* io access style */ | 142 | unsigned char iotype; /* io access style */ |
| 141 | unsigned char unused1; | 143 | unsigned char unused1; |
| 142 | 144 | ||
| 143 | #define UPIO_PORT (0) | 145 | #define UPIO_PORT (0) /* 8b I/O port access */ |
| 144 | #define UPIO_HUB6 (1) | 146 | #define UPIO_HUB6 (1) /* Hub6 ISA card */ |
| 145 | #define UPIO_MEM (2) | 147 | #define UPIO_MEM (2) /* 8b MMIO access */ |
| 146 | #define UPIO_MEM32 (3) | 148 | #define UPIO_MEM32 (3) /* 32b little endian */ |
| 147 | #define UPIO_AU (4) /* Au1x00 and RT288x type IO */ | 149 | #define UPIO_MEM32BE (4) /* 32b big endian */ |
| 148 | #define UPIO_TSI (5) /* Tsi108/109 type IO */ | 150 | #define UPIO_AU (5) /* Au1x00 and RT288x type IO */ |
| 151 | #define UPIO_TSI (6) /* Tsi108/109 type IO */ | ||
| 149 | 152 | ||
| 150 | unsigned int read_status_mask; /* driver specific */ | 153 | unsigned int read_status_mask; /* driver specific */ |
| 151 | unsigned int ignore_status_mask; /* driver specific */ | 154 | unsigned int ignore_status_mask; /* driver specific */ |
| @@ -160,21 +163,33 @@ struct uart_port { | |||
| 160 | /* flags must be updated while holding port mutex */ | 163 | /* flags must be updated while holding port mutex */ |
| 161 | upf_t flags; | 164 | upf_t flags; |
| 162 | 165 | ||
| 163 | #define UPF_FOURPORT ((__force upf_t) (1 << 1)) | 166 | /* |
| 164 | #define UPF_SAK ((__force upf_t) (1 << 2)) | 167 | * These flags must be equivalent to the flags defined in |
| 165 | #define UPF_SPD_MASK ((__force upf_t) (0x1030)) | 168 | * include/uapi/linux/tty_flags.h which are the userspace definitions |
| 166 | #define UPF_SPD_HI ((__force upf_t) (0x0010)) | 169 | * assigned from the serial_struct flags in uart_set_info() |
| 167 | #define UPF_SPD_VHI ((__force upf_t) (0x0020)) | 170 | * [for bit definitions in the UPF_CHANGE_MASK] |
| 168 | #define UPF_SPD_CUST ((__force upf_t) (0x0030)) | 171 | * |
| 169 | #define UPF_SPD_SHI ((__force upf_t) (0x1000)) | 172 | * Bits [0..UPF_LAST_USER] are userspace defined/visible/changeable |
| 170 | #define UPF_SPD_WARP ((__force upf_t) (0x1010)) | 173 | * except bit 15 (UPF_NO_TXEN_TEST) which is masked off. |
| 171 | #define UPF_SKIP_TEST ((__force upf_t) (1 << 6)) | 174 | * The remaining bits are serial-core specific and not modifiable by |
| 172 | #define UPF_AUTO_IRQ ((__force upf_t) (1 << 7)) | 175 | * userspace. |
| 173 | #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) | 176 | */ |
| 174 | #define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) | 177 | #define UPF_FOURPORT ((__force upf_t) ASYNC_FOURPORT /* 1 */ ) |
| 175 | #define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) | 178 | #define UPF_SAK ((__force upf_t) ASYNC_SAK /* 2 */ ) |
| 179 | #define UPF_SPD_HI ((__force upf_t) ASYNC_SPD_HI /* 4 */ ) | ||
| 180 | #define UPF_SPD_VHI ((__force upf_t) ASYNC_SPD_VHI /* 5 */ ) | ||
| 181 | #define UPF_SPD_CUST ((__force upf_t) ASYNC_SPD_CUST /* 0x0030 */ ) | ||
| 182 | #define UPF_SPD_WARP ((__force upf_t) ASYNC_SPD_WARP /* 0x1010 */ ) | ||
| 183 | #define UPF_SPD_MASK ((__force upf_t) ASYNC_SPD_MASK /* 0x1030 */ ) | ||
| 184 | #define UPF_SKIP_TEST ((__force upf_t) ASYNC_SKIP_TEST /* 6 */ ) | ||
| 185 | #define UPF_AUTO_IRQ ((__force upf_t) ASYNC_AUTO_IRQ /* 7 */ ) | ||
| 186 | #define UPF_HARDPPS_CD ((__force upf_t) ASYNC_HARDPPS_CD /* 11 */ ) | ||
| 187 | #define UPF_SPD_SHI ((__force upf_t) ASYNC_SPD_SHI /* 12 */ ) | ||
| 188 | #define UPF_LOW_LATENCY ((__force upf_t) ASYNC_LOW_LATENCY /* 13 */ ) | ||
| 189 | #define UPF_BUGGY_UART ((__force upf_t) ASYNC_BUGGY_UART /* 14 */ ) | ||
| 176 | #define UPF_NO_TXEN_TEST ((__force upf_t) (1 << 15)) | 190 | #define UPF_NO_TXEN_TEST ((__force upf_t) (1 << 15)) |
| 177 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) | 191 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) ASYNC_MAGIC_MULTIPLIER /* 16 */ ) |
| 192 | |||
| 178 | /* Port has hardware-assisted h/w flow control (iow, auto-RTS *not* auto-CTS) */ | 193 | /* Port has hardware-assisted h/w flow control (iow, auto-RTS *not* auto-CTS) */ |
| 179 | #define UPF_HARD_FLOW ((__force upf_t) (1 << 21)) | 194 | #define UPF_HARD_FLOW ((__force upf_t) (1 << 21)) |
| 180 | /* Port has hardware-assisted s/w flow control */ | 195 | /* Port has hardware-assisted s/w flow control */ |
| @@ -190,9 +205,14 @@ struct uart_port { | |||
| 190 | #define UPF_DEAD ((__force upf_t) (1 << 30)) | 205 | #define UPF_DEAD ((__force upf_t) (1 << 30)) |
| 191 | #define UPF_IOREMAP ((__force upf_t) (1 << 31)) | 206 | #define UPF_IOREMAP ((__force upf_t) (1 << 31)) |
| 192 | 207 | ||
| 193 | #define UPF_CHANGE_MASK ((__force upf_t) (0x17fff)) | 208 | #define __UPF_CHANGE_MASK 0x17fff |
| 209 | #define UPF_CHANGE_MASK ((__force upf_t) __UPF_CHANGE_MASK) | ||
| 194 | #define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY)) | 210 | #define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY)) |
| 195 | 211 | ||
| 212 | #if __UPF_CHANGE_MASK > ASYNC_FLAGS | ||
| 213 | #error Change mask not equivalent to userspace-visible bit defines | ||
| 214 | #endif | ||
| 215 | |||
| 196 | /* status must be updated while holding port lock */ | 216 | /* status must be updated while holding port lock */ |
| 197 | upstat_t status; | 217 | upstat_t status; |
| 198 | 218 | ||
| @@ -214,6 +234,7 @@ struct uart_port { | |||
| 214 | unsigned char unused[2]; | 234 | unsigned char unused[2]; |
| 215 | struct attribute_group *attr_group; /* port specific attributes */ | 235 | struct attribute_group *attr_group; /* port specific attributes */ |
| 216 | const struct attribute_group **tty_groups; /* all attributes (serial core use only) */ | 236 | const struct attribute_group **tty_groups; /* all attributes (serial core use only) */ |
| 237 | struct serial_rs485 rs485; | ||
| 217 | void *private_data; /* generic platform data pointer */ | 238 | void *private_data; /* generic platform data pointer */ |
| 218 | }; | 239 | }; |
| 219 | 240 | ||
| @@ -367,7 +388,7 @@ static inline int uart_tx_stopped(struct uart_port *port) | |||
| 367 | 388 | ||
| 368 | static inline bool uart_cts_enabled(struct uart_port *uport) | 389 | static inline bool uart_cts_enabled(struct uart_port *uport) |
| 369 | { | 390 | { |
| 370 | return uport->status & UPSTAT_CTS_ENABLE; | 391 | return !!(uport->status & UPSTAT_CTS_ENABLE); |
| 371 | } | ||
