Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
8ee3f402
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8ee3f402
编写于
11月 19, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge master.kernel.org:/home/rmk/linux-2.6-serial
上级
3b762d32
832f4ede
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
27 addition
and
24 deletion
+27
-24
drivers/serial/amba-pl011.c
drivers/serial/amba-pl011.c
+22
-23
drivers/serial/sa1100.c
drivers/serial/sa1100.c
+0
-1
include/asm-arm/hardware/amba_serial.h
include/asm-arm/hardware/amba_serial.h
+5
-0
未找到文件。
drivers/serial/amba-pl011.c
浏览文件 @
8ee3f402
...
...
@@ -49,7 +49,6 @@
#include <linux/serial.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/sizes.h>
#include <asm/hardware/amba.h>
#include <asm/hardware/clock.h>
...
...
@@ -63,7 +62,8 @@
#define AMBA_ISR_PASS_LIMIT 256
#define UART_DUMMY_RSR_RX 256
#define UART_DR_ERROR (UART011_DR_OE|UART011_DR_BE|UART011_DR_PE|UART011_DR_FE)
#define UART_DUMMY_DR_RX (1 << 16)
/*
* We wrap our port structure around the generic uart_port.
...
...
@@ -116,7 +116,7 @@ pl011_rx_chars(struct uart_amba_port *uap)
#endif
{
struct
tty_struct
*
tty
=
uap
->
port
.
info
->
tty
;
unsigned
int
status
,
ch
,
flag
,
rsr
,
max_count
=
256
;
unsigned
int
status
,
ch
,
flag
,
max_count
=
256
;
status
=
readw
(
uap
->
port
.
membase
+
UART01x_FR
);
while
((
status
&
UART01x_FR_RXFE
)
==
0
&&
max_count
--
)
{
...
...
@@ -129,7 +129,7 @@ pl011_rx_chars(struct uart_amba_port *uap)
*/
}
ch
=
readw
(
uap
->
port
.
membase
+
UART01x_DR
);
ch
=
readw
(
uap
->
port
.
membase
+
UART01x_DR
)
|
UART_DUMMY_DR_RX
;
flag
=
TTY_NORMAL
;
uap
->
port
.
icount
.
rx
++
;
...
...
@@ -137,34 +137,33 @@ pl011_rx_chars(struct uart_amba_port *uap)
* Note that the error handling code is
* out of the main execution path
*/
rsr
=
readw
(
uap
->
port
.
membase
+
UART01x_RSR
)
|
UART_DUMMY_RSR_RX
;
if
(
unlikely
(
rsr
&
UART01x_RSR_ANY
))
{
if
(
rsr
&
UART01x_RSR_BE
)
{
rsr
&=
~
(
UART01x_RSR_FE
|
UART01x_RSR_PE
);
if
(
unlikely
(
ch
&
UART_DR_ERROR
))
{
if
(
ch
&
UART011_DR_BE
)
{
ch
&=
~
(
UART011_DR_FE
|
UART011_DR_PE
);
uap
->
port
.
icount
.
brk
++
;
if
(
uart_handle_break
(
&
uap
->
port
))
goto
ignore_char
;
}
else
if
(
rsr
&
UART01x_RS
R_PE
)
}
else
if
(
ch
&
UART011_D
R_PE
)
uap
->
port
.
icount
.
parity
++
;
else
if
(
rsr
&
UART01x_RS
R_FE
)
else
if
(
ch
&
UART011_D
R_FE
)
uap
->
port
.
icount
.
frame
++
;
if
(
rsr
&
UART01x_RS
R_OE
)
if
(
ch
&
UART011_D
R_OE
)
uap
->
port
.
icount
.
overrun
++
;
rsr
&=
uap
->
port
.
read_status_mask
;
ch
&=
uap
->
port
.
read_status_mask
;
if
(
rsr
&
UART01x_RS
R_BE
)
if
(
ch
&
UART011_D
R_BE
)
flag
=
TTY_BREAK
;
else
if
(
rsr
&
UART01x_RS
R_PE
)
else
if
(
ch
&
UART011_D
R_PE
)
flag
=
TTY_PARITY
;
else
if
(
rsr
&
UART01x_RS
R_FE
)
else
if
(
ch
&
UART011_D
R_FE
)
flag
=
TTY_FRAME
;
}
if
(
uart_handle_sysrq_char
(
&
uap
->
port
,
ch
,
regs
))
goto
ignore_char
;
uart_insert_char
(
&
uap
->
port
,
rsr
,
UART01x_RS
R_OE
,
ch
,
flag
);
uart_insert_char
(
&
uap
->
port
,
ch
,
UART011_D
R_OE
,
ch
,
flag
);
ignore_char:
status
=
readw
(
uap
->
port
.
membase
+
UART01x_FR
);
...
...
@@ -476,33 +475,33 @@ pl011_set_termios(struct uart_port *port, struct termios *termios,
*/
uart_update_timeout
(
port
,
termios
->
c_cflag
,
baud
);
port
->
read_status_mask
=
UART01
x_RSR_OE
;
port
->
read_status_mask
=
UART01
1_DR_OE
|
255
;
if
(
termios
->
c_iflag
&
INPCK
)
port
->
read_status_mask
|=
UART01
x_RSR_FE
|
UART01x_RS
R_PE
;
port
->
read_status_mask
|=
UART01
1_DR_FE
|
UART011_D
R_PE
;
if
(
termios
->
c_iflag
&
(
BRKINT
|
PARMRK
))
port
->
read_status_mask
|=
UART01
x_RS
R_BE
;
port
->
read_status_mask
|=
UART01
1_D
R_BE
;
/*
* Characters to ignore
*/
port
->
ignore_status_mask
=
0
;
if
(
termios
->
c_iflag
&
IGNPAR
)
port
->
ignore_status_mask
|=
UART01
x_RSR_FE
|
UART01x_RS
R_PE
;
port
->
ignore_status_mask
|=
UART01
1_DR_FE
|
UART011_D
R_PE
;
if
(
termios
->
c_iflag
&
IGNBRK
)
{
port
->
ignore_status_mask
|=
UART01
x_RS
R_BE
;
port
->
ignore_status_mask
|=
UART01
1_D
R_BE
;
/*
* If we're ignoring parity and break indicators,
* ignore overruns too (for real raw support).
*/
if
(
termios
->
c_iflag
&
IGNPAR
)
port
->
ignore_status_mask
|=
UART01
x_RS
R_OE
;
port
->
ignore_status_mask
|=
UART01
1_D
R_OE
;
}
/*
* Ignore all characters if CREAD is not set.
*/
if
((
termios
->
c_cflag
&
CREAD
)
==
0
)
port
->
ignore_status_mask
|=
UART_DUMMY_
RS
R_RX
;
port
->
ignore_status_mask
|=
UART_DUMMY_
D
R_RX
;
if
(
UART_ENABLE_MS
(
port
,
termios
->
c_cflag
))
pl011_enable_ms
(
port
);
...
...
drivers/serial/sa1100.c
浏览文件 @
8ee3f402
...
...
@@ -161,7 +161,6 @@ static void sa1100_stop_tx(struct uart_port *port)
static
void
sa1100_start_tx
(
struct
uart_port
*
port
)
{
struct
sa1100_port
*
sport
=
(
struct
sa1100_port
*
)
port
;
unsigned
long
flags
;
u32
utcr3
;
utcr3
=
UART_GET_UTCR3
(
sport
);
...
...
include/asm-arm/hardware/amba_serial.h
浏览文件 @
8ee3f402
...
...
@@ -50,6 +50,11 @@
#define UART011_ICR 0x44
/* Interrupt clear register. */
#define UART011_DMACR 0x48
/* DMA control register. */
#define UART011_DR_OE (1 << 11)
#define UART011_DR_BE (1 << 10)
#define UART011_DR_PE (1 << 9)
#define UART011_DR_FE (1 << 8)
#define UART01x_RSR_OE 0x08
#define UART01x_RSR_BE 0x04
#define UART01x_RSR_PE 0x02
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录