Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
d6561010
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d6561010
编写于
2月 01, 2006
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] sn3 iomem annotations and fixes
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
29e646df
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
10 deletion
+10
-10
drivers/sn/ioc3.c
drivers/sn/ioc3.c
+9
-9
include/linux/ioc3.h
include/linux/ioc3.h
+1
-1
未找到文件。
drivers/sn/ioc3.c
浏览文件 @
d6561010
...
@@ -38,10 +38,10 @@ static inline unsigned mcr_pack(unsigned pulse, unsigned sample)
...
@@ -38,10 +38,10 @@ static inline unsigned mcr_pack(unsigned pulse, unsigned sample)
static
int
nic_wait
(
struct
ioc3_driver_data
*
idd
)
static
int
nic_wait
(
struct
ioc3_driver_data
*
idd
)
{
{
volatile
unsigned
mcr
;
unsigned
mcr
;
do
{
do
{
mcr
=
(
volatile
unsigned
)
idd
->
vma
->
mcr
;
mcr
=
readl
(
&
idd
->
vma
->
mcr
)
;
}
while
(
!
(
mcr
&
2
));
}
while
(
!
(
mcr
&
2
));
return
mcr
&
1
;
return
mcr
&
1
;
...
@@ -53,7 +53,7 @@ static int nic_reset(struct ioc3_driver_data *idd)
...
@@ -53,7 +53,7 @@ static int nic_reset(struct ioc3_driver_data *idd)
unsigned
long
flags
;
unsigned
long
flags
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
idd
->
vma
->
mcr
=
mcr_pack
(
500
,
65
);
writel
(
mcr_pack
(
500
,
65
),
&
idd
->
vma
->
mcr
);
presence
=
nic_wait
(
idd
);
presence
=
nic_wait
(
idd
);
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
...
@@ -68,7 +68,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
...
@@ -68,7 +68,7 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
unsigned
long
flags
;
unsigned
long
flags
;
local_irq_save
(
flags
);
local_irq_save
(
flags
);
idd
->
vma
->
mcr
=
mcr_pack
(
6
,
13
);
writel
(
mcr_pack
(
6
,
13
),
&
idd
->
vma
->
mcr
);
result
=
nic_wait
(
idd
);
result
=
nic_wait
(
idd
);
local_irq_restore
(
flags
);
local_irq_restore
(
flags
);
...
@@ -80,9 +80,9 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
...
@@ -80,9 +80,9 @@ static inline int nic_read_bit(struct ioc3_driver_data *idd)
static
inline
void
nic_write_bit
(
struct
ioc3_driver_data
*
idd
,
int
bit
)
static
inline
void
nic_write_bit
(
struct
ioc3_driver_data
*
idd
,
int
bit
)
{
{
if
(
bit
)
if
(
bit
)
idd
->
vma
->
mcr
=
mcr_pack
(
6
,
110
);
writel
(
mcr_pack
(
6
,
110
),
&
idd
->
vma
->
mcr
);
else
else
idd
->
vma
->
mcr
=
mcr_pack
(
80
,
30
);
writel
(
mcr_pack
(
80
,
30
),
&
idd
->
vma
->
mcr
);
nic_wait
(
idd
);
nic_wait
(
idd
);
}
}
...
@@ -337,7 +337,7 @@ static void probe_nic(struct ioc3_driver_data *idd)
...
@@ -337,7 +337,7 @@ static void probe_nic(struct ioc3_driver_data *idd)
int
save
=
0
,
loops
=
3
;
int
save
=
0
,
loops
=
3
;
unsigned
long
first
,
addr
;
unsigned
long
first
,
addr
;
idd
->
vma
->
gpcr_s
=
GPCR_MLAN_EN
;
writel
(
GPCR_MLAN_EN
,
&
idd
->
vma
->
gpcr_s
)
;
while
(
loops
>
0
)
{
while
(
loops
>
0
)
{
idd
->
nic_part
[
0
]
=
0
;
idd
->
nic_part
[
0
]
=
0
;
...
@@ -408,7 +408,7 @@ static irqreturn_t ioc3_intr_io(int irq, void *arg, struct pt_regs *regs)
...
@@ -408,7 +408,7 @@ static irqreturn_t ioc3_intr_io(int irq, void *arg, struct pt_regs *regs)
read_lock_irqsave
(
&
ioc3_submodules_lock
,
flags
);
read_lock_irqsave
(
&
ioc3_submodules_lock
,
flags
);
if
(
idd
->
dual_irq
&&
idd
->
vma
->
eisr
)
{
if
(
idd
->
dual_irq
&&
readb
(
&
idd
->
vma
->
eisr
)
)
{
/* send Ethernet IRQ to the driver */
/* send Ethernet IRQ to the driver */
if
(
ioc3_ethernet
&&
idd
->
active
[
ioc3_ethernet
->
id
]
&&
if
(
ioc3_ethernet
&&
idd
->
active
[
ioc3_ethernet
->
id
]
&&
ioc3_ethernet
->
intr
)
{
ioc3_ethernet
->
intr
)
{
...
@@ -682,7 +682,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
...
@@ -682,7 +682,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
idd
->
id
=
ioc3_counter
++
;
idd
->
id
=
ioc3_counter
++
;
up_write
(
&
ioc3_devices_rwsem
);
up_write
(
&
ioc3_devices_rwsem
);
idd
->
gpdr_shadow
=
idd
->
vma
->
gpdr
;
idd
->
gpdr_shadow
=
readl
(
&
idd
->
vma
->
gpdr
)
;
/* Read IOC3 NIC contents */
/* Read IOC3 NIC contents */
probe_nic
(
idd
);
probe_nic
(
idd
);
...
...
include/linux/ioc3.h
浏览文件 @
d6561010
...
@@ -27,7 +27,7 @@ struct ioc3_driver_data {
...
@@ -27,7 +27,7 @@ struct ioc3_driver_data {
int
id
;
/* IOC3 sequence number */
int
id
;
/* IOC3 sequence number */
/* PCI mapping */
/* PCI mapping */
unsigned
long
pma
;
/* physical address */
unsigned
long
pma
;
/* physical address */
struct
__iomem
ioc3
*
vma
;
/* pointer to registers */
struct
ioc3
__iomem
*
vma
;
/* pointer to registers */
struct
pci_dev
*
pdev
;
/* PCI device */
struct
pci_dev
*
pdev
;
/* PCI device */
/* IRQ stuff */
/* IRQ stuff */
int
dual_irq
;
/* set if separate IRQs are used */
int
dual_irq
;
/* set if separate IRQs are used */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录