33#ifndef LINUX_SERIAL_CORE_H
34#define LINUX_SERIAL_CORE_H
51#ifndef _UAPILINUX_SERIAL_CORE_H
52#define _UAPILINUX_SERIAL_CORE_H
63#define PORT_NS16550A 14
68#define PORT_U6_16550A 19
70#define PORT_XR17D15X 21
71#define PORT_LPC3220 22
72#define PORT_8250_CIR 23
73#define PORT_XR17V35X 24
74#define PORT_BRCM_TRUMANAGE 25
75#define PORT_ALTR_16550_F32 26
76#define PORT_ALTR_16550_F64 27
77#define PORT_ALTR_16550_F128 28
79#define PORT_16550A_FSL64 30
89#define PORT_CLPS711X 33
96#define PORT_SUNZILOG 38
103#define PORT_TEGRA_TCU 41
106#define PORT_ASPEED_VUART 42
109#define PORT_PCH_8LINE 44
110#define PORT_PCH_2LINE 45
123#define PORT_MAC_ZILOG 50
124#define PORT_PMAC_ZILOG 51
132#define PORT_IP22ZILOG 56
138#define PORT_MPC52xx 59
156#define PORT_UARTLITE 74
159#define PORT_BCM7271 76
162#define PORT_SB1250_DUART 77
167#define PORT_SC26XX 82
172#define PORT_S3C6400 84
175#define PORT_MAX3100 86
178#define PORT_TIMBUART 87
184#define PORT_BCM63XX 89
187#define PORT_APBUART 90
190#define PORT_ALTERA_JTAGUART 91
191#define PORT_ALTERA_UART 92
197#define PORT_MAX310X 94
206#define PORT_VT8500 97
209#define PORT_XUARTPS 98
212#define PORT_AR933X 99
215#define PORT_MCHP16550A 100
224#define PORT_LPUART 103
227#define PORT_HSCIF 104
233#define PORT_MEN_Z135 107
236#define PORT_SC16IS7XX 108
239#define PORT_MESON 109
242#define PORT_DIGICOLOR 110
248#define PORT_STM32 113
251#define PORT_MVEBU 114
254#define PORT_PIC32 115
257#define PORT_MPS2UART 116
260#define PORT_MTK_BTIF 117
266#define PORT_MLB_USIO 119
269#define PORT_SIFIVE_V0 120
272#define PORT_SUNIX 121
275#define PORT_LINFLEXUART 122
278#define PORT_SUNPLUS 123
281#define PORT_GENERIC (-1)
286#ifdef CONFIG_SERIAL_CORE_CONSOLE
287#define uart_console(port) \
288 ((port)->cons && (port)->cons->index == (port)->line)
290#define uart_console(port) ({ (void)port; 0; })
295struct serial_port_device;
658 unsigned int oldstate);
665#ifdef CONFIG_CONSOLE_POLL
667 void (*poll_put_char)(
struct uart_port *,
unsigned char);
668 int (*poll_get_char)(
struct uart_port *);
672#define NO_POLL_CHAR 0x00ff0000
673#define UART_CONFIG_TYPE (1 << 0)
674#define UART_CONFIG_IRQ (1 << 1)
724 unsigned int quot_frac);
750#define UPQ_NO_TXEN_TEST BIT(0)
773#ifdef CONFIG_HAS_IOPORT
774#define UPF_FOURPORT ((__force upf_t) ASYNC_FOURPORT )
776#define UPF_FOURPORT 0
778#define UPF_SAK ((__force upf_t) ASYNC_SAK )
779#define UPF_SPD_HI ((__force upf_t) ASYNC_SPD_HI )
780#define UPF_SPD_VHI ((__force upf_t) ASYNC_SPD_VHI )
781#define UPF_SPD_CUST ((__force upf_t) ASYNC_SPD_CUST )
782#define UPF_SPD_WARP ((__force upf_t) ASYNC_SPD_WARP )
783#define UPF_SPD_MASK ((__force upf_t) ASYNC_SPD_MASK )
784#define UPF_SKIP_TEST ((__force upf_t) ASYNC_SKIP_TEST )
785#define UPF_AUTO_IRQ ((__force upf_t) ASYNC_AUTO_IRQ )
786#define UPF_HARDPPS_CD ((__force upf_t) ASYNC_HARDPPS_CD )
787#define UPF_SPD_SHI ((__force upf_t) ASYNC_SPD_SHI )
788#define UPF_LOW_LATENCY ((__force upf_t) ASYNC_LOW_LATENCY )
789#define UPF_BUGGY_UART ((__force upf_t) ASYNC_BUGGY_UART )
790#define UPF_MAGIC_MULTIPLIER ((__force upf_t) ASYNC_MAGIC_MULTIPLIER )
792#define UPF_NO_THRE_TEST ((__force upf_t) BIT_ULL(19))
794#define UPF_AUTO_CTS ((__force upf_t) BIT_ULL(20))
795#define UPF_AUTO_RTS ((__force upf_t) BIT_ULL(21))
796#define UPF_HARD_FLOW ((__force upf_t) (UPF_AUTO_CTS | UPF_AUTO_RTS))
798#define UPF_SOFT_FLOW ((__force upf_t) BIT_ULL(22))
800#define UPF_CONS_FLOW ((__force upf_t) BIT_ULL(23))
801#define UPF_SHARE_IRQ ((__force upf_t) BIT_ULL(24))
802#define UPF_EXAR_EFR ((__force upf_t) BIT_ULL(25))
803#define UPF_BUG_THRE ((__force upf_t) BIT_ULL(26))
805#define UPF_FIXED_TYPE ((__force upf_t) BIT_ULL(27))
806#define UPF_BOOT_AUTOCONF ((__force upf_t) BIT_ULL(28))
807#define UPF_FIXED_PORT ((__force upf_t) BIT_ULL(29))
808#define UPF_DEAD ((__force upf_t) BIT_ULL(30))
809#define UPF_IOREMAP ((__force upf_t) BIT_ULL(31))
810#define UPF_FULL_PROBE ((__force upf_t) BIT_ULL(32))
812#define __UPF_CHANGE_MASK 0x17fff
813#define UPF_CHANGE_MASK ((__force upf_t) __UPF_CHANGE_MASK)
814#define UPF_USR_MASK ((__force upf_t) (UPF_SPD_MASK|UPF_LOW_LATENCY))
816#if __UPF_CHANGE_MASK > ASYNC_FLAGS
817#error Change mask not equivalent to userspace-visible bit defines
826#define UPSTAT_CTS_ENABLE ((__force upstat_t) (1 << 0))
827#define UPSTAT_DCD_ENABLE ((__force upstat_t) (1 << 1))
828#define UPSTAT_AUTORTS ((__force upstat_t) (1 << 2))
829#define UPSTAT_AUTOCTS ((__force upstat_t) (1 << 3))
830#define UPSTAT_AUTOXOFF ((__force upstat_t) (1 << 4))
831#define UPSTAT_SYNC_FIFO ((__force upstat_t) (1 << 5))
870static inline void __uart_port_lock_irqsave(
struct uart_port *
up,
unsigned long *
flags)
879static inline void __uart_port_unlock_irqrestore(
struct uart_port *
up,
unsigned long flags)
897 __uart_port_lock_irqsave(
up, &
flags);
899 __uart_port_unlock_irqrestore(
up,
flags);
924static inline bool __uart_port_using_nbcon(
struct uart_port *
up)
930static inline bool __uart_port_nbcon_try_acquire(
struct uart_port *
up)
936static inline void __uart_port_nbcon_acquire(
struct uart_port *
up)
941static inline void __uart_port_nbcon_release(
struct uart_port *
up)
950static inline void uart_port_lock(
struct uart_port *
up)
953 __uart_port_nbcon_acquire(
up);
960static inline void uart_port_lock_irq(
struct uart_port *
up)
963 __uart_port_nbcon_acquire(
up);
971static inline void uart_port_lock_irqsave(
struct uart_port *
up,
unsigned long *
flags)
974 __uart_port_nbcon_acquire(
up);
983static inline bool uart_port_trylock(
struct uart_port *
up)
988 if (!__uart_port_nbcon_try_acquire(
up)) {
1003static inline bool uart_port_trylock_irqsave(
struct uart_port *
up,
unsigned long *
flags)
1008 if (!__uart_port_nbcon_try_acquire(
up)) {
1020static inline void uart_port_unlock(
struct uart_port *
up)
1022 __uart_port_nbcon_release(
up);
1030static inline void uart_port_unlock_irq(
struct uart_port *
up)
1032 __uart_port_nbcon_release(
up);
1041static inline void uart_port_unlock_irqrestore(
struct uart_port *
up,
unsigned long flags)
1043 __uart_port_nbcon_release(
up);
1065 uart_port_unlock_irq(_T));
1068 uart_port_lock_irqsave(_T->lock, &_T->flags),
1069 uart_port_unlock_irqrestore(_T->lock, _T->flags),
1070 unsigned long flags);
1106#define UART_XMIT_SIZE PAGE_SIZE
1110#define WAKEUP_CHARS 256
1121static inline void uart_xmit_advance(
struct uart_port *
up,
unsigned int chars)
1125 kfifo_skip_count(&tport->xmit_fifo,
chars);
1129static inline unsigned int uart_fifo_out(
struct uart_port *
up,
1130 unsigned char *
buf,
unsigned int chars)
1140static inline unsigned int uart_fifo_get(
struct uart_port *
up,
1146 chars = kfifo_get(&tport->xmit_fifo, ch);
1183#define __uart_port_tx(uport, ch, flags, tx_ready, put_char, tx_done, \
1184 for_test, for_post) \
1186 struct uart_port *__port = (uport); \
1187 struct tty_port *__tport = &__port->state->port; \
1188 unsigned int pending; \
1190 for (; (for_test) && (tx_ready); (for_post), __port->icount.tx++) { \
1191 if (__port->x_char) { \
1192 (ch) = __port->x_char; \
1194 __port->x_char = 0; \
1198 if (uart_tx_stopped(__port)) \
1201 if (!kfifo_get(&__tport->xmit_fifo, &(ch))) \
1209 pending = kfifo_len(&__tport->xmit_fifo); \
1210 if (pending < WAKEUP_CHARS) { \
1211 uart_write_wakeup(__port); \
1213 if (!((flags) & UART_TX_NOSTOP) && pending == 0) \
1214 __port->ops->stop_tx(__port); \
1246#define uart_port_tx_limited(port, ch, count, tx_ready, put_char, tx_done) ({ \
1247 unsigned int __count = (count); \
1248 __uart_port_tx(port, ch, 0, tx_ready, put_char, tx_done, __count, \
1264#define uart_port_tx_limited_flags(port, ch, flags, count, tx_ready, put_char, tx_done) ({ \
1265 unsigned int __count = (count); \
1266 __uart_port_tx(port, ch, flags, tx_ready, put_char, tx_done, __count, \
1279#define uart_port_tx(port, ch, tx_ready, put_char) \
1280 __uart_port_tx(port, ch, 0, tx_ready, put_char, ({}), true, ({}))
1293#define uart_port_tx_flags(port, ch, flags, tx_ready, put_char) \
1294 __uart_port_tx(port, ch, flags, tx_ready, put_char, ({}), true, ({}))
1308static inline unsigned long uart_fifo_timeout(
struct uart_port *port)
1319static inline unsigned long uart_poll_timeout(
struct uart_port *port)
1321 unsigned long timeout = uart_fifo_timeout(port);
1323 return timeout > 6 ? (timeout / 2 - 2) : 1;
1346#if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
1347#define EARLYCON_USED_OR_UNUSED __used
1349#define EARLYCON_USED_OR_UNUSED __maybe_unused
1352#define OF_EARLYCON_DECLARE(_name, compat, fn) \
1353 static const struct earlycon_id __UNIQUE_ID(__earlycon_##_name) \
1354 EARLYCON_USED_OR_UNUSED __section("__earlycon_table") \
1355 __aligned(__alignof__(struct earlycon_id)) \
1356 = { .name = __stringify(_name), \
1357 .compatible = compat, \
1360#define EARLYCON_DECLARE(_name, fn) OF_EARLYCON_DECLARE(_name, "", fn)
1365#ifdef CONFIG_SERIAL_EARLYCON
1366extern bool earlycon_acpi_spcr_enable __initdata;
1367int setup_earlycon(
char *buf);
1370static inline int setup_earlycon(
char *buf) {
return 0; }
1374static inline bool uart_console_registered_locked(
struct uart_port *port)
1379static inline bool uart_console_registered(
struct uart_port *port)
1389 int parity,
int bits,
int flow);
1413static inline int uart_tx_stopped(
struct uart_port *port)
1421static inline bool uart_cts_enabled(
struct uart_port *uport)
1426static inline bool uart_softcts_mode(
struct uart_port *uport)
1433static inline void uart_set_cons_flow_enabled(
struct uart_port *uport,
bool enabled)
1438static inline bool uart_cons_flow_enabled(
const struct uart_port *uport)
1443static inline bool uart_console_hwflow_active(
struct uart_port *uport)
1447 uart_cons_flow_enabled(uport) &&
1448 uart_cts_enabled(uport);
1459 unsigned int overrun,
u8 ch,
u8 flag);
1463#ifdef CONFIG_MAGIC_SYSRQ_SERIAL
1464#define SYSRQ_TIMEOUT (HZ * 5)
1468static inline int uart_handle_sysrq_char(
struct uart_port *
port,
u8 ch)
1479 if (uart_try_toggle_sysrq(
port, ch))
1487static inline int uart_prepare_sysrq_char(
struct uart_port *
port,
u8 ch)
1494 port->sysrq_ch = ch;
1498 if (uart_try_toggle_sysrq(
port, ch))
1506static inline void uart_unlock_and_check_sysrq(
struct uart_port *
port)
1510 if (!
port->has_sysrq) {
1511 uart_port_unlock(
port);
1515 sysrq_ch =
port->sysrq_ch;
1518 uart_port_unlock(
port);
1521 handle_sysrq(sysrq_ch);
1524static inline void uart_unlock_and_check_sysrq_irqrestore(
struct uart_port *
port,
1525 unsigned long flags)
1529 if (!
port->has_sysrq) {
1530 uart_port_unlock_irqrestore(
port,
flags);
1534 sysrq_ch =
port->sysrq_ch;
1537 uart_port_unlock_irqrestore(
port,
flags);
1540 handle_sysrq(sysrq_ch);
1543static inline int uart_handle_sysrq_char(
struct uart_port *
port,
u8 ch)
1547static inline int uart_prepare_sysrq_char(
struct uart_port *
port,
u8 ch)
1551static inline void uart_unlock_and_check_sysrq(
struct uart_port *
port)
1553 uart_port_unlock(
port);
1555static inline void uart_unlock_and_check_sysrq_irqrestore(
struct uart_port *
port,
1556 unsigned long flags)
1558 uart_port_unlock_irqrestore(
port,
flags);
1570 uart_port_lock_irqsave(_T->lock, &_T->flags),
1571 uart_unlock_and_check_sysrq_irqrestore(_T->lock, _T->flags),
1572 unsigned long flags);
1581 if (
port->handle_break)
1584#ifdef CONFIG_MAGIC_SYSRQ_SERIAL
1601#define UART_ENABLE_MS(port,cflag) ((port)->flags & UPF_HARDPPS_CD || \
1602 (cflag) & CRTSCTS || \
1603 !((cflag) & CLOCAL))
int putchar(int)
Definition stdio.cpp:240
char * chars
Definition clib.cpp:105
uint8_t flags
Definition virtio.h:0
#define index(str, chr)
Definition string.h:66
#define __iomem
Definition aclinux.h:312
#define BIT(nr)
Definition bitops.h:112
flag
Definition bytecode.h:29
#define DEFINE_LOCK_GUARD_1(_name, _type, _lock, _unlock,...)
Definition cleanup.h:255
#define DEFINE_GUARD(_name, _type, _lock, _unlock)
Definition cleanup.h:223
#define __bitwise
Definition compiler.h:57
bool enabled
Definition compose3d.cpp:135
int console_is_registered(struct console *con)
uint32_t __u32
Definition drm.h:42
size_t size_t offset
Definition drm_bridge.h:1299
void int node
Definition kthread.h:31
uint64_t u64
Definition kernel.h:17
uintptr_t resource_size_t
Definition kernel.h:41
uint8_t u8
Definition kernel.h:14
#define READ_ONCE(x)
Definition kernel.h:605
#define spin_unlock_irqrestore(l, f)
Definition kernel.h:227
#define spin_lock_irqsave(l, f)
Definition kernel.h:226
#define NSEC_PER_MSEC
Definition kernel.h:407
int spinlock_t
Definition kernel.h:44
uint32_t u32
Definition kernel.h:16
#define SERIAL_IO_TSI
Definition serial.h:108
#define SERIAL_IO_MEM
Definition serial.h:105
#define SERIAL_IO_AU
Definition serial.h:107
#define SERIAL_IO_HUB6
Definition serial.h:104
#define SER_RS485_ENABLED
Definition serial.h:181
#define SERIAL_IO_MEM32
Definition serial.h:106
#define SERIAL_IO_MEM16
Definition serial.h:110
#define SERIAL_IO_MEM32BE
Definition serial.h:109
#define SERIAL_IO_PORT
Definition serial.h:103
#define spin_trylock(l)
Definition spinlock.h:43
#define spin_lock(l)
Definition spinlock.h:36
#define spin_unlock(l)
Definition spinlock.h:37
#define spin_trylock_irqsave(l, f)
Definition spinlock.h:165
#define spin_lock_irq(l)
Definition spinlock.h:38
#define spin_unlock_irq(l)
Definition spinlock.h:39
#define time_before(a, b)
Definition timer.h:98
#define jiffies
Definition timer.h:55
#define nsecs_to_jiffies(n)
Definition timer.h:83
void do_SAK(struct tty_struct *tty)
#define min(a, b)
Definition minmax.h:24
#define max(a, b)
Definition minmax.h:28
@ up
Definition p_spec.h:261
#define UPSTAT_CTS_ENABLE
Definition serial_core.h:826
void uart_update_timeout(struct uart_port *port, unsigned int cflag, unsigned int baud)
int uart_get_rs485_mode(struct uart_port *port)
#define UPSTAT_AUTOCTS
Definition serial_core.h:829
const struct earlycon_id __earlycon_table_end[]
unsigned int uart_get_divisor(struct uart_port *port, unsigned int baud)
int uart_set_options(struct uart_port *port, struct console *co, int baud, int parity, int bits, int flow)
void uart_xchar_out(struct uart_port *uport, int offset)
uart_pm_state
Definition serial_core.h:1087
@ UART_PM_STATE_OFF
Definition serial_core.h:1089
@ UART_PM_STATE_UNDEFINED
Definition serial_core.h:1090
@ UART_PM_STATE_ON
Definition serial_core.h:1088
u64 __bitwise upf_t
Definition serial_core.h:690
unsigned int __bitwise upstat_t
Definition serial_core.h:691
#define EARLYCON_USED_OR_UNUSED
Definition serial_core.h:1349
bool uart_match_port(const struct uart_port *port1, const struct uart_port *port2)
const struct earlycon_id __earlycon_table[]
void uart_console_write(struct uart_port *port, const char *s, unsigned int count, void(*putchar)(struct uart_port *, unsigned char))
UART_TX_FLAGS
Definition serial_core.h:1179
@ UART_TX_NOSTOP
Definition serial_core.h:1180
void uart_parse_options(const char *options, int *baud, int *parity, int *bits, int *flow)
int uart_parse_earlycon(char *p, enum uart_iotype *iotype, resource_size_t *addr, char **options)
unsigned int uart_get_baud_rate(struct uart_port *port, struct ktermios *termios, const struct ktermios *old, unsigned int min, unsigned int max)
int uart_register_driver(struct uart_driver *uart)
int uart_read_port_properties(struct uart_port *port)
void uart_write_wakeup(struct uart_port *port)
void uart_remove_one_port(struct uart_driver *reg, struct uart_port *port)
int uart_resume_port(struct uart_driver *reg, struct uart_port *port)
int uart_add_one_port(struct uart_driver *reg, struct uart_port *port)
int of_setup_earlycon(const struct earlycon_id *match, unsigned long node, const char *options)
void uart_handle_cts_change(struct uart_port *uport, bool active)
uart_iotype
Definition serial_core.h:693
@ UPIO_TSI
Definition serial_core.h:700
@ UPIO_AU
Definition serial_core.h:699
@ UPIO_MEM32
Definition serial_core.h:698
@ UPIO_MEM
Definition serial_core.h:697
@ UPIO_HUB6
Definition serial_core.h:696
@ UPIO_PORT
Definition serial_core.h:695
@ UPIO_MEM32BE
Definition serial_core.h:701
@ UPIO_UNKNOWN
Definition serial_core.h:694
@ UPIO_MEM16
Definition serial_core.h:702
void uart_insert_char(struct uart_port *port, unsigned int status, unsigned int overrun, u8 ch, u8 flag)
void uart_unregister_driver(struct uart_driver *uart)
#define UPF_SAK
Definition serial_core.h:778
void uart_handle_dcd_change(struct uart_port *uport, bool active)
int uart_read_and_validate_port_properties(struct uart_port *port)
struct tty_driver * uart_console_device(struct console *co, int *index)
#define uart_console(port)
Definition serial_core.h:290
int uart_suspend_port(struct uart_driver *reg, struct uart_port *port)
Definition serial_core.h:1329
struct uart_port port
Definition serial_core.h:1331
struct console * con
Definition serial_core.h:1330
unsigned int baud
Definition serial_core.h:1333
char options[32]
Definition serial_core.h:1332
Definition serial_core.h:1336
int(* setup)(struct earlycon_device *, const char *options)
Definition serial_core.h:1340
char compatible[128]
Definition serial_core.h:1339
char name[15]
Definition serial_core.h:1337
char name_term
Definition serial_core.h:1338
__u32 flags
Definition serial.h:180
Definition tty_driver.h:122
unsigned long flags
Definition tty_port.h:90
struct tty_struct * tty
Definition tty_port.h:81
struct tty_bufhead buf
Definition tty_port.h:80
bool stopped
Definition tty.h:228
struct tty_struct::@94 flow
struct tty_port * port
Definition tty.h:208
Definition serial_core.h:1155
struct tty_driver * tty_driver
Definition serial_core.h:1169
const char * dev_name
Definition serial_core.h:1158
int nr
Definition serial_core.h:1161
struct console * cons
Definition serial_core.h:1162
struct uart_state * state
Definition serial_core.h:1168
const char * driver_name
Definition serial_core.h:1157
int major
Definition serial_core.h:1159
int minor
Definition serial_core.h:1160
struct module * owner
Definition serial_core.h:1156
Definition serial_core.h:676
__u32 parity
Definition serial_core.h:685
__u32 cts
Definition serial_core.h:677
__u32 overrun
Definition serial_core.h:684
__u32 frame
Definition serial_core.h:683
__u32 buf_overrun
Definition serial_core.h:687
__u32 rng
Definition serial_core.h:679
__u32 tx
Definition serial_core.h:682
__u32 dsr
Definition serial_core.h:678
__u32 dcd
Definition serial_core.h:680
__u32 brk
Definition serial_core.h:686
__u32 rx
Definition serial_core.h:681
Definition serial_core.h:638
int(* request_port)(struct uart_port *)
Definition serial_core.h:661
unsigned int(* get_mctrl)(struct uart_port *)
Definition serial_core.h:641
void(* start_rx)(struct uart_port *)
Definition serial_core.h:648
void(* throttle)(struct uart_port *)
Definition serial_core.h:644
void(* shutdown)(struct uart_port *)
Definition serial_core.h:652
void(* set_ldisc)(struct uart_port *, struct ktermios *)
Definition serial_core.h:656
void(* stop_tx)(struct uart_port *)
Definition serial_core.h:642
void(* config_port)(struct uart_port *, int)
Definition serial_core.h:662
void(* pm)(struct uart_port *, unsigned int state, unsigned int oldstate)
Definition serial_core.h:657
int(* verify_port)(struct uart_port *, struct serial_struct *)
Definition serial_core.h:663
void(* send_xchar)(struct uart_port *, char ch)
Definition serial_core.h:646
void(* stop_rx)(struct uart_port *)
Definition serial_core.h:647
void(* flush_buffer)(struct uart_port *)
Definition serial_core.h:653
void(* set_termios)(struct uart_port *, struct ktermios *new, const struct ktermios *old)
Definition serial_core.h:654
int(* ioctl)(struct uart_port *, unsigned int, unsigned long)
Definition serial_core.h:664
void(* release_port)(struct uart_port *)
Definition serial_core.h:660
int(* startup)(struct uart_port *)
Definition serial_core.h:651
void(* start_tx)(struct uart_port *)
Definition serial_core.h:643
unsigned int(* tx_empty)(struct uart_port *)
Definition serial_core.h:639
void(* set_mctrl)(struct uart_port *, unsigned int mctrl)
Definition serial_core.h:640
void(* enable_ms)(struct uart_port *)
Definition serial_core.h:649
void(* break_ctl)(struct uart_port *, int ctl)
Definition serial_core.h:650
void(* unthrottle)(struct uart_port *)
Definition serial_core.h:645
Definition serial_core.h:705
void(* serial_out)(struct uart_port *, unsigned int offset, u32 val)
Definition serial_core.h:710
void(* pm)(struct uart_port *, unsigned int state, unsigned int old)
Definition serial_core.h:730
void * private_data
Definition serial_core.h:863
bool cons_flow
Definition serial_core.h:834
unsigned char has_sysrq
Definition serial_core.h:849
struct device * dev
Definition serial_core.h:844
struct uart_state * state
Definition serial_core.h:756
struct gpio_desc * rs485_rx_during_tx_gpio
Definition serial_core.h:861
unsigned int read_status_mask
Definition serial_core.h:754
unsigned char __iomem * membase
Definition serial_core.h:708
struct console * cons
Definition serial_core.h:759
unsigned int irq
Definition serial_core.h:740
void(* set_ldisc)(struct uart_port *, struct ktermios *)
Definition serial_core.h:714
unsigned char hub6
Definition serial_core.h:852
struct attribute_group * attr_group
Definition serial_core.h:856
struct serial_port_device * port_dev
Definition serial_core.h:845
struct serial_iso7816 iso7816
Definition serial_core.h:862
const struct uart_ops * ops
Definition serial_core.h:838
resource_size_t mapbase
Definition serial_core.h:842
unsigned int type
Definition serial_core.h:837
void(* shutdown)(struct uart_port *port)
Definition serial_core.h:726
upstat_t status
Definition serial_core.h:824
unsigned long iobase
Definition serial_core.h:707
struct gpio_desc * rs485_term_gpio
Definition serial_core.h:860
void(* handle_break)(struct uart_port *)
Definition serial_core.h:732
unsigned int(* get_mctrl)(struct uart_port *)
Definition serial_core.h:716
int(* rs485_config)(struct uart_port *, struct ktermios *termios, struct serial_rs485 *rs485)
Definition serial_core.h:733
upf_t flags
Definition serial_core.h:761
unsigned long irqflags
Definition serial_core.h:741
unsigned int minor
Definition serial_core.h:841
unsigned long sysrq
Definition serial_core.h:847
int(* handle_irq)(struct uart_port *)
Definition serial_core.h:729
unsigned char x_char
Definition serial_core.h:744
struct uart_icount icount
Definition serial_core.h:757
unsigned char regshift
Definition serial_core.h:745
struct serial_rs485 rs485_supported
Definition serial_core.h:859
unsigned int ctrl_id
Definition serial_core.h:738
u32(* serial_in)(struct uart_port *, unsigned int offset)
Definition serial_core.h:709
enum uart_iotype iotype
Definition serial_core.h:752
const char * name
Definition serial_core.h:855
const struct attribute_group ** tty_groups
Definition serial_core.h:857
unsigned char console_reinit
Definition serial_core.h:854
void(* set_termios)(struct uart_port *, struct ktermios *new, const struct ktermios *old)
Definition serial_core.h:711
unsigned int frame_time
Definition serial_core.h:836
unsigned int port_id
Definition serial_core.h:739
unsigned char suspended
Definition serial_core.h:853
unsigned int fifosize
Definition serial_core.h:743
unsigned int mctrl
Definition serial_core.h:835
unsigned int ignore_status_mask
Definition serial_core.h:755
unsigned int line
Definition serial_core.h:840
void(* unthrottle)(struct uart_port *port)
Definition serial_core.h:728
unsigned int(* get_divisor)(struct uart_port *, unsigned int baud, unsigned int *frac)
Definition serial_core.h:718
unsigned int uartclk
Definition serial_core.h:742
u8 sysrq_ch
Definition serial_core.h:848
unsigned int custom_divisor
Definition serial_core.h:839
int(* startup)(struct uart_port *port)
Definition serial_core.h:725
spinlock_t lock
Definition serial_core.h:706
void(* set_divisor)(struct uart_port *, unsigned int baud, unsigned int quot, unsigned int quot_frac)
Definition serial_core.h:721
void(* set_mctrl)(struct uart_port *, unsigned int)
Definition serial_core.h:717
int(* iso7816_config)(struct uart_port *, struct serial_iso7816 *iso7816)
Definition serial_core.h:736
unsigned char sysrq_seq
Definition serial_core.h:850
void(* throttle)(struct uart_port *port)
Definition serial_core.h:727
bool hw_stopped
Definition serial_core.h:833
unsigned char quirks
Definition serial_core.h:747
struct serial_rs485 rs485
Definition serial_core.h:858
resource_size_t mapsize
Definition serial_core.h:843
Definition serial_core.h:1096
atomic_t refcount
Definition serial_core.h:1101
struct tty_port port
Definition serial_core.h:1097
struct uart_port * uart_port
Definition serial_core.h:1103
wait_queue_head_t remove_wait
Definition serial_core.h:1102
enum uart_pm_state pm_state
Definition serial_core.h:1099