Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
3d29bcee
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,发现更多精彩内容 >>
提交
3d29bcee
编写于
7月 27, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pl022: QOM cast cleanup
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
ce556e0b
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
8 deletion
+13
-8
hw/ssi/pl022.c
hw/ssi/pl022.c
+13
-8
未找到文件。
hw/ssi/pl022.c
浏览文件 @
3d29bcee
...
@@ -39,8 +39,12 @@ do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__);} while (0)
...
@@ -39,8 +39,12 @@ do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__);} while (0)
#define PL022_INT_RX 0x04
#define PL022_INT_RX 0x04
#define PL022_INT_TX 0x08
#define PL022_INT_TX 0x08
#define TYPE_PL022 "pl022"
#define PL022(obj) OBJECT_CHECK(PL022State, (obj), TYPE_PL022)
typedef
struct
PL022State
{
typedef
struct
PL022State
{
SysBusDevice
busdev
;
SysBusDevice
parent_obj
;
MemoryRegion
iomem
;
MemoryRegion
iomem
;
uint32_t
cr0
;
uint32_t
cr0
;
uint32_t
cr1
;
uint32_t
cr1
;
...
@@ -273,16 +277,17 @@ static const VMStateDescription vmstate_pl022 = {
...
@@ -273,16 +277,17 @@ static const VMStateDescription vmstate_pl022 = {
}
}
};
};
static
int
pl022_init
(
SysBusDevice
*
dev
)
static
int
pl022_init
(
SysBusDevice
*
sbd
)
{
{
PL022State
*
s
=
FROM_SYSBUS
(
PL022State
,
dev
);
DeviceState
*
dev
=
DEVICE
(
sbd
);
PL022State
*
s
=
PL022
(
dev
);
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
),
&
pl022_ops
,
s
,
"pl022"
,
0x1000
);
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
),
&
pl022_ops
,
s
,
"pl022"
,
0x1000
);
sysbus_init_mmio
(
dev
,
&
s
->
iomem
);
sysbus_init_mmio
(
sbd
,
&
s
->
iomem
);
sysbus_init_irq
(
dev
,
&
s
->
irq
);
sysbus_init_irq
(
sbd
,
&
s
->
irq
);
s
->
ssi
=
ssi_create_bus
(
&
dev
->
q
dev
,
"ssi"
);
s
->
ssi
=
ssi_create_bus
(
dev
,
"ssi"
);
pl022_reset
(
s
);
pl022_reset
(
s
);
vmstate_register
(
&
dev
->
q
dev
,
-
1
,
&
vmstate_pl022
,
s
);
vmstate_register
(
dev
,
-
1
,
&
vmstate_pl022
,
s
);
return
0
;
return
0
;
}
}
...
@@ -294,7 +299,7 @@ static void pl022_class_init(ObjectClass *klass, void *data)
...
@@ -294,7 +299,7 @@ static void pl022_class_init(ObjectClass *klass, void *data)
}
}
static
const
TypeInfo
pl022_info
=
{
static
const
TypeInfo
pl022_info
=
{
.
name
=
"pl022"
,
.
name
=
TYPE_PL022
,
.
parent
=
TYPE_SYS_BUS_DEVICE
,
.
parent
=
TYPE_SYS_BUS_DEVICE
,
.
instance_size
=
sizeof
(
PL022State
),
.
instance_size
=
sizeof
(
PL022State
),
.
class_init
=
pl022_class_init
,
.
class_init
=
pl022_class_init
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录