Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
60e57ed7
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
60e57ed7
编写于
7月 24, 2008
作者:
B
Bartlomiej Zolnierkiewicz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aec62xx: convert to use ->host_priv
Signed-off-by:
N
Bartlomiej Zolnierkiewicz
<
bzolnier@gmail.com
>
上级
08da591e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
16 addition
and
16 deletion
+16
-16
drivers/ide/pci/aec62xx.c
drivers/ide/pci/aec62xx.c
+16
-16
未找到文件。
drivers/ide/pci/aec62xx.c
浏览文件 @
60e57ed7
...
...
@@ -59,10 +59,6 @@ static const struct chipset_bus_clock_list_entry aec6xxx_34_base [] = {
{
0
,
0x00
,
0x00
}
};
#define BUSCLOCK(D) \
((struct chipset_bus_clock_list_entry *) pci_get_drvdata((D)))
/*
* TO DO: active tuning and correction of cards without a bios.
*/
...
...
@@ -88,6 +84,8 @@ static void aec6210_set_mode(ide_drive_t *drive, const u8 speed)
{
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
struct
pci_dev
*
dev
=
to_pci_dev
(
hwif
->
dev
);
struct
ide_host
*
host
=
pci_get_drvdata
(
dev
);
struct
chipset_bus_clock_list_entry
*
bus_clock
=
host
->
host_priv
;
u16
d_conf
=
0
;
u8
ultra
=
0
,
ultra_conf
=
0
;
u8
tmp0
=
0
,
tmp1
=
0
,
tmp2
=
0
;
...
...
@@ -96,7 +94,7 @@ static void aec6210_set_mode(ide_drive_t *drive, const u8 speed)
local_irq_save
(
flags
);
/* 0x40|(2*drive->dn): Active, 0x41|(2*drive->dn): Recovery */
pci_read_config_word
(
dev
,
0x40
|
(
2
*
drive
->
dn
),
&
d_conf
);
tmp0
=
pci_bus_clock_list
(
speed
,
BUSCLOCK
(
dev
)
);
tmp0
=
pci_bus_clock_list
(
speed
,
bus_clock
);
d_conf
=
((
tmp0
&
0xf0
)
<<
4
)
|
(
tmp0
&
0xf
);
pci_write_config_word
(
dev
,
0x40
|
(
2
*
drive
->
dn
),
d_conf
);
...
...
@@ -104,7 +102,7 @@ static void aec6210_set_mode(ide_drive_t *drive, const u8 speed)
tmp2
=
0x00
;
pci_read_config_byte
(
dev
,
0x54
,
&
ultra
);
tmp1
=
((
0x00
<<
(
2
*
drive
->
dn
))
|
(
ultra
&
~
(
3
<<
(
2
*
drive
->
dn
))));
ultra_conf
=
pci_bus_clock_list_ultra
(
speed
,
BUSCLOCK
(
dev
)
);
ultra_conf
=
pci_bus_clock_list_ultra
(
speed
,
bus_clock
);
tmp2
=
((
ultra_conf
<<
(
2
*
drive
->
dn
))
|
(
tmp1
&
~
(
3
<<
(
2
*
drive
->
dn
))));
pci_write_config_byte
(
dev
,
0x54
,
tmp2
);
local_irq_restore
(
flags
);
...
...
@@ -114,6 +112,8 @@ static void aec6260_set_mode(ide_drive_t *drive, const u8 speed)
{
ide_hwif_t
*
hwif
=
HWIF
(
drive
);
struct
pci_dev
*
dev
=
to_pci_dev
(
hwif
->
dev
);
struct
ide_host
*
host
=
pci_get_drvdata
(
dev
);
struct
chipset_bus_clock_list_entry
*
bus_clock
=
host
->
host_priv
;
u8
unit
=
(
drive
->
select
.
b
.
unit
&
0x01
);
u8
tmp1
=
0
,
tmp2
=
0
;
u8
ultra
=
0
,
drive_conf
=
0
,
ultra_conf
=
0
;
...
...
@@ -122,12 +122,12 @@ static void aec6260_set_mode(ide_drive_t *drive, const u8 speed)
local_irq_save
(
flags
);
/* high 4-bits: Active, low 4-bits: Recovery */
pci_read_config_byte
(
dev
,
0x40
|
drive
->
dn
,
&
drive_conf
);
drive_conf
=
pci_bus_clock_list
(
speed
,
BUSCLOCK
(
dev
)
);
drive_conf
=
pci_bus_clock_list
(
speed
,
bus_clock
);
pci_write_config_byte
(
dev
,
0x40
|
drive
->
dn
,
drive_conf
);
pci_read_config_byte
(
dev
,
(
0x44
|
hwif
->
channel
),
&
ultra
);
tmp1
=
((
0x00
<<
(
4
*
unit
))
|
(
ultra
&
~
(
7
<<
(
4
*
unit
))));
ultra_conf
=
pci_bus_clock_list_ultra
(
speed
,
BUSCLOCK
(
dev
)
);
ultra_conf
=
pci_bus_clock_list_ultra
(
speed
,
bus_clock
);
tmp2
=
((
ultra_conf
<<
(
4
*
unit
))
|
(
tmp1
&
~
(
7
<<
(
4
*
unit
))));
pci_write_config_byte
(
dev
,
(
0x44
|
hwif
->
channel
),
tmp2
);
local_irq_restore
(
flags
);
...
...
@@ -140,13 +140,6 @@ static void aec_set_pio_mode(ide_drive_t *drive, const u8 pio)
static
unsigned
int
__devinit
init_chipset_aec62xx
(
struct
pci_dev
*
dev
,
const
char
*
name
)
{
int
bus_speed
=
ide_pci_clk
?
ide_pci_clk
:
33
;
if
(
bus_speed
<=
33
)
pci_set_drvdata
(
dev
,
(
void
*
)
aec6xxx_33_base
);
else
pci_set_drvdata
(
dev
,
(
void
*
)
aec6xxx_34_base
);
/* These are necessary to get AEC6280 Macintosh cards to work */
if
((
dev
->
device
==
PCI_DEVICE_ID_ARTOP_ATP865
)
||
(
dev
->
device
==
PCI_DEVICE_ID_ARTOP_ATP865R
))
{
...
...
@@ -254,10 +247,17 @@ static const struct ide_port_info aec62xx_chipsets[] __devinitdata = {
static
int
__devinit
aec62xx_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
const
struct
chipset_bus_clock_list_entry
*
bus_clock
;
struct
ide_port_info
d
;
u8
idx
=
id
->
driver_data
;
int
bus_speed
=
ide_pci_clk
?
ide_pci_clk
:
33
;
int
err
;
if
(
bus_speed
<=
33
)
bus_clock
=
aec6xxx_33_base
;
else
bus_clock
=
aec6xxx_34_base
;
err
=
pci_enable_device
(
dev
);
if
(
err
)
return
err
;
...
...
@@ -273,7 +273,7 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
}
}
err
=
ide_pci_init_one
(
dev
,
&
d
,
NULL
);
err
=
ide_pci_init_one
(
dev
,
&
d
,
(
void
*
)
bus_clock
);
if
(
err
)
pci_disable_device
(
dev
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录