Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
aefbc256
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,发现更多精彩内容 >>
提交
aefbc256
编写于
7月 26, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pl190: Rename pl190_state to PL190State
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
47edc5a4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
21 deletion
+21
-21
hw/intc/pl190.c
hw/intc/pl190.c
+21
-21
未找到文件。
hw/intc/pl190.c
浏览文件 @
aefbc256
...
...
@@ -15,7 +15,7 @@
#define PL190_NUM_PRIO 17
typedef
struct
{
typedef
struct
PL190State
{
SysBusDevice
busdev
;
MemoryRegion
iomem
;
uint32_t
level
;
...
...
@@ -32,18 +32,18 @@ typedef struct {
int
prev_prio
[
PL190_NUM_PRIO
];
qemu_irq
irq
;
qemu_irq
fiq
;
}
pl190_s
tate
;
}
PL190S
tate
;
static
const
unsigned
char
pl190_id
[]
=
{
0x90
,
0x11
,
0x04
,
0x00
,
0x0D
,
0xf0
,
0x05
,
0xb1
};
static
inline
uint32_t
pl190_irq_level
(
pl190_s
tate
*
s
)
static
inline
uint32_t
pl190_irq_level
(
PL190S
tate
*
s
)
{
return
(
s
->
level
|
s
->
soft_level
)
&
s
->
irq_enable
&
~
s
->
fiq_select
;
}
/* Update interrupts. */
static
void
pl190_update
(
pl190_s
tate
*
s
)
static
void
pl190_update
(
PL190S
tate
*
s
)
{
uint32_t
level
=
pl190_irq_level
(
s
);
int
set
;
...
...
@@ -56,7 +56,7 @@ static void pl190_update(pl190_state *s)
static
void
pl190_set_irq
(
void
*
opaque
,
int
irq
,
int
level
)
{
pl190_state
*
s
=
(
pl190_s
tate
*
)
opaque
;
PL190State
*
s
=
(
PL190S
tate
*
)
opaque
;
if
(
level
)
s
->
level
|=
1u
<<
irq
;
...
...
@@ -65,7 +65,7 @@ static void pl190_set_irq(void *opaque, int irq, int level)
pl190_update
(
s
);
}
static
void
pl190_update_vectors
(
pl190_s
tate
*
s
)
static
void
pl190_update_vectors
(
PL190S
tate
*
s
)
{
uint32_t
mask
;
int
i
;
...
...
@@ -88,7 +88,7 @@ static void pl190_update_vectors(pl190_state *s)
static
uint64_t
pl190_read
(
void
*
opaque
,
hwaddr
offset
,
unsigned
size
)
{
pl190_state
*
s
=
(
pl190_s
tate
*
)
opaque
;
PL190State
*
s
=
(
PL190S
tate
*
)
opaque
;
int
i
;
if
(
offset
>=
0xfe0
&&
offset
<
0x1000
)
{
...
...
@@ -152,7 +152,7 @@ static uint64_t pl190_read(void *opaque, hwaddr offset,
static
void
pl190_write
(
void
*
opaque
,
hwaddr
offset
,
uint64_t
val
,
unsigned
size
)
{
pl190_state
*
s
=
(
pl190_s
tate
*
)
opaque
;
PL190State
*
s
=
(
PL190S
tate
*
)
opaque
;
if
(
offset
>=
0x100
&&
offset
<
0x140
)
{
s
->
vect_addr
[(
offset
-
0x100
)
>>
2
]
=
val
;
...
...
@@ -218,7 +218,7 @@ static const MemoryRegionOps pl190_ops = {
static
void
pl190_reset
(
DeviceState
*
d
)
{
pl190_state
*
s
=
DO_UPCAST
(
pl190_s
tate
,
busdev
.
qdev
,
d
);
PL190State
*
s
=
DO_UPCAST
(
PL190S
tate
,
busdev
.
qdev
,
d
);
int
i
;
for
(
i
=
0
;
i
<
16
;
i
++
)
...
...
@@ -234,7 +234,7 @@ static void pl190_reset(DeviceState *d)
static
int
pl190_init
(
SysBusDevice
*
dev
)
{
pl190_state
*
s
=
FROM_SYSBUS
(
pl190_s
tate
,
dev
);
PL190State
*
s
=
FROM_SYSBUS
(
PL190S
tate
,
dev
);
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
),
&
pl190_ops
,
s
,
"pl190"
,
0x1000
);
sysbus_init_mmio
(
dev
,
&
s
->
iomem
);
...
...
@@ -249,16 +249,16 @@ static const VMStateDescription vmstate_pl190 = {
.
version_id
=
1
,
.
minimum_version_id
=
1
,
.
fields
=
(
VMStateField
[])
{
VMSTATE_UINT32
(
level
,
pl190_s
tate
),
VMSTATE_UINT32
(
soft_level
,
pl190_s
tate
),
VMSTATE_UINT32
(
irq_enable
,
pl190_s
tate
),
VMSTATE_UINT32
(
fiq_select
,
pl190_s
tate
),
VMSTATE_UINT8_ARRAY
(
vect_control
,
pl190_s
tate
,
16
),
VMSTATE_UINT32_ARRAY
(
vect_addr
,
pl190_s
tate
,
PL190_NUM_PRIO
),
VMSTATE_UINT32_ARRAY
(
prio_mask
,
pl190_s
tate
,
PL190_NUM_PRIO
+
1
),
VMSTATE_INT32
(
protected
,
pl190_s
tate
),
VMSTATE_INT32
(
priority
,
pl190_s
tate
),
VMSTATE_INT32_ARRAY
(
prev_prio
,
pl190_s
tate
,
PL190_NUM_PRIO
),
VMSTATE_UINT32
(
level
,
PL190S
tate
),
VMSTATE_UINT32
(
soft_level
,
PL190S
tate
),
VMSTATE_UINT32
(
irq_enable
,
PL190S
tate
),
VMSTATE_UINT32
(
fiq_select
,
PL190S
tate
),
VMSTATE_UINT8_ARRAY
(
vect_control
,
PL190S
tate
,
16
),
VMSTATE_UINT32_ARRAY
(
vect_addr
,
PL190S
tate
,
PL190_NUM_PRIO
),
VMSTATE_UINT32_ARRAY
(
prio_mask
,
PL190S
tate
,
PL190_NUM_PRIO
+
1
),
VMSTATE_INT32
(
protected
,
PL190S
tate
),
VMSTATE_INT32
(
priority
,
PL190S
tate
),
VMSTATE_INT32_ARRAY
(
prev_prio
,
PL190S
tate
,
PL190_NUM_PRIO
),
VMSTATE_END_OF_LIST
()
}
};
...
...
@@ -277,7 +277,7 @@ static void pl190_class_init(ObjectClass *klass, void *data)
static
const
TypeInfo
pl190_info
=
{
.
name
=
"pl190"
,
.
parent
=
TYPE_SYS_BUS_DEVICE
,
.
instance_size
=
sizeof
(
pl190_s
tate
),
.
instance_size
=
sizeof
(
PL190S
tate
),
.
class_init
=
pl190_class_init
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录