aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serial_8250.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-21 12:33:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-21 12:33:10 -0400
commit41d5e08ea86af3359239d5a6f7021cdc61beaa49 (patch)
tree58ad584b29d097dfa3b5d7bc5e61370d676610a9 /include/linux/serial_8250.h
parent8d582b94291b40dbb5961f99172ee8ebfafd4c9c (diff)
parent5dbc32a88f1e73f244e6134fc119dd4d60a398c0 (diff)
Merge tag 'tty-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial updates from Greg KH: "Here's the big tty/serial driver update for 4.1-rc1. It was delayed for a bit due to some questions surrounding some of the console command line parsing changes that are in here. There's still one tiny regression for people who were previously putting multiple console command lines and expecting them all to be ignored for some odd reason, but Peter is working on fixing that. If not, I'll send a revert for the offending patch, but I have faith that Peter can address it. Other than the console work here, there's the usual serial driver updates and changes, and a buch of 8250 reworks to try to make that driver easier to maintain over time, and have it support more devices in the future. All of these have been in linux-next for a while" * tag 'tty-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (119 commits) n_gsm: Drop unneeded cast on netdev_priv sc16is7xx: expose RTS inversion in RS-485 mode serial: 8250_pci: port failed after wakeup from S3 earlycon: 8250: Document kernel command line options earlycon: 8250: Fix command line regression earlycon: Fix __earlycon_table stride tty: clean up the tty time logic a bit serial: 8250_dw: only get the clock rate in one place serial: 8250_dw: remove useless ACPI ID check dmaengine: hsu: move memory allocation to GFP_NOWAIT dmaengine: hsu: remove redundant pieces of code serial: 8250_pci: add Intel Tangier support dmaengine: hsu: add Intel Tangier PCI ID serial: 8250_pci: replace switch-case by formula for Intel MID serial: 8250_pci: replace switch-case by formula tty: cpm_uart: replace CONFIG_8xx by CONFIG_CPM1 serial: jsm: some off by one bugs serial: xuartps: Fix check in console_setup(). serial: xuartps: Get rid of register access macros. serial: xuartps: Fix iobase use. ...
Diffstat (limited to 'include/linux/serial_8250.h')
-rw-r--r--include/linux/serial_8250.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h
index a8efa235b7c1..78097e7a330a 100644
--- a/include/linux/serial_8250.h
+++ b/include/linux/serial_8250.h
@@ -60,6 +60,20 @@ enum {
60}; 60};
61 61
62struct uart_8250_dma; 62struct uart_8250_dma;
63struct uart_8250_port;
64
65/**
66 * 8250 core driver operations
67 *
68 * @setup_irq() Setup irq handling. The universal 8250 driver links this
69 * port to the irq chain. Other drivers may @request_irq().
70 * @release_irq() Undo irq handling. The universal 8250 driver unlinks
71 * the port from the irq chain.
72 */
73struct uart_8250_ops {
74 int (*setup_irq)(struct uart_8250_port *);
75 void (*release_irq)(struct uart_8250_port *);
76};
63 77
64/* 78/*
65 * This should be used by drivers which want to register 79 * This should be used by drivers which want to register
@@ -88,6 +102,8 @@ struct uart_8250_port {
88 unsigned char canary; /* non-zero during system sleep 102 unsigned char canary; /* non-zero during system sleep
89 * if no_console_suspend 103 * if no_console_suspend
90 */ 104 */
105 unsigned char probe;
106#define UART_PROBE_RSA (1 << 0)
91 107
92 /* 108 /*
93 * Some bits in registers are cleared on a read, so they must 109 * Some bits in registers are cleared on a read, so they must
@@ -100,6 +116,7 @@ struct uart_8250_port {
100 unsigned char msr_saved_flags; 116 unsigned char msr_saved_flags;
101 117
102 struct uart_8250_dma *dma; 118 struct uart_8250_dma *dma;
119 const struct uart_8250_ops *ops;
103 120
104 /* 8250 specific callbacks */ 121 /* 8250 specific callbacks */
105 int (*dl_read)(struct uart_8250_port *); 122 int (*dl_read)(struct uart_8250_port *);
@@ -118,11 +135,8 @@ void serial8250_resume_port(int line);
118 135
119extern int early_serial_setup(struct uart_port *port); 136extern int early_serial_setup(struct uart_port *port);
120 137
121extern int serial8250_find_port(struct uart_port *p);
122extern int serial8250_find_port_for_earlycon(void);
123extern unsigned int serial8250_early_in(struct uart_port *port, int offset); 138extern unsigned int serial8250_early_in(struct uart_port *port, int offset);
124extern void serial8250_early_out(struct uart_port *port, int offset, int value); 139extern void serial8250_early_out(struct uart_port *port, int offset, int value);
125extern int setup_early_serial8250_console(char *cmdline);
126extern void serial8250_do_set_termios(struct uart_port *port, 140extern void serial8250_do_set_termios(struct uart_port *port,
127 struct ktermios *termios, struct ktermios *old); 141 struct ktermios *termios, struct ktermios *old);
128extern int serial8250_do_startup(struct uart_port *port); 142extern int serial8250_do_startup(struct uart_port *port);