File Index
Files and directories
Sign in
FILE

8250_dwlib.h

File preview with syntax highlighting.

linux-6.19.14/drivers/tty/serial/8250/8250_dwlib.h C
 1/* SPDX-License-Identifier: GPL-2.0+ */
 2/* Synopsys DesignWare 8250 library header file. */
 3
 4#include <linux/io.h>
 5#include <linux/types.h>
 6
 7#include "8250.h"
 8
 9struct dw8250_port_data {
10	/* Port properties */
11	int			line;
12
13	/* DMA operations */
14	struct uart_8250_dma	dma;
15
16	/* Hardware configuration */
17	u32			cpr_value;
18	u8			dlf_size;
19
20	/* RS485 variables */
21	bool			hw_rs485_support;
22};
23
24void dw8250_do_set_termios(struct uart_port *p, struct ktermios *termios, const struct ktermios *old);
25void dw8250_setup_port(struct uart_port *p);
26
27static inline u32 dw8250_readl_ext(struct uart_port *p, int offset)
28{
29	if (p->iotype == UPIO_MEM32BE)
30		return ioread32be(p->membase + offset);
31	return readl(p->membase + offset);
32}
33
34static inline void dw8250_writel_ext(struct uart_port *p, int offset, u32 reg)
35{
36	if (p->iotype == UPIO_MEM32BE)
37		iowrite32be(reg, p->membase + offset);
38	else
39		writel(reg, p->membase + offset);
40}
~/ Read-only file preview.