| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/include/linux/serial_8250.h |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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. |
|---|
| 10 | 6 | */ |
|---|
| 11 | 7 | #ifndef _LINUX_SERIAL_8250_H |
|---|
| 12 | 8 | #define _LINUX_SERIAL_8250_H |
|---|
| .. | .. |
|---|
| 29 | 25 | unsigned char regshift; /* register shift */ |
|---|
| 30 | 26 | unsigned char iotype; /* UPIO_* */ |
|---|
| 31 | 27 | unsigned char hub6; |
|---|
| 28 | + unsigned char has_sysrq; /* supports magic SysRq */ |
|---|
| 32 | 29 | upf_t flags; /* UPF_* flags */ |
|---|
| 33 | 30 | unsigned int type; /* If UPF_FIXED_TYPE */ |
|---|
| 34 | 31 | unsigned int (*serial_in)(struct uart_port *, int); |
|---|
| .. | .. |
|---|
| 84 | 81 | struct hrtimer stop_tx_timer; /* "rs485 stop tx" timer */ |
|---|
| 85 | 82 | struct hrtimer *active_timer; /* pointer to active timer */ |
|---|
| 86 | 83 | struct uart_8250_port *port; /* for hrtimer callbacks */ |
|---|
| 84 | + unsigned int tx_stopped:1; /* tx is currently stopped */ |
|---|
| 87 | 85 | }; |
|---|
| 88 | 86 | |
|---|
| 89 | 87 | /* |
|---|
| .. | .. |
|---|
| 114 | 112 | * if no_console_suspend |
|---|
| 115 | 113 | */ |
|---|
| 116 | 114 | unsigned char probe; |
|---|
| 115 | + struct mctrl_gpios *gpios; |
|---|
| 117 | 116 | #define UART_PROBE_RSA (1 << 0) |
|---|
| 118 | 117 | |
|---|
| 119 | 118 | /* |
|---|
| .. | .. |
|---|
| 134 | 133 | void (*dl_write)(struct uart_8250_port *, int); |
|---|
| 135 | 134 | |
|---|
| 136 | 135 | struct uart_8250_em485 *em485; |
|---|
| 136 | + void (*rs485_start_tx)(struct uart_8250_port *); |
|---|
| 137 | + void (*rs485_stop_tx)(struct uart_8250_port *); |
|---|
| 137 | 138 | |
|---|
| 138 | 139 | /* Serial port overrun backoff */ |
|---|
| 139 | 140 | struct delayed_work overrun_backoff; |
|---|
| .. | .. |
|---|
| 154 | 155 | |
|---|
| 155 | 156 | extern int early_serial8250_setup(struct earlycon_device *device, |
|---|
| 156 | 157 | const char *options); |
|---|
| 158 | +extern void serial8250_update_uartclk(struct uart_port *port, |
|---|
| 159 | + unsigned int uartclk); |
|---|
| 157 | 160 | extern void serial8250_do_set_termios(struct uart_port *port, |
|---|
| 158 | 161 | struct ktermios *termios, struct ktermios *old); |
|---|
| 159 | 162 | extern void serial8250_do_set_ldisc(struct uart_port *port, |
|---|
| .. | .. |
|---|
| 178 | 181 | void serial8250_console_write(struct uart_8250_port *up, const char *s, |
|---|
| 179 | 182 | unsigned int count); |
|---|
| 180 | 183 | int serial8250_console_setup(struct uart_port *port, char *options, bool probe); |
|---|
| 184 | +int serial8250_console_exit(struct uart_port *port); |
|---|
| 181 | 185 | |
|---|
| 182 | 186 | extern void serial8250_set_isa_configurator(void (*v) |
|---|
| 183 | 187 | (int port, struct uart_port *up, |
|---|