Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ec33b309
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ec33b309
编写于
11月 01, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/home/rmk/linux-2.6-serial
上级
7f36b1e9
913ade51
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
64 addition
and
13 deletion
+64
-13
Documentation/serial/driver
Documentation/serial/driver
+57
-9
drivers/serial/serial_core.c
drivers/serial/serial_core.c
+3
-1
include/linux/serial_core.h
include/linux/serial_core.h
+4
-3
未找到文件。
Documentation/serial/driver
浏览文件 @
ec33b309
...
...
@@ -116,12 +116,15 @@ hardware.
line becoming inactive or the tty layer indicating we want
to stop transmission due to an XOFF character.
The driver should stop transmitting characters as soon as
possible.
Locking: port->lock taken.
Interrupts: locally disabled.
This call must not sleep
start_tx(port)
s
tart transmitting characters.
S
tart transmitting characters.
Locking: port->lock taken.
Interrupts: locally disabled.
...
...
@@ -281,26 +284,31 @@ hardware.
Other functions
---------------
uart_update_timeout(port,cflag,
quot
)
uart_update_timeout(port,cflag,
baud
)
Update the FIFO drain timeout, port->timeout, according to the
number of bits, parity, stop bits and
quotient
.
number of bits, parity, stop bits and
baud rate
.
Locking: caller is expected to take port->lock
Interrupts: n/a
uart_get_baud_rate(port,termios)
uart_get_baud_rate(port,termios
,old,min,max
)
Return the numeric baud rate for the specified termios, taking
account of the special 38400 baud "kludge". The B0 baud rate
is mapped to 9600 baud.
If the baud rate is not within min..max, then if old is non-NULL,
the original baud rate will be tried. If that exceeds the
min..max constraint, 9600 baud will be returned. termios will
be updated to the baud rate in use.
Note: min..max must always allow 9600 baud to be selected.
Locking: caller dependent.
Interrupts: n/a
uart_get_divisor(port,termios,oldtermios)
Return the divsor (baud_base / baud) for the selected baud rate
specified by termios. If the baud rate is out of range, try
the original baud rate specified by oldtermios (if non-NULL).
If that fails, try 9600 baud.
uart_get_divisor(port,baud)
Return the divsor (baud_base / baud) for the specified baud
rate, appropriately rounded.
If 38400 baud and custom divisor is selected, return the
custom divisor instead.
...
...
@@ -308,6 +316,46 @@ uart_get_divisor(port,termios,oldtermios)
Locking: caller dependent.
Interrupts: n/a
uart_match_port(port1,port2)
This utility function can be used to determine whether two
uart_port structures describe the same port.
Locking: n/a
Interrupts: n/a
uart_write_wakeup(port)
A driver is expected to call this function when the number of
characters in the transmit buffer have dropped below a threshold.
Locking: port->lock should be held.
Interrupts: n/a
uart_register_driver(drv)
Register a uart driver with the core driver. We in turn register
with the tty layer, and initialise the core driver per-port state.
drv->port should be NULL, and the per-port structures should be
registered using uart_add_one_port after this call has succeeded.
Locking: none
Interrupts: enabled
uart_unregister_driver()
Remove all references to a driver from the core driver. The low
level driver must have removed all its ports via the
uart_remove_one_port() if it registered them with uart_add_one_port().
Locking: none
Interrupts: enabled
uart_suspend_port()
uart_resume_port()
uart_add_one_port()
uart_remove_one_port()
Other notes
-----------
...
...
drivers/serial/serial_core.c
浏览文件 @
ec33b309
...
...
@@ -1967,7 +1967,9 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
break
;
}
printk
(
KERN_INFO
"%s%d at %s (irq = %d) is a %s
\n
"
,
printk
(
KERN_INFO
"%s%s%s%d at %s (irq = %d) is a %s
\n
"
,
port
->
dev
?
port
->
dev
->
bus_id
:
""
,
port
->
dev
?
": "
:
""
,
drv
->
dev_name
,
port
->
line
,
address
,
port
->
irq
,
uart_type
(
port
));
}
...
...
include/linux/serial_core.h
浏览文件 @
ec33b309
...
...
@@ -39,8 +39,7 @@
#define PORT_RSA 13
#define PORT_NS16550A 14
#define PORT_XSCALE 15
#define PORT_IP3106 16
#define PORT_MAX_8250 16
/* max port ID */
#define PORT_MAX_8250 15
/* max port ID */
/*
* ARM specific type numbers. These are not currently guaranteed
...
...
@@ -118,7 +117,9 @@
#define PORT_M32R_SIO 68
/*Digi jsm */
#define PORT_JSM 65
#define PORT_JSM 69
#define PORT_IP3106 70
#ifdef __KERNEL__
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录