Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
ce556e0b
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,发现更多精彩内容 >>
提交
ce556e0b
编写于
7月 27, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pl022: Rename pl022_state to PL022State
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
88c034d5
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
36 addition
and
36 deletion
+36
-36
hw/ssi/pl022.c
hw/ssi/pl022.c
+36
-36
未找到文件。
hw/ssi/pl022.c
浏览文件 @
ce556e0b
...
...
@@ -39,7 +39,7 @@ do { fprintf(stderr, "pl022: error: " fmt , ## __VA_ARGS__);} while (0)
#define PL022_INT_RX 0x04
#define PL022_INT_TX 0x08
typedef
struct
{
typedef
struct
PL022State
{
SysBusDevice
busdev
;
MemoryRegion
iomem
;
uint32_t
cr0
;
...
...
@@ -58,12 +58,12 @@ typedef struct {
uint16_t
rx_fifo
[
8
];
qemu_irq
irq
;
SSIBus
*
ssi
;
}
pl022_s
tate
;
}
PL022S
tate
;
static
const
unsigned
char
pl022_id
[
8
]
=
{
0x22
,
0x10
,
0x04
,
0x00
,
0x0d
,
0xf0
,
0x05
,
0xb1
};
static
void
pl022_update
(
pl022_s
tate
*
s
)
static
void
pl022_update
(
PL022S
tate
*
s
)
{
s
->
sr
=
0
;
if
(
s
->
tx_fifo_len
==
0
)
...
...
@@ -85,7 +85,7 @@ static void pl022_update(pl022_state *s)
qemu_set_irq
(
s
->
irq
,
(
s
->
is
&
s
->
im
)
!=
0
);
}
static
void
pl022_xfer
(
pl022_s
tate
*
s
)
static
void
pl022_xfer
(
PL022S
tate
*
s
)
{
int
i
;
int
o
;
...
...
@@ -133,7 +133,7 @@ static void pl022_xfer(pl022_state *s)
static
uint64_t
pl022_read
(
void
*
opaque
,
hwaddr
offset
,
unsigned
size
)
{
pl022_state
*
s
=
(
pl022_s
tate
*
)
opaque
;
PL022State
*
s
=
(
PL022S
tate
*
)
opaque
;
int
val
;
if
(
offset
>=
0xfe0
&&
offset
<
0x1000
)
{
...
...
@@ -177,7 +177,7 @@ static uint64_t pl022_read(void *opaque, hwaddr offset,
static
void
pl022_write
(
void
*
opaque
,
hwaddr
offset
,
uint64_t
value
,
unsigned
size
)
{
pl022_state
*
s
=
(
pl022_s
tate
*
)
opaque
;
PL022State
*
s
=
(
PL022S
tate
*
)
opaque
;
switch
(
offset
)
{
case
0x00
:
/* CR0 */
...
...
@@ -221,7 +221,7 @@ static void pl022_write(void *opaque, hwaddr offset,
}
}
static
void
pl022_reset
(
pl022_s
tate
*
s
)
static
void
pl022_reset
(
PL022S
tate
*
s
)
{
s
->
rx_fifo_len
=
0
;
s
->
tx_fifo_len
=
0
;
...
...
@@ -242,40 +242,40 @@ static const VMStateDescription vmstate_pl022 = {
.
minimum_version_id
=
1
,
.
minimum_version_id_old
=
1
,
.
fields
=
(
VMStateField
[])
{
VMSTATE_UINT32
(
cr0
,
pl022_s
tate
),
VMSTATE_UINT32
(
cr1
,
pl022_s
tate
),
VMSTATE_UINT32
(
bitmask
,
pl022_s
tate
),
VMSTATE_UINT32
(
sr
,
pl022_s
tate
),
VMSTATE_UINT32
(
cpsr
,
pl022_s
tate
),
VMSTATE_UINT32
(
is
,
pl022_s
tate
),
VMSTATE_UINT32
(
im
,
pl022_s
tate
),
VMSTATE_INT32
(
tx_fifo_head
,
pl022_s
tate
),
VMSTATE_INT32
(
rx_fifo_head
,
pl022_s
tate
),
VMSTATE_INT32
(
tx_fifo_len
,
pl022_s
tate
),
VMSTATE_INT32
(
rx_fifo_len
,
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
0
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
0
],
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
1
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
1
],
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
2
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
2
],
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
3
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
3
],
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
4
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
4
],
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
5
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
5
],
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
6
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
6
],
pl022_s
tate
),
VMSTATE_UINT16
(
tx_fifo
[
7
],
pl022_s
tate
),
VMSTATE_UINT16
(
rx_fifo
[
7
],
pl022_s
tate
),
VMSTATE_UINT32
(
cr0
,
PL022S
tate
),
VMSTATE_UINT32
(
cr1
,
PL022S
tate
),
VMSTATE_UINT32
(
bitmask
,
PL022S
tate
),
VMSTATE_UINT32
(
sr
,
PL022S
tate
),
VMSTATE_UINT32
(
cpsr
,
PL022S
tate
),
VMSTATE_UINT32
(
is
,
PL022S
tate
),
VMSTATE_UINT32
(
im
,
PL022S
tate
),
VMSTATE_INT32
(
tx_fifo_head
,
PL022S
tate
),
VMSTATE_INT32
(
rx_fifo_head
,
PL022S
tate
),
VMSTATE_INT32
(
tx_fifo_len
,
PL022S
tate
),
VMSTATE_INT32
(
rx_fifo_len
,
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
0
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
0
],
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
1
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
1
],
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
2
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
2
],
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
3
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
3
],
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
4
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
4
],
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
5
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
5
],
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
6
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
6
],
PL022S
tate
),
VMSTATE_UINT16
(
tx_fifo
[
7
],
PL022S
tate
),
VMSTATE_UINT16
(
rx_fifo
[
7
],
PL022S
tate
),
VMSTATE_END_OF_LIST
()
}
};
static
int
pl022_init
(
SysBusDevice
*
dev
)
{
pl022_state
*
s
=
FROM_SYSBUS
(
pl022_s
tate
,
dev
);
PL022State
*
s
=
FROM_SYSBUS
(
PL022S
tate
,
dev
);
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
),
&
pl022_ops
,
s
,
"pl022"
,
0x1000
);
sysbus_init_mmio
(
dev
,
&
s
->
iomem
);
...
...
@@ -296,7 +296,7 @@ static void pl022_class_init(ObjectClass *klass, void *data)
static
const
TypeInfo
pl022_info
=
{
.
name
=
"pl022"
,
.
parent
=
TYPE_SYS_BUS_DEVICE
,
.
instance_size
=
sizeof
(
pl022_s
tate
),
.
instance_size
=
sizeof
(
PL022S
tate
),
.
class_init
=
pl022_class_init
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录