diff options
Diffstat (limited to 'include/linux/serial_8250.h')
-rw-r--r-- | include/linux/serial_8250.h | 20 |
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 | ||
62 | struct uart_8250_dma; | 62 | struct uart_8250_dma; |
63 | struct 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 | */ | ||
73 | struct 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 | ||
119 | extern int early_serial_setup(struct uart_port *port); | 136 | extern int early_serial_setup(struct uart_port *port); |
120 | 137 | ||
121 | extern int serial8250_find_port(struct uart_port *p); | ||
122 | extern int serial8250_find_port_for_earlycon(void); | ||
123 | extern unsigned int serial8250_early_in(struct uart_port *port, int offset); | 138 | extern unsigned int serial8250_early_in(struct uart_port *port, int offset); |
124 | extern void serial8250_early_out(struct uart_port *port, int offset, int value); | 139 | extern void serial8250_early_out(struct uart_port *port, int offset, int value); |
125 | extern int setup_early_serial8250_console(char *cmdline); | ||
126 | extern void serial8250_do_set_termios(struct uart_port *port, | 140 | extern void serial8250_do_set_termios(struct uart_port *port, |
127 | struct ktermios *termios, struct ktermios *old); | 141 | struct ktermios *termios, struct ktermios *old); |
128 | extern int serial8250_do_startup(struct uart_port *port); | 142 | extern int serial8250_do_startup(struct uart_port *port); |