diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 00:35:12 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 00:35:12 -0500 |
| commit | fd0d351de7bbd718bc2b34d5846854831aa2b88c (patch) | |
| tree | b4630c372215deb2e17235707189f06603bee3a3 /include | |
| parent | 3d6f47801c34e42da26e2b6b29706f0bfe423978 (diff) | |
| parent | e052c6d15c61cc4caff2f06cbca72b183da9f15e (diff) | |
Merge tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial driver updates from Greg KH:
"Here is the big tty and serial driver update for 4.4-rc1.
Lots of serial driver updates and a few small tty core changes. Full
details in the shortlog.
All of these have been in linux-next for a while"
* tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (148 commits)
tty: Use unbound workqueue for all input workers
tty: Abstract tty buffer work
tty: Prevent tty teardown during tty_write_message()
tty: core: Use correct spinlock flavor in tiocspgrp()
tty: Combine SIGTTOU/SIGTTIN handling
serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
ttyFDC: Fix build problems due to use of module_{init,exit}
tty: remove unneeded return statement
serial: 8250_mid: add support for DMA engine handling from UART MMIO
dmaengine: hsu: remove platform data
dmaengine: hsu: introduce stubs for the exported functions
dmaengine: hsu: make the UART driver in control of selecting this driver
serial: fix mctrl helper functions
serial: 8250_pci: Intel MID UART support to its own driver
serial: fsl_lpuart: add earlycon support
tty: disable unbind for old 74xx based serial/mpsc console port
serial: pl011: Spelling s/clocks-names/clock-names/
n_tty: Remove reader wakeups for TTY_BREAK/TTY_PARITY chars
tty: synclink, fix indentation
serial: at91, fix rs485 properties
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/dma/hsu.h | 11 | ||||
| -rw-r--r-- | include/linux/n_r3964.h | 8 | ||||
| -rw-r--r-- | include/linux/platform_data/atmel.h | 6 | ||||
| -rw-r--r-- | include/linux/platform_data/dma-hsu.h | 4 | ||||
| -rw-r--r-- | include/linux/tty.h | 48 |
5 files changed, 16 insertions, 61 deletions
diff --git a/include/linux/dma/hsu.h b/include/linux/dma/hsu.h index 234393a6997b..79df69dc629c 100644 --- a/include/linux/dma/hsu.h +++ b/include/linux/dma/hsu.h | |||
| @@ -35,14 +35,23 @@ struct hsu_dma_chip { | |||
| 35 | unsigned int length; | 35 | unsigned int length; |
| 36 | unsigned int offset; | 36 | unsigned int offset; |
| 37 | struct hsu_dma *hsu; | 37 | struct hsu_dma *hsu; |
| 38 | struct hsu_dma_platform_data *pdata; | ||
| 39 | }; | 38 | }; |
| 40 | 39 | ||
| 40 | #if IS_ENABLED(CONFIG_HSU_DMA) | ||
| 41 | /* Export to the internal users */ | 41 | /* Export to the internal users */ |
| 42 | irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr); | 42 | irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, unsigned short nr); |
| 43 | 43 | ||
| 44 | /* Export to the platform drivers */ | 44 | /* Export to the platform drivers */ |
| 45 | int hsu_dma_probe(struct hsu_dma_chip *chip); | 45 | int hsu_dma_probe(struct hsu_dma_chip *chip); |
| 46 | int hsu_dma_remove(struct hsu_dma_chip *chip); | 46 | int hsu_dma_remove(struct hsu_dma_chip *chip); |
| 47 | #else | ||
| 48 | static inline irqreturn_t hsu_dma_irq(struct hsu_dma_chip *chip, | ||
| 49 | unsigned short nr) | ||
| 50 | { | ||
| 51 | return IRQ_NONE; | ||
| 52 | } | ||
| 53 | static inline int hsu_dma_probe(struct hsu_dma_chip *chip) { return -ENODEV; } | ||
| 54 | static inline int hsu_dma_remove(struct hsu_dma_chip *chip) { return 0; } | ||
| 55 | #endif /* CONFIG_HSU_DMA */ | ||
| 47 | 56 | ||
| 48 | #endif /* _DMA_HSU_H */ | 57 | #endif /* _DMA_HSU_H */ |
diff --git a/include/linux/n_r3964.h b/include/linux/n_r3964.h index 5d0b2a1dee69..90a803aa42e8 100644 --- a/include/linux/n_r3964.h +++ b/include/linux/n_r3964.h | |||
| @@ -152,9 +152,6 @@ struct r3964_info { | |||
| 152 | unsigned char *rx_buf; /* ring buffer */ | 152 | unsigned char *rx_buf; /* ring buffer */ |
| 153 | unsigned char *tx_buf; | 153 | unsigned char *tx_buf; |
| 154 | 154 | ||
| 155 | wait_queue_head_t read_wait; | ||
| 156 | //struct wait_queue *read_wait; | ||
| 157 | |||
| 158 | struct r3964_block_header *rx_first; | 155 | struct r3964_block_header *rx_first; |
| 159 | struct r3964_block_header *rx_last; | 156 | struct r3964_block_header *rx_last; |
| 160 | struct r3964_block_header *tx_first; | 157 | struct r3964_block_header *tx_first; |
| @@ -164,8 +161,9 @@ struct r3964_info { | |||
| 164 | unsigned char last_rx; | 161 | unsigned char last_rx; |
| 165 | unsigned char bcc; | 162 | unsigned char bcc; |
| 166 | unsigned int blocks_in_rx_queue; | 163 | unsigned int blocks_in_rx_queue; |
| 167 | 164 | ||
| 168 | 165 | struct mutex read_lock; /* serialize r3964_read */ | |
| 166 | |||
| 169 | struct r3964_client_info *firstClient; | 167 | struct r3964_client_info *firstClient; |
| 170 | unsigned int state; | 168 | unsigned int state; |
| 171 | unsigned int flags; | 169 | unsigned int flags; |
diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h index bdc0ee8e84e9..91b16adab0cd 100644 --- a/include/linux/platform_data/atmel.h +++ b/include/linux/platform_data/atmel.h | |||
| @@ -19,12 +19,6 @@ | |||
| 19 | #include <linux/serial.h> | 19 | #include <linux/serial.h> |
| 20 | #include <linux/platform_data/macb.h> | 20 | #include <linux/platform_data/macb.h> |
| 21 | 21 | ||
| 22 | /* | ||
| 23 | * at91: 6 USARTs and one DBGU port (SAM9260) | ||
| 24 | * avr32: 4 | ||
| 25 | */ | ||
| 26 | #define ATMEL_MAX_UART 7 | ||
| 27 | |||
| 28 | /* Compact Flash */ | 22 | /* Compact Flash */ |
| 29 | struct at91_cf_data { | 23 | struct at91_cf_data { |
| 30 | int irq_pin; /* I/O IRQ */ | 24 | int irq_pin; /* I/O IRQ */ |
diff --git a/include/linux/platform_data/dma-hsu.h b/include/linux/platform_data/dma-hsu.h index 8a1f6a4920b2..3453fa655502 100644 --- a/include/linux/platform_data/dma-hsu.h +++ b/include/linux/platform_data/dma-hsu.h | |||
| @@ -18,8 +18,4 @@ struct hsu_dma_slave { | |||
| 18 | int chan_id; | 18 | int chan_id; |
| 19 | }; | 19 | }; |
| 20 | 20 | ||
| 21 | struct hsu_dma_platform_data { | ||
| 22 | unsigned short nr_channels; | ||
| 23 | }; | ||
| 24 | |||
| 25 | #endif /* _PLATFORM_DATA_DMA_HSU_H */ | 21 | #endif /* _PLATFORM_DATA_DMA_HSU_H */ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index d072ded41678..5b04b0a5375b 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -227,7 +227,6 @@ struct tty_port { | |||
| 227 | int blocked_open; /* Waiting to open */ | 227 | int blocked_open; /* Waiting to open */ |
| 228 | int count; /* Usage count */ | 228 | int count; /* Usage count */ |
| 229 | wait_queue_head_t open_wait; /* Open waiters */ | 229 | wait_queue_head_t open_wait; /* Open waiters */ |
| 230 | wait_queue_head_t close_wait; /* Close waiters */ | ||
| 231 | wait_queue_head_t delta_msr_wait; /* Modem status change */ | 230 | wait_queue_head_t delta_msr_wait; /* Modem status change */ |
| 232 | unsigned long flags; /* TTY flags ASY_*/ | 231 | unsigned long flags; /* TTY flags ASY_*/ |
| 233 | unsigned char console:1, /* port is a console */ | 232 | unsigned char console:1, /* port is a console */ |
| @@ -424,6 +423,7 @@ extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, | |||
| 424 | const char *routine); | 423 | const char *routine); |
| 425 | extern const char *tty_name(const struct tty_struct *tty); | 424 | extern const char *tty_name(const struct tty_struct *tty); |
| 426 | extern void tty_wait_until_sent(struct tty_struct *tty, long timeout); | 425 | extern void tty_wait_until_sent(struct tty_struct *tty, long timeout); |
| 426 | extern int __tty_check_change(struct tty_struct *tty, int sig); | ||
| 427 | extern int tty_check_change(struct tty_struct *tty); | 427 | extern int tty_check_change(struct tty_struct *tty); |
| 428 | extern void __stop_tty(struct tty_struct *tty); | 428 | extern void __stop_tty(struct tty_struct *tty); |
| 429 | extern void stop_tty(struct tty_struct *tty); | 429 | extern void stop_tty(struct tty_struct *tty); |
| @@ -467,6 +467,8 @@ extern void tty_buffer_free_all(struct tty_port *port); | |||
| 467 | extern void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld); | 467 | extern void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld); |
| 468 | extern void tty_buffer_init(struct tty_port *port); | 468 | extern void tty_buffer_init(struct tty_port *port); |
| 469 | extern void tty_buffer_set_lock_subclass(struct tty_port *port); | 469 | extern void tty_buffer_set_lock_subclass(struct tty_port *port); |
| 470 | extern bool tty_buffer_restart_work(struct tty_port *port); | ||
| 471 | extern bool tty_buffer_cancel_work(struct tty_port *port); | ||
| 470 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); | 472 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
| 471 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | 473 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); |
| 472 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, | 474 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, |
| @@ -656,50 +658,6 @@ extern void __lockfunc tty_unlock(struct tty_struct *tty); | |||
| 656 | extern void __lockfunc tty_lock_slave(struct tty_struct *tty); | 658 | extern void __lockfunc tty_lock_slave(struct tty_struct *tty); |
| 657 | extern void __lockfunc tty_unlock_slave(struct tty_struct *tty); | 659 | extern void __lockfunc tty_unlock_slave(struct tty_struct *tty); |
| 658 | extern void tty_set_lock_subclass(struct tty_struct *tty); | 660 | extern void tty_set_lock_subclass(struct tty_struct *tty); |
| 659 | /* | ||
| 660 | * this shall be called only from where BTM is held (like close) | ||
| 661 | * | ||
| 662 | * We need this to ensure nobody waits for us to finish while we are waiting. | ||
| 663 | * Without this we were encountering system stalls. | ||
| 664 | * | ||
| 665 | * This should be indeed removed with BTM removal later. | ||
| 666 | * | ||
| 667 | * Locking: BTM required. Nobody is allowed to hold port->mutex. | ||
| 668 | */ | ||
| 669 | static inline void tty_wait_until_sent_from_close(struct tty_struct *tty, | ||
| 670 | long timeout) | ||
| 671 | { | ||
| 672 | tty_unlock(tty); /* tty->ops->close holds the BTM, drop it while waiting */ | ||
| 673 | tty_wait_until_sent(tty, timeout); | ||
| 674 | tty_lock(tty); | ||
| 675 | } | ||
| 676 | |||
| 677 | /* | ||
| 678 | * wait_event_interruptible_tty -- wait for a condition with the tty lock held | ||
| 679 | * | ||
| 680 | * The condition we are waiting for might take a long time to | ||
| 681 | * become true, or might depend on another thread taking the | ||
| 682 | * BTM. In either case, we need to drop the BTM to guarantee | ||
| 683 | * forward progress. This is a leftover from the conversion | ||
| 684 | * from the BKL and should eventually get removed as the BTM | ||
| 685 | * falls out of use. | ||
| 686 | * | ||
| 687 | * Do not use in new code. | ||
| 688 | */ | ||
| 689 | #define wait_event_interruptible_tty(tty, wq, condition) \ | ||
| 690 | ({ \ | ||
| 691 | int __ret = 0; \ | ||
| 692 | if (!(condition)) \ | ||
| 693 | __ret = __wait_event_interruptible_tty(tty, wq, \ | ||
| 694 | condition); \ | ||
| 695 | __ret; \ | ||
| 696 | }) | ||
| 697 | |||
| 698 | #define __wait_event_interruptible_tty(tty, wq, condition) \ | ||
| 699 | ___wait_event(wq, condition, TASK_INTERRUPTIBLE, 0, 0, \ | ||
| 700 | tty_unlock(tty); \ | ||
| 701 | schedule(); \ | ||
| 702 | tty_lock(tty)) | ||
| 703 | 661 | ||
| 704 | #ifdef CONFIG_PROC_FS | 662 | #ifdef CONFIG_PROC_FS |
| 705 | extern void proc_tty_register_driver(struct tty_driver *); | 663 | extern void proc_tty_register_driver(struct tty_driver *); |
