Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FengXiao2002
Linux Imx
提交
0446c3b1
L
Linux Imx
项目概览
FengXiao2002
/
Linux Imx
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
Linux Imx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0446c3b1
编写于
7月 09, 2008
作者:
K
Krzysztof Hałasa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WAN: rework HD64572 interrupts a bit.
Signed-off-by:
N
Krzysztof Hałasa
<
khc@pm.waw.pl
>
上级
b0942f78
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
23 deletion
+13
-23
drivers/net/wan/hd64572.c
drivers/net/wan/hd64572.c
+13
-23
未找到文件。
drivers/net/wan/hd64572.c
浏览文件 @
0446c3b1
...
...
@@ -67,19 +67,12 @@ static inline int sca_intr_status(card_t *card)
u8
result
=
0
;
u32
isr0
=
sca_inl
(
ISR0
,
card
);
if
(
isr0
&
0x0000000F
)
result
|=
SCA_INTR_DMAC_RX
(
0
);
if
(
isr0
&
0x000000F0
)
result
|=
SCA_INTR_DMAC_TX
(
0
);
if
(
isr0
&
0x00000F00
)
result
|=
SCA_INTR_DMAC_RX
(
1
);
if
(
isr0
&
0x0000F000
)
result
|=
SCA_INTR_DMAC_TX
(
1
);
if
(
isr0
&
0x003E0000
)
result
|=
SCA_INTR_MSCI
(
0
);
if
(
isr0
&
0x3E000000
)
result
|=
SCA_INTR_MSCI
(
1
);
if
(
!
(
result
&
SCA_INTR_DMAC_TX
(
0
)))
if
(
sca_in
(
DSR_TX
(
0
),
card
)
&
DSR_EOM
)
result
|=
SCA_INTR_DMAC_TX
(
0
);
if
(
!
(
result
&
SCA_INTR_DMAC_TX
(
1
)))
if
(
sca_in
(
DSR_TX
(
1
),
card
)
&
DSR_EOM
)
result
|=
SCA_INTR_DMAC_TX
(
1
);
if
(
isr0
&
0x00000002
)
result
|=
SCA_INTR_DMAC_RX
(
0
);
if
(
isr0
&
0x00000020
)
result
|=
SCA_INTR_DMAC_TX
(
0
);
if
(
isr0
&
0x00000200
)
result
|=
SCA_INTR_DMAC_RX
(
1
);
if
(
isr0
&
0x00002000
)
result
|=
SCA_INTR_DMAC_TX
(
1
);
if
(
isr0
&
0x00080000
)
result
|=
SCA_INTR_MSCI
(
0
);
if
(
isr0
&
0x08000000
)
result
|=
SCA_INTR_MSCI
(
1
);
return
result
;
}
...
...
@@ -91,10 +84,9 @@ static inline port_t* dev_to_port(struct net_device *dev)
static
inline
void
enable_intr
(
port_t
*
port
)
{
/* DMA & MSCI IRQ enable */
/* IR0_TXINT | IR0_RXINTA | IR0_DMIB* | IR0_DMIA* */
/* enable DMIB and MSCI RXINTA interrupts */
sca_outl
(
sca_inl
(
IER0
,
port
->
card
)
|
(
phy_node
(
port
)
?
0x0
A006600
:
0x000A0066
),
IER0
,
port
->
card
);
(
phy_node
(
port
)
?
0x0
8002200
:
0x00080022
),
IER0
,
port
->
card
);
}
static
inline
void
disable_intr
(
port_t
*
port
)
...
...
@@ -211,15 +203,14 @@ static void sca_init_port(port_t *port)
sca_outw
(
HDLC_MAX_MRU
,
dmac
+
BFLL
,
card
);
/* Chain mode, Multi-frame */
sca_out
(
0x14
,
DMR_RX
(
phy_node
(
port
)),
card
);
sca_out
(
DIR_EOME
|
DIR_BOFE
,
DIR_RX
(
phy_node
(
port
)),
card
);
sca_out
(
DIR_EOME
,
DIR_RX
(
phy_node
(
port
)),
card
);
/* DMA enable */
sca_out
(
DSR_DE
,
DSR_RX
(
phy_node
(
port
)),
card
);
}
else
{
/* Transmit */
/* Chain mode, Multi-frame */
sca_out
(
0x14
,
DMR_TX
(
phy_node
(
port
)),
card
);
/* enable underflow interrupts */
sca_out
(
DIR_
BOF
E
,
DIR_TX
(
phy_node
(
port
)),
card
);
sca_out
(
DIR_
EOM
E
,
DIR_TX
(
phy_node
(
port
)),
card
);
}
}
sca_set_carrier
(
port
);
...
...
@@ -502,11 +493,10 @@ static void sca_open(struct net_device *dev)
sca_out
(
0x3F
,
msci
+
TNR1
,
card
);
/* +1=TX DMA deactivation condition*/
/* We're using the following interrupts:
-
TXINT (DMAC completed all transmissions and DCD changes
)
-
all DMA interrupts
-
RXINTA (DCD changes only
)
-
DMIB (EOM - single frame transfer complete)
*/
/* MSCI TXINT and RXINTA interrupt enable */
sca_outl
(
IE0_TXINT
|
IE0_RXINTA
|
IE0_CDCD
,
msci
+
IE0
,
card
);
sca_outl
(
IE0_RXINTA
|
IE0_CDCD
,
msci
+
IE0
,
card
);
sca_out
(
port
->
tmc
,
msci
+
TMCR
,
card
);
sca_out
(
port
->
tmc
,
msci
+
TMCT
,
card
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录