Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
1024d7f0
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看板
提交
1024d7f0
编写于
7月 27, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
arm_timer: Rename sp804_state to SP804State
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
3efc10e1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
10 deletion
+10
-10
hw/timer/arm_timer.c
hw/timer/arm_timer.c
+10
-10
未找到文件。
hw/timer/arm_timer.c
浏览文件 @
1024d7f0
...
...
@@ -179,14 +179,14 @@ static arm_timer_state *arm_timer_init(uint32_t freq)
* http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0271d/index.html
*/
typedef
struct
{
typedef
struct
SP804State
{
SysBusDevice
busdev
;
MemoryRegion
iomem
;
arm_timer_state
*
timer
[
2
];
uint32_t
freq0
,
freq1
;
int
level
[
2
];
qemu_irq
irq
;
}
sp804_s
tate
;
}
SP804S
tate
;
static
const
uint8_t
sp804_ids
[]
=
{
/* Timer ID */
...
...
@@ -198,7 +198,7 @@ static const uint8_t sp804_ids[] = {
/* Merge the IRQs from the two component devices. */
static
void
sp804_set_irq
(
void
*
opaque
,
int
irq
,
int
level
)
{
sp804_state
*
s
=
(
sp804_s
tate
*
)
opaque
;
SP804State
*
s
=
(
SP804S
tate
*
)
opaque
;
s
->
level
[
irq
]
=
level
;
qemu_set_irq
(
s
->
irq
,
s
->
level
[
0
]
||
s
->
level
[
1
]);
...
...
@@ -207,7 +207,7 @@ static void sp804_set_irq(void *opaque, int irq, int level)
static
uint64_t
sp804_read
(
void
*
opaque
,
hwaddr
offset
,
unsigned
size
)
{
sp804_state
*
s
=
(
sp804_s
tate
*
)
opaque
;
SP804State
*
s
=
(
SP804S
tate
*
)
opaque
;
if
(
offset
<
0x20
)
{
return
arm_timer_read
(
s
->
timer
[
0
],
offset
);
...
...
@@ -239,7 +239,7 @@ static uint64_t sp804_read(void *opaque, hwaddr offset,
static
void
sp804_write
(
void
*
opaque
,
hwaddr
offset
,
uint64_t
value
,
unsigned
size
)
{
sp804_state
*
s
=
(
sp804_s
tate
*
)
opaque
;
SP804State
*
s
=
(
SP804S
tate
*
)
opaque
;
if
(
offset
<
0x20
)
{
arm_timer_write
(
s
->
timer
[
0
],
offset
,
value
);
...
...
@@ -268,14 +268,14 @@ static const VMStateDescription vmstate_sp804 = {
.
minimum_version_id
=
1
,
.
minimum_version_id_old
=
1
,
.
fields
=
(
VMStateField
[])
{
VMSTATE_INT32_ARRAY
(
level
,
sp804_s
tate
,
2
),
VMSTATE_INT32_ARRAY
(
level
,
SP804S
tate
,
2
),
VMSTATE_END_OF_LIST
()
}
};
static
int
sp804_init
(
SysBusDevice
*
dev
)
{
sp804_state
*
s
=
FROM_SYSBUS
(
sp804_s
tate
,
dev
);
SP804State
*
s
=
FROM_SYSBUS
(
SP804S
tate
,
dev
);
qemu_irq
*
qi
;
qi
=
qemu_allocate_irqs
(
sp804_set_irq
,
s
,
2
);
...
...
@@ -371,8 +371,8 @@ static const TypeInfo icp_pit_info = {
};
static
Property
sp804_properties
[]
=
{
DEFINE_PROP_UINT32
(
"freq0"
,
sp804_s
tate
,
freq0
,
1000000
),
DEFINE_PROP_UINT32
(
"freq1"
,
sp804_s
tate
,
freq1
,
1000000
),
DEFINE_PROP_UINT32
(
"freq0"
,
SP804S
tate
,
freq0
,
1000000
),
DEFINE_PROP_UINT32
(
"freq1"
,
SP804S
tate
,
freq1
,
1000000
),
DEFINE_PROP_END_OF_LIST
(),
};
...
...
@@ -388,7 +388,7 @@ static void sp804_class_init(ObjectClass *klass, void *data)
static
const
TypeInfo
sp804_info
=
{
.
name
=
"sp804"
,
.
parent
=
TYPE_SYS_BUS_DEVICE
,
.
instance_size
=
sizeof
(
sp804_s
tate
),
.
instance_size
=
sizeof
(
SP804S
tate
),
.
class_init
=
sp804_class_init
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录