Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
f3ba1503
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f3ba1503
编写于
8月 17, 2011
作者:
D
David S. Miller
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'can/mscan' of
git://git.pengutronix.de/git/mkl/linux-2.6
上级
c6865cb3
665d7eb8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
drivers/net/can/mscan/mscan.c
drivers/net/can/mscan/mscan.c
+13
-13
未找到文件。
drivers/net/can/mscan/mscan.c
浏览文件 @
f3ba1503
...
...
@@ -62,7 +62,7 @@ static enum can_state state_map[] = {
static
int
mscan_set_mode
(
struct
net_device
*
dev
,
u8
mode
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
int
ret
=
0
;
int
i
;
u8
canctl1
;
...
...
@@ -138,7 +138,7 @@ static int mscan_set_mode(struct net_device *dev, u8 mode)
static
int
mscan_start
(
struct
net_device
*
dev
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
u8
canrflg
;
int
err
;
...
...
@@ -178,7 +178,7 @@ static int mscan_restart(struct net_device *dev)
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
if
(
priv
->
type
==
MSCAN_TYPE_MPC5121
)
{
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
priv
->
can
.
state
=
CAN_STATE_ERROR_ACTIVE
;
WARN
(
!
(
in_8
(
&
regs
->
canmisc
)
&
MSCAN_BOHOLD
),
...
...
@@ -199,7 +199,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct
can_frame
*
frame
=
(
struct
can_frame
*
)
skb
->
data
;
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
int
i
,
rtr
,
buf_id
;
u32
can_id
;
...
...
@@ -305,7 +305,7 @@ static enum can_state check_set_state(struct net_device *dev, u8 canrflg)
static
void
mscan_get_rx_frame
(
struct
net_device
*
dev
,
struct
can_frame
*
frame
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
u32
can_id
;
int
i
;
...
...
@@ -343,7 +343,7 @@ static void mscan_get_err_frame(struct net_device *dev, struct can_frame *frame,
u8
canrflg
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
struct
net_device_stats
*
stats
=
&
dev
->
stats
;
enum
can_state
old_state
;
...
...
@@ -406,7 +406,7 @@ static int mscan_rx_poll(struct napi_struct *napi, int quota)
{
struct
mscan_priv
*
priv
=
container_of
(
napi
,
struct
mscan_priv
,
napi
);
struct
net_device
*
dev
=
napi
->
dev
;
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
struct
net_device_stats
*
stats
=
&
dev
->
stats
;
int
npackets
=
0
;
int
ret
=
1
;
...
...
@@ -453,7 +453,7 @@ static irqreturn_t mscan_isr(int irq, void *dev_id)
{
struct
net_device
*
dev
=
(
struct
net_device
*
)
dev_id
;
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
struct
net_device_stats
*
stats
=
&
dev
->
stats
;
u8
cantier
,
cantflg
,
canrflg
;
irqreturn_t
ret
=
IRQ_NONE
;
...
...
@@ -537,7 +537,7 @@ static int mscan_do_set_mode(struct net_device *dev, enum can_mode mode)
static
int
mscan_do_set_bittiming
(
struct
net_device
*
dev
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
struct
can_bittiming
*
bt
=
&
priv
->
can
.
bittiming
;
u8
btr0
,
btr1
;
...
...
@@ -559,7 +559,7 @@ static int mscan_open(struct net_device *dev)
{
int
ret
;
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
/* common open */
ret
=
open_candev
(
dev
);
...
...
@@ -598,7 +598,7 @@ static int mscan_open(struct net_device *dev)
static
int
mscan_close
(
struct
net_device
*
dev
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
netif_stop_queue
(
dev
);
napi_disable
(
&
priv
->
napi
);
...
...
@@ -622,7 +622,7 @@ static const struct net_device_ops mscan_netdev_ops = {
int
register_mscandev
(
struct
net_device
*
dev
,
int
mscan_clksrc
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
u8
ctl1
;
ctl1
=
in_8
(
&
regs
->
canctl1
);
...
...
@@ -659,7 +659,7 @@ int register_mscandev(struct net_device *dev, int mscan_clksrc)
void
unregister_mscandev
(
struct
net_device
*
dev
)
{
struct
mscan_priv
*
priv
=
netdev_priv
(
dev
);
struct
mscan_regs
*
regs
=
(
struct
mscan_regs
*
)
priv
->
reg_base
;
struct
mscan_regs
__iomem
*
regs
=
priv
->
reg_base
;
mscan_set_mode
(
dev
,
MSCAN_INIT_MODE
);
clrbits8
(
&
regs
->
canctl1
,
MSCAN_CANE
);
unregister_candev
(
dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录