1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70struct uart_port {
spinlock_t lock; /* 串口端口锁 */
unsigned int iobase; /* IO端口基地址 */
unsigned char __iomem *membase; /* IO内存基地址,经映射(如ioremap)后的IO内存虚拟基地址 */
unsigned int irq; /* 中断号 */
unsigned int uartclk; /* 串口时钟 */
unsigned int fifosize; /* 串口FIFO缓冲大小 */
unsigned char x_char; /* xon/xoff字符 */
unsigned char regshift; /* 寄存器位移 */
unsigned char iotype; /* IO访问方式 */
unsigned char unused1;
unsigned int read_status_mask; /* 关心的Rx error status */
unsigned int ignore_status_mask;/* 忽略的Rx error status */
struct uart_info *info; /* pointer to parent info */
struct uart_icount icount; /* 计数器 */
struct console *cons; /* console结构体 */
unsigned long sysrq; /* sysrq timeout */
upf_t flags;
unsigned int mctrl; /* 当前的moden设置 */
unsigned int timeout; /* character-based timeout */
unsigned int type; /* 端口类型 */
const struct uart_ops *ops; /* 串口端口操作函数集 */
unsigned int custom_divisor;
unsigned int line; /* 端口索引 uart_driver.dev_name加上line组成串口的设备节点的名字 */
resource_size_t mapbase; /* IO内存物理基地址,可用于ioremap */
struct device *dev; /* 父设备 */
unsigned char hub6; /* this should be in the 8250 driver */
unsigned char suspended;
unsigned char unused[2];
void *private_data; /* 端口私有数据,一般为platform数据指针 */
};
Linux驱动开发杂记(0x11) - uart_port结构体
-------------本文结束感谢您的阅读-------------
本文标题:Linux驱动开发杂记(0x11) - uart_port结构体
文章作者:Vinx
发布时间:2018年11月22日 - 15:07
最后更新:2023年09月18日 - 11:07
原始链接:https://blog.vinkvin.com/post/17/
许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。