hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/include/linux/serial_8250.h
....@@ -1,12 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * linux/include/linux/serial_8250.h
34 *
45 * Copyright (C) 2004 Russell King
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
106 */
117 #ifndef _LINUX_SERIAL_8250_H
128 #define _LINUX_SERIAL_8250_H
....@@ -29,6 +25,7 @@
2925 unsigned char regshift; /* register shift */
3026 unsigned char iotype; /* UPIO_* */
3127 unsigned char hub6;
28
+ unsigned char has_sysrq; /* supports magic SysRq */
3229 upf_t flags; /* UPF_* flags */
3330 unsigned int type; /* If UPF_FIXED_TYPE */
3431 unsigned int (*serial_in)(struct uart_port *, int);
....@@ -84,6 +81,7 @@
8481 struct hrtimer stop_tx_timer; /* "rs485 stop tx" timer */
8582 struct hrtimer *active_timer; /* pointer to active timer */
8683 struct uart_8250_port *port; /* for hrtimer callbacks */
84
+ unsigned int tx_stopped:1; /* tx is currently stopped */
8785 };
8886
8987 /*
....@@ -114,6 +112,7 @@
114112 * if no_console_suspend
115113 */
116114 unsigned char probe;
115
+ struct mctrl_gpios *gpios;
117116 #define UART_PROBE_RSA (1 << 0)
118117
119118 /*
....@@ -134,6 +133,8 @@
134133 void (*dl_write)(struct uart_8250_port *, int);
135134
136135 struct uart_8250_em485 *em485;
136
+ void (*rs485_start_tx)(struct uart_8250_port *);
137
+ void (*rs485_stop_tx)(struct uart_8250_port *);
137138
138139 /* Serial port overrun backoff */
139140 struct delayed_work overrun_backoff;
....@@ -154,6 +155,8 @@
154155
155156 extern int early_serial8250_setup(struct earlycon_device *device,
156157 const char *options);
158
+extern void serial8250_update_uartclk(struct uart_port *port,
159
+ unsigned int uartclk);
157160 extern void serial8250_do_set_termios(struct uart_port *port,
158161 struct ktermios *termios, struct ktermios *old);
159162 extern void serial8250_do_set_ldisc(struct uart_port *port,
....@@ -178,6 +181,7 @@
178181 void serial8250_console_write(struct uart_8250_port *up, const char *s,
179182 unsigned int count);
180183 int serial8250_console_setup(struct uart_port *port, char *options, bool probe);
184
+int serial8250_console_exit(struct uart_port *port);
181185
182186 extern void serial8250_set_isa_configurator(void (*v)
183187 (int port, struct uart_port *up,