Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
84f05df4
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看板
提交
84f05df4
编写于
4月 26, 2008
作者:
B
Bartlomiej Zolnierkiewicz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cmd640: use ide_find_port()
Signed-off-by:
N
Bartlomiej Zolnierkiewicz
<
bzolnier@gmail.com
>
上级
9523076a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
10 deletion
+19
-10
drivers/ide/pci/cmd640.c
drivers/ide/pci/cmd640.c
+19
-10
未找到文件。
drivers/ide/pci/cmd640.c
浏览文件 @
84f05df4
...
...
@@ -744,18 +744,19 @@ static int __init cmd640x_init(void)
printk
(
KERN_INFO
"cmd640: buggy cmd640%c interface on %s, config=0x%02x"
"
\n
"
,
'a'
+
cmd640_chip_version
-
1
,
bus_type
,
cfr
);
cmd_hwif0
=
&
ide_hwifs
[
0
];
cmd_hwif1
=
&
ide_hwifs
[
1
];
cmd_hwif0
=
ide_find_port
();
/*
* Initialize data for primary port
*/
ide_init_port_hw
(
cmd_hwif0
,
&
hw
[
0
]);
if
(
cmd_hwif0
)
{
ide_init_port_hw
(
cmd_hwif0
,
&
hw
[
0
]);
#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
cmd_hwif0
->
set_pio_mode
=
&
cmd640_set_pio_mode
;
cmd_hwif0
->
set_pio_mode
=
&
cmd640_set_pio_mode
;
#endif
/* CONFIG_BLK_DEV_CMD640_ENHANCED */
idx
[
0
]
=
cmd_hwif0
->
index
;
idx
[
0
]
=
cmd_hwif0
->
index
;
}
/*
* Ensure compatibility by always using the slowest timings
...
...
@@ -767,10 +768,13 @@ static int __init cmd640x_init(void)
put_cmd640_reg
(
CMDTIM
,
0
);
put_cmd640_reg
(
BRST
,
0x40
);
cmd_hwif1
=
ide_find_port
();
/*
* Try to enable the secondary interface, if not already enabled
*/
if
(
cmd_hwif1
->
drives
[
0
].
noprobe
&&
cmd_hwif1
->
drives
[
1
].
noprobe
)
{
if
(
cmd_hwif1
&&
cmd_hwif1
->
drives
[
0
].
noprobe
&&
cmd_hwif1
->
drives
[
1
].
noprobe
)
{
port2
=
"not probed"
;
}
else
{
b
=
get_cmd640_reg
(
CNTRL
);
...
...
@@ -801,7 +805,7 @@ static int __init cmd640x_init(void)
/*
* Initialize data for secondary cmd640 port, if enabled
*/
if
(
second_port_cmd640
)
{
if
(
second_port_cmd640
&&
cmd_hwif1
)
{
ide_init_port_hw
(
cmd_hwif1
,
&
hw
[
1
]);
#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
cmd_hwif1
->
set_pio_mode
=
&
cmd640_set_pio_mode
;
...
...
@@ -809,7 +813,7 @@ static int __init cmd640x_init(void)
idx
[
1
]
=
cmd_hwif1
->
index
;
}
printk
(
KERN_INFO
"
%s: %sserialized, secondary interface %s
\n
"
,
cmd_hwif1
->
name
,
printk
(
KERN_INFO
"
cmd640: %sserialized, secondary interface %s
\n
"
,
second_port_cmd640
?
""
:
"not "
,
port2
);
/*
...
...
@@ -819,10 +823,15 @@ static int __init cmd640x_init(void)
for
(
index
=
0
;
index
<
(
2
+
(
second_port_cmd640
<<
1
));
index
++
)
{
ide_drive_t
*
drive
;
if
(
index
>
1
)
if
(
index
>
1
)
{
if
(
cmd_hwif1
==
NULL
)
continue
;
drive
=
&
cmd_hwif1
->
drives
[
index
&
1
];
else
}
else
{
if
(
cmd_hwif0
==
NULL
)
continue
;
drive
=
&
cmd_hwif0
->
drives
[
index
&
1
];
}
#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
if
(
drive
->
autotune
||
((
index
>
1
)
&&
second_port_toggled
))
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录