Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
9239b333
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看板
提交
9239b333
编写于
10月 20, 2007
作者:
B
Bartlomiej Zolnierkiewicz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ide: remove write-only hwif->hw
Signed-off-by:
N
Bartlomiej Zolnierkiewicz
<
bzolnier@gmail.com
>
上级
18e181fe
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
40 addition
and
51 deletion
+40
-51
drivers/ide/arm/icside.c
drivers/ide/arm/icside.c
+0
-5
drivers/ide/arm/rapide.c
drivers/ide/arm/rapide.c
+1
-3
drivers/ide/ide.c
drivers/ide/ide.c
+8
-7
drivers/ide/legacy/ide_platform.c
drivers/ide/legacy/ide_platform.c
+5
-6
drivers/ide/mips/au1xxx-ide.c
drivers/ide/mips/au1xxx-ide.c
+5
-5
drivers/ide/mips/swarm.c
drivers/ide/mips/swarm.c
+3
-6
drivers/ide/pci/sgiioc4.c
drivers/ide/pci/sgiioc4.c
+5
-3
drivers/ide/pci/siimage.c
drivers/ide/pci/siimage.c
+3
-8
drivers/ide/ppc/pmac.c
drivers/ide/ppc/pmac.c
+4
-2
drivers/ide/setup-pci.c
drivers/ide/setup-pci.c
+6
-5
include/linux/ide.h
include/linux/ide.h
+0
-1
未找到文件。
drivers/ide/arm/icside.c
浏览文件 @
9239b333
...
...
@@ -450,8 +450,6 @@ icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *e
if
(
hwif
)
{
int
i
;
memset
(
&
hwif
->
hw
,
0
,
sizeof
(
hw_regs_t
));
/*
* Ensure we're using MMIO
*/
...
...
@@ -459,13 +457,10 @@ icside_setup(void __iomem *base, struct cardinfo *info, struct expansion_card *e
hwif
->
mmio
=
1
;
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
{
hwif
->
hw
.
io_ports
[
i
]
=
port
;
hwif
->
io_ports
[
i
]
=
port
;
port
+=
1
<<
info
->
stepping
;
}
hwif
->
hw
.
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
base
+
info
->
ctrloffset
;
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
base
+
info
->
ctrloffset
;
hwif
->
hw
.
irq
=
ec
->
irq
;
hwif
->
irq
=
ec
->
irq
;
hwif
->
noprobe
=
0
;
hwif
->
chipset
=
ide_acorn
;
...
...
drivers/ide/arm/rapide.c
浏览文件 @
9239b333
...
...
@@ -24,13 +24,11 @@ rapide_locate_hwif(void __iomem *base, void __iomem *ctrl, unsigned int sz, int
goto
out
;
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
{
hwif
->
hw
.
io_ports
[
i
]
=
port
;
hwif
->
io_ports
[
i
]
=
port
;
port
+=
sz
;
}
hwif
->
hw
.
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
ctrl
;
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
ctrl
;
hwif
->
hw
.
irq
=
hwif
->
irq
=
irq
;
hwif
->
irq
=
irq
;
hwif
->
mmio
=
1
;
default_hwif_mmiops
(
hwif
);
out:
...
...
drivers/ide/ide.c
浏览文件 @
9239b333
...
...
@@ -168,7 +168,6 @@ static void init_hwif_default(ide_hwif_t *hwif, unsigned int index)
ide_init_hwif_ports
(
&
hw
,
ide_default_io_base
(
index
),
0
,
&
hwif
->
irq
);
memcpy
(
&
hwif
->
hw
,
&
hw
,
sizeof
(
hw
));
memcpy
(
hwif
->
io_ports
,
hw
.
io_ports
,
sizeof
(
hw
.
io_ports
));
hwif
->
noprobe
=
!
hwif
->
io_ports
[
IDE_DATA_OFFSET
];
...
...
@@ -214,7 +213,7 @@ static void __init init_ide_data (void)
init_hwif_data
(
hwif
,
index
);
init_hwif_default
(
hwif
,
index
);
#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI)
hwif
->
irq
=
hwif
->
hw
.
irq
=
hwif
->
irq
=
ide_init_default_irq
(
hwif
->
io_ports
[
IDE_DATA_OFFSET
]);
#endif
}
...
...
@@ -730,8 +729,7 @@ int ide_register_hw(hw_regs_t *hw, void (*fixup)(ide_hwif_t *),
}
if
(
hwif
->
present
)
return
-
1
;
memcpy
(
&
hwif
->
hw
,
hw
,
sizeof
(
*
hw
));
memcpy
(
hwif
->
io_ports
,
hwif
->
hw
.
io_ports
,
sizeof
(
hwif
->
hw
.
io_ports
));
memcpy
(
hwif
->
io_ports
,
hw
->
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
irq
=
hw
->
irq
;
hwif
->
noprobe
=
0
;
hwif
->
fixup
=
fixup
;
...
...
@@ -1417,6 +1415,9 @@ static int __init ide_setup(char *s)
"reset"
,
"minus6"
,
"ata66"
,
"minus8"
,
"minus9"
,
"minus10"
,
"four"
,
"qd65xx"
,
"ht6560b"
,
"cmd640_vlb"
,
"dtc2278"
,
"umc8672"
,
"ali14xx"
,
NULL
};
hw_regs_t
hwregs
;
hw
=
s
[
3
]
-
'0'
;
hwif
=
&
ide_hwifs
[
hw
];
i
=
match_parm
(
&
s
[
4
],
ide_words
,
vals
,
3
);
...
...
@@ -1526,9 +1527,9 @@ static int __init ide_setup(char *s)
case
2
:
/* base,ctl */
vals
[
2
]
=
0
;
/* default irq = probe for it */
case
3
:
/* base,ctl,irq */
hwif
->
hw
.
irq
=
vals
[
2
]
;
ide_init_hwif_ports
(
&
hw
if
->
hw
,
(
unsigned
long
)
vals
[
0
],
(
unsigned
long
)
vals
[
1
],
&
hwif
->
irq
);
memcpy
(
hwif
->
io_ports
,
hw
if
->
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
memset
(
&
hwregs
,
0
,
sizeof
(
hwregs
))
;
ide_init_hwif_ports
(
&
hw
regs
,
vals
[
0
],
vals
[
1
],
&
hwif
->
irq
);
memcpy
(
hwif
->
io_ports
,
hw
regs
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
irq
=
vals
[
2
];
hwif
->
noprobe
=
0
;
hwif
->
chipset
=
ide_forced
;
...
...
drivers/ide/legacy/ide_platform.c
浏览文件 @
9239b333
...
...
@@ -39,19 +39,18 @@ static ide_hwif_t *__devinit plat_ide_locate_hwif(void __iomem *base,
if
(
hwif
==
NULL
)
goto
out
;
hwif
->
hw
.
io_ports
[
IDE_DATA_OFFSET
]
=
port
;
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
=
port
;
port
+=
(
1
<<
pdata
->
ioport_shift
);
for
(
i
=
IDE_ERROR_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
,
port
+=
(
1
<<
pdata
->
ioport_shift
))
hwif
->
hw
.
io_ports
[
i
]
=
port
;
hwif
->
io_ports
[
i
]
=
port
;
hwif
->
hw
.
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
ctrl
;
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)
ctrl
;
memcpy
(
hwif
->
io_ports
,
hwif
->
hw
.
io_ports
,
sizeof
(
hwif
->
hw
.
io_ports
));
hwif
->
hw
.
irq
=
hwif
->
irq
=
irq
;
hwif
->
irq
=
irq
;
hwif
->
chipset
=
hwif
->
hw
.
chipset
=
ide_generic
;
hwif
->
chipset
=
ide_generic
;
if
(
mmio
)
{
hwif
->
mmio
=
1
;
...
...
drivers/ide/mips/au1xxx-ide.c
浏览文件 @
9239b333
...
...
@@ -601,9 +601,9 @@ static int au_ide_probe(struct device *dev)
_auide_hwif
*
ahwif
=
&
auide_hwif
;
ide_hwif_t
*
hwif
;
struct
resource
*
res
;
hw_regs_t
*
hw
;
int
ret
=
0
;
u8
idx
[
4
]
=
{
0xff
,
0xff
,
0xff
,
0xff
};
hw_regs_t
hw
;
#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA)
char
*
mode
=
"MWDMA2"
;
...
...
@@ -645,12 +645,12 @@ static int au_ide_probe(struct device *dev)
/* FIXME: This might possibly break PCMCIA IDE devices */
hwif
=
&
ide_hwifs
[
pdev
->
id
];
hw
=
&
hwif
->
hw
;
hwif
->
irq
=
hw
->
irq
=
ahwif
->
irq
;
hwif
->
irq
=
ahwif
->
irq
;
hwif
->
chipset
=
ide_au1xxx
;
auide_setup_ports
(
hw
,
ahwif
);
memcpy
(
hwif
->
io_ports
,
hw
->
io_ports
,
sizeof
(
hwif
->
io_ports
));
memset
(
&
hw
,
0
,
sizeof
(
hw
));
auide_setup_ports
(
&
hw
,
ahwif
);
memcpy
(
hwif
->
io_ports
,
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
ultra_mask
=
0x0
;
/* Disable Ultra DMA */
#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
...
...
drivers/ide/mips/swarm.c
浏览文件 @
9239b333
...
...
@@ -120,14 +120,11 @@ static int __devinit swarm_ide_probe(struct device *dev)
hwif
->
noprobe
=
0
;
for
(
i
=
IDE_DATA_OFFSET
;
i
<=
IDE_STATUS_OFFSET
;
i
++
)
hwif
->
hw
.
io_ports
[
i
]
=
hwif
->
io_ports
[
i
]
=
(
unsigned
long
)(
base
+
((
0x1f0
+
i
)
<<
5
));
hwif
->
hw
.
io_ports
[
IDE_CONTROL_OFFSET
]
=
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
]
=
(
unsigned
long
)(
base
+
(
0x3f6
<<
5
));
hwif
->
hw
.
irq
=
K_INT_GB_IDE
;
memcpy
(
hwif
->
io_ports
,
hwif
->
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
irq
=
hwif
->
hw
.
irq
;
hwif
->
irq
=
K_INT_GB_IDE
;
idx
[
0
]
=
hwif
->
index
;
...
...
drivers/ide/pci/sgiioc4.c
浏览文件 @
9239b333
...
...
@@ -655,10 +655,12 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
}
if
(
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
!=
cmd_base
)
{
hw_regs_t
hw
;
/* Initialize the IO registers */
sgiioc4_init_hwif_ports
(
&
hwif
->
hw
,
cmd_base
,
ctl
,
irqport
);
memcpy
(
hwif
->
io_ports
,
hwif
->
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
memset
(
&
hw
,
0
,
sizeof
(
hw
)
);
sgiioc4_init_hwif_ports
(
&
hw
,
cmd_base
,
ctl
,
irqport
);
memcpy
(
hwif
->
io_ports
,
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
noprobe
=
!
hwif
->
io_ports
[
IDE_DATA_OFFSET
];
}
...
...
drivers/ide/pci/siimage.c
浏览文件 @
9239b333
...
...
@@ -754,16 +754,11 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif)
hwif
->
sata_misc
[
SATA_IEN_OFFSET
]
=
base
+
0x148
;
}
hw
.
irq
=
hwif
->
pci_dev
->
irq
;
memcpy
(
hwif
->
io_ports
,
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
))
;
memcpy
(
&
hwif
->
hw
,
&
hw
,
sizeof
(
hw
));
memcpy
(
hwif
->
io_ports
,
hwif
->
hw
.
io_ports
,
sizeof
(
hwif
->
hw
.
io_ports
));
hwif
->
irq
=
dev
->
irq
;
hwif
->
irq
=
hw
.
irq
;
base
=
(
unsigned
long
)
addr
;
hwif
->
dma_base
=
base
+
(
ch
?
0x08
:
0x00
);
hwif
->
dma_base
=
(
unsigned
long
)
addr
+
(
ch
?
0x08
:
0x00
);
hwif
->
mmio
=
1
;
}
...
...
drivers/ide/ppc/pmac.c
浏览文件 @
9239b333
...
...
@@ -1040,6 +1040,7 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
struct
device_node
*
np
=
pmif
->
node
;
const
int
*
bidp
;
u8
idx
[
4
]
=
{
0xff
,
0xff
,
0xff
,
0xff
};
hw_regs_t
hw
;
pmif
->
cable_80
=
0
;
pmif
->
broken_dma
=
pmif
->
broken_dma_warn
=
0
;
...
...
@@ -1125,8 +1126,9 @@ pmac_ide_setup_device(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
/* Tell common code _not_ to mess with resources */
hwif
->
mmio
=
1
;
hwif
->
hwif_data
=
pmif
;
pmac_ide_init_hwif_ports
(
&
hwif
->
hw
,
pmif
->
regbase
,
0
,
&
hwif
->
irq
);
memcpy
(
hwif
->
io_ports
,
hwif
->
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
memset
(
&
hw
,
0
,
sizeof
(
hw
));
pmac_ide_init_hwif_ports
(
&
hw
,
pmif
->
regbase
,
0
,
&
hwif
->
irq
);
memcpy
(
hwif
->
io_ports
,
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
chipset
=
ide_pmac
;
hwif
->
noprobe
=
!
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
||
pmif
->
mediabay
;
hwif
->
hold
=
pmif
->
mediabay
;
...
...
drivers/ide/setup-pci.c
浏览文件 @
9239b333
...
...
@@ -387,14 +387,15 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
return
NULL
;
/* no room in ide_hwifs[] */
if
(
hwif
->
io_ports
[
IDE_DATA_OFFSET
]
!=
base
||
hwif
->
io_ports
[
IDE_CONTROL_OFFSET
]
!=
(
ctl
|
2
))
{
memset
(
&
hwif
->
hw
,
0
,
sizeof
(
hwif
->
hw
));
hw_regs_t
hw
;
memset
(
&
hw
,
0
,
sizeof
(
hw
));
#ifndef CONFIG_IDE_ARCH_OBSOLETE_INIT
ide_std_init_ports
(
&
hwif
->
hw
,
base
,
(
ctl
|
2
));
hwif
->
hw
.
io_ports
[
IDE_IRQ_OFFSET
]
=
0
;
ide_std_init_ports
(
&
hw
,
base
,
ctl
|
2
);
#else
ide_init_hwif_ports
(
&
hw
if
->
hw
,
base
,
(
ctl
|
2
)
,
NULL
);
ide_init_hwif_ports
(
&
hw
,
base
,
ctl
|
2
,
NULL
);
#endif
memcpy
(
hwif
->
io_ports
,
hw
if
->
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
memcpy
(
hwif
->
io_ports
,
hw
.
io_ports
,
sizeof
(
hwif
->
io_ports
));
hwif
->
noprobe
=
!
hwif
->
io_ports
[
IDE_DATA_OFFSET
];
}
hwif
->
chipset
=
d
->
chipset
?
d
->
chipset
:
ide_pci
;
...
...
include/linux/ide.h
浏览文件 @
9239b333
...
...
@@ -659,7 +659,6 @@ typedef struct hwif_s {
unsigned
long
sata_scr
[
SATA_NR_PORTS
];
unsigned
long
sata_misc
[
SATA_NR_PORTS
];
hw_regs_t
hw
;
/* Hardware info */
ide_drive_t
drives
[
MAX_DRIVES
];
/* drive info */
u8
major
;
/* our major number */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录