Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
e5944641
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e5944641
编写于
8月 24, 2009
作者:
J
Juan Quintela
提交者:
malc
8月 24, 2009
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
es1370: Remove unused indirection of PCIES1370State and ES1370State
Signed-off-by:
N
Juan Quintela
<
quintela@redhat.com
>
上级
2a1704a7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
21 deletion
+10
-21
hw/es1370.c
hw/es1370.c
+10
-21
未找到文件。
hw/es1370.c
浏览文件 @
e5944641
...
@@ -266,8 +266,7 @@ struct chan {
...
@@ -266,8 +266,7 @@ struct chan {
};
};
typedef
struct
ES1370State
{
typedef
struct
ES1370State
{
PCIDevice
*
pci_dev
;
PCIDevice
dev
;
QEMUSoundCard
card
;
QEMUSoundCard
card
;
struct
chan
chan
[
NB_CHANNELS
];
struct
chan
chan
[
NB_CHANNELS
];
SWVoiceOut
*
dac_voice
[
2
];
SWVoiceOut
*
dac_voice
[
2
];
...
@@ -280,11 +279,6 @@ typedef struct ES1370State {
...
@@ -280,11 +279,6 @@ typedef struct ES1370State {
uint32_t
sctl
;
uint32_t
sctl
;
}
ES1370State
;
}
ES1370State
;
typedef
struct
PCIES1370State
{
PCIDevice
dev
;
ES1370State
es1370
;
}
PCIES1370State
;
struct
chan_bits
{
struct
chan_bits
{
uint32_t
ctl_en
;
uint32_t
ctl_en
;
uint32_t
stat_int
;
uint32_t
stat_int
;
...
@@ -327,7 +321,7 @@ static void es1370_update_status (ES1370State *s, uint32_t new_status)
...
@@ -327,7 +321,7 @@ static void es1370_update_status (ES1370State *s, uint32_t new_status)
else
{
else
{
s
->
status
=
new_status
&
~
STAT_INTR
;
s
->
status
=
new_status
&
~
STAT_INTR
;
}
}
qemu_set_irq
(
s
->
pci_dev
->
irq
[
0
],
!!
level
);
qemu_set_irq
(
s
->
dev
.
irq
[
0
],
!!
level
);
}
}
static
void
es1370_reset
(
ES1370State
*
s
)
static
void
es1370_reset
(
ES1370State
*
s
)
...
@@ -353,7 +347,7 @@ static void es1370_reset (ES1370State *s)
...
@@ -353,7 +347,7 @@ static void es1370_reset (ES1370State *s)
s
->
dac_voice
[
i
]
=
NULL
;
s
->
dac_voice
[
i
]
=
NULL
;
}
}
}
}
qemu_irq_lower
(
s
->
pci_dev
->
irq
[
0
]);
qemu_irq_lower
(
s
->
dev
.
irq
[
0
]);
}
}
static
void
es1370_maybe_lower_irq
(
ES1370State
*
s
,
uint32_t
sctl
)
static
void
es1370_maybe_lower_irq
(
ES1370State
*
s
,
uint32_t
sctl
)
...
@@ -915,8 +909,7 @@ static void es1370_adc_callback (void *opaque, int avail)
...
@@ -915,8 +909,7 @@ static void es1370_adc_callback (void *opaque, int avail)
static
void
es1370_map
(
PCIDevice
*
pci_dev
,
int
region_num
,
static
void
es1370_map
(
PCIDevice
*
pci_dev
,
int
region_num
,
uint32_t
addr
,
uint32_t
size
,
int
type
)
uint32_t
addr
,
uint32_t
size
,
int
type
)
{
{
PCIES1370State
*
d
=
(
PCIES1370State
*
)
pci_dev
;
ES1370State
*
s
=
DO_UPCAST
(
ES1370State
,
dev
,
pci_dev
);
ES1370State
*
s
=
&
d
->
es1370
;
(
void
)
region_num
;
(
void
)
region_num
;
(
void
)
size
;
(
void
)
size
;
...
@@ -936,7 +929,7 @@ static void es1370_save (QEMUFile *f, void *opaque)
...
@@ -936,7 +929,7 @@ static void es1370_save (QEMUFile *f, void *opaque)
ES1370State
*
s
=
opaque
;
ES1370State
*
s
=
opaque
;
size_t
i
;
size_t
i
;
pci_device_save
(
s
->
pci_
dev
,
f
);
pci_device_save
(
&
s
->
dev
,
f
);
for
(
i
=
0
;
i
<
NB_CHANNELS
;
++
i
)
{
for
(
i
=
0
;
i
<
NB_CHANNELS
;
++
i
)
{
struct
chan
*
d
=
&
s
->
chan
[
i
];
struct
chan
*
d
=
&
s
->
chan
[
i
];
qemu_put_be32s
(
f
,
&
d
->
shift
);
qemu_put_be32s
(
f
,
&
d
->
shift
);
...
@@ -962,7 +955,7 @@ static int es1370_load (QEMUFile *f, void *opaque, int version_id)
...
@@ -962,7 +955,7 @@ static int es1370_load (QEMUFile *f, void *opaque, int version_id)
if
(
version_id
!=
2
)
if
(
version_id
!=
2
)
return
-
EINVAL
;
return
-
EINVAL
;
ret
=
pci_device_load
(
s
->
pci_
dev
,
f
);
ret
=
pci_device_load
(
&
s
->
dev
,
f
);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
...
@@ -1007,9 +1000,8 @@ static void es1370_on_reset (void *opaque)
...
@@ -1007,9 +1000,8 @@ static void es1370_on_reset (void *opaque)
static
void
es1370_initfn
(
PCIDevice
*
dev
)
static
void
es1370_initfn
(
PCIDevice
*
dev
)
{
{
PCIES1370State
*
d
=
DO_UPCAST
(
PCIES1370State
,
dev
,
dev
);
ES1370State
*
s
=
DO_UPCAST
(
ES1370State
,
dev
,
dev
);
ES1370State
*
s
=
&
d
->
es1370
;
uint8_t
*
c
=
s
->
dev
.
config
;
uint8_t
*
c
=
d
->
dev
.
config
;
pci_config_set_vendor_id
(
c
,
PCI_VENDOR_ID_ENSONIQ
);
pci_config_set_vendor_id
(
c
,
PCI_VENDOR_ID_ENSONIQ
);
pci_config_set_device_id
(
c
,
PCI_DEVICE_ID_ENSONIQ_ES1370
);
pci_config_set_device_id
(
c
,
PCI_DEVICE_ID_ENSONIQ_ES1370
);
...
@@ -1035,10 +1027,7 @@ static void es1370_initfn(PCIDevice *dev)
...
@@ -1035,10 +1027,7 @@ static void es1370_initfn(PCIDevice *dev)
c
[
0x3e
]
=
0x0c
;
c
[
0x3e
]
=
0x0c
;
c
[
0x3f
]
=
0x80
;
c
[
0x3f
]
=
0x80
;
s
=
&
d
->
es1370
;
pci_register_bar
(
&
s
->
dev
,
0
,
256
,
PCI_ADDRESS_SPACE_IO
,
es1370_map
);
s
->
pci_dev
=
&
d
->
dev
;
pci_register_bar
(
&
d
->
dev
,
0
,
256
,
PCI_ADDRESS_SPACE_IO
,
es1370_map
);
register_savevm
(
"es1370"
,
0
,
2
,
es1370_save
,
es1370_load
,
s
);
register_savevm
(
"es1370"
,
0
,
2
,
es1370_save
,
es1370_load
,
s
);
qemu_register_reset
(
es1370_on_reset
,
s
);
qemu_register_reset
(
es1370_on_reset
,
s
);
...
@@ -1055,7 +1044,7 @@ int es1370_init (PCIBus *bus)
...
@@ -1055,7 +1044,7 @@ int es1370_init (PCIBus *bus)
static
PCIDeviceInfo
es1370_info
=
{
static
PCIDeviceInfo
es1370_info
=
{
.
qdev
.
name
=
"ES1370"
,
.
qdev
.
name
=
"ES1370"
,
.
qdev
.
desc
=
"ENSONIQ AudioPCI ES1370"
,
.
qdev
.
desc
=
"ENSONIQ AudioPCI ES1370"
,
.
qdev
.
size
=
sizeof
(
PCI
ES1370State
),
.
qdev
.
size
=
sizeof
(
ES1370State
),
.
init
=
es1370_initfn
,
.
init
=
es1370_initfn
,
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录