Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
1d998d93
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,发现更多精彩内容 >>
提交
1d998d93
编写于
7月 27, 2013
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pl181: Rename pl181_state to PL181State
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
7a239e46
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
28 addition
and
28 deletion
+28
-28
hw/sd/pl181.c
hw/sd/pl181.c
+28
-28
未找到文件。
hw/sd/pl181.c
浏览文件 @
1d998d93
...
...
@@ -22,7 +22,7 @@ do { printf("pl181: " fmt , ## __VA_ARGS__); } while (0)
#define PL181_FIFO_LEN 16
typedef
struct
{
typedef
struct
PL181State
{
SysBusDevice
busdev
;
MemoryRegion
iomem
;
SDState
*
card
;
...
...
@@ -50,29 +50,29 @@ typedef struct {
qemu_irq
irq
[
2
];
/* GPIO outputs for 'card is readonly' and 'card inserted' */
qemu_irq
cardstatus
[
2
];
}
pl181_s
tate
;
}
PL181S
tate
;
static
const
VMStateDescription
vmstate_pl181
=
{
.
name
=
"pl181"
,
.
version_id
=
1
,
.
minimum_version_id
=
1
,
.
fields
=
(
VMStateField
[])
{
VMSTATE_UINT32
(
clock
,
pl181_s
tate
),
VMSTATE_UINT32
(
power
,
pl181_s
tate
),
VMSTATE_UINT32
(
cmdarg
,
pl181_s
tate
),
VMSTATE_UINT32
(
cmd
,
pl181_s
tate
),
VMSTATE_UINT32
(
datatimer
,
pl181_s
tate
),
VMSTATE_UINT32
(
datalength
,
pl181_s
tate
),
VMSTATE_UINT32
(
respcmd
,
pl181_s
tate
),
VMSTATE_UINT32_ARRAY
(
response
,
pl181_s
tate
,
4
),
VMSTATE_UINT32
(
datactrl
,
pl181_s
tate
),
VMSTATE_UINT32
(
datacnt
,
pl181_s
tate
),
VMSTATE_UINT32
(
status
,
pl181_s
tate
),
VMSTATE_UINT32_ARRAY
(
mask
,
pl181_s
tate
,
2
),
VMSTATE_INT32
(
fifo_pos
,
pl181_s
tate
),
VMSTATE_INT32
(
fifo_len
,
pl181_s
tate
),
VMSTATE_INT32
(
linux_hack
,
pl181_s
tate
),
VMSTATE_UINT32_ARRAY
(
fifo
,
pl181_s
tate
,
PL181_FIFO_LEN
),
VMSTATE_UINT32
(
clock
,
PL181S
tate
),
VMSTATE_UINT32
(
power
,
PL181S
tate
),
VMSTATE_UINT32
(
cmdarg
,
PL181S
tate
),
VMSTATE_UINT32
(
cmd
,
PL181S
tate
),
VMSTATE_UINT32
(
datatimer
,
PL181S
tate
),
VMSTATE_UINT32
(
datalength
,
PL181S
tate
),
VMSTATE_UINT32
(
respcmd
,
PL181S
tate
),
VMSTATE_UINT32_ARRAY
(
response
,
PL181S
tate
,
4
),
VMSTATE_UINT32
(
datactrl
,
PL181S
tate
),
VMSTATE_UINT32
(
datacnt
,
PL181S
tate
),
VMSTATE_UINT32
(
status
,
PL181S
tate
),
VMSTATE_UINT32_ARRAY
(
mask
,
PL181S
tate
,
2
),
VMSTATE_INT32
(
fifo_pos
,
PL181S
tate
),
VMSTATE_INT32
(
fifo_len
,
PL181S
tate
),
VMSTATE_INT32
(
linux_hack
,
PL181S
tate
),
VMSTATE_UINT32_ARRAY
(
fifo
,
PL181S
tate
,
PL181_FIFO_LEN
),
VMSTATE_END_OF_LIST
()
}
};
...
...
@@ -125,7 +125,7 @@ static const VMStateDescription vmstate_pl181 = {
static
const
unsigned
char
pl181_id
[]
=
{
0x81
,
0x11
,
0x04
,
0x00
,
0x0d
,
0xf0
,
0x05
,
0xb1
};
static
void
pl181_update
(
pl181_s
tate
*
s
)
static
void
pl181_update
(
PL181S
tate
*
s
)
{
int
i
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
...
...
@@ -133,7 +133,7 @@ static void pl181_update(pl181_state *s)
}
}
static
void
pl181_fifo_push
(
pl181_s
tate
*
s
,
uint32_t
value
)
static
void
pl181_fifo_push
(
PL181S
tate
*
s
,
uint32_t
value
)
{
int
n
;
...
...
@@ -147,7 +147,7 @@ static void pl181_fifo_push(pl181_state *s, uint32_t value)
DPRINTF
(
"FIFO push %08x
\n
"
,
(
int
)
value
);
}
static
uint32_t
pl181_fifo_pop
(
pl181_s
tate
*
s
)
static
uint32_t
pl181_fifo_pop
(
PL181S
tate
*
s
)
{
uint32_t
value
;
...
...
@@ -162,7 +162,7 @@ static uint32_t pl181_fifo_pop(pl181_state *s)
return
value
;
}
static
void
pl181_send_command
(
pl181_s
tate
*
s
)
static
void
pl181_send_command
(
PL181S
tate
*
s
)
{
SDRequest
request
;
uint8_t
response
[
16
];
...
...
@@ -207,7 +207,7 @@ error:
the FIFO holding 32-bit words and the card taking data in single byte
chunks. FIFO bytes are transferred in little-endian order. */
static
void
pl181_fifo_run
(
pl181_s
tate
*
s
)
static
void
pl181_fifo_run
(
PL181S
tate
*
s
)
{
uint32_t
bits
;
uint32_t
value
=
0
;
...
...
@@ -288,7 +288,7 @@ static void pl181_fifo_run(pl181_state *s)
static
uint64_t
pl181_read
(
void
*
opaque
,
hwaddr
offset
,
unsigned
size
)
{
pl181_state
*
s
=
(
pl181_s
tate
*
)
opaque
;
PL181State
*
s
=
(
PL181S
tate
*
)
opaque
;
uint32_t
tmp
;
if
(
offset
>=
0xfe0
&&
offset
<
0x1000
)
{
...
...
@@ -372,7 +372,7 @@ static uint64_t pl181_read(void *opaque, hwaddr offset,
static
void
pl181_write
(
void
*
opaque
,
hwaddr
offset
,
uint64_t
value
,
unsigned
size
)
{
pl181_state
*
s
=
(
pl181_s
tate
*
)
opaque
;
PL181State
*
s
=
(
PL181S
tate
*
)
opaque
;
switch
(
offset
)
{
case
0x00
:
/* Power */
...
...
@@ -449,7 +449,7 @@ static const MemoryRegionOps pl181_ops = {
static
void
pl181_reset
(
DeviceState
*
d
)
{
pl181_state
*
s
=
DO_UPCAST
(
pl181_s
tate
,
busdev
.
qdev
,
d
);
PL181State
*
s
=
DO_UPCAST
(
PL181S
tate
,
busdev
.
qdev
,
d
);
s
->
power
=
0
;
s
->
cmdarg
=
0
;
...
...
@@ -476,7 +476,7 @@ static void pl181_reset(DeviceState *d)
static
int
pl181_init
(
SysBusDevice
*
dev
)
{
pl181_state
*
s
=
FROM_SYSBUS
(
pl181_s
tate
,
dev
);
PL181State
*
s
=
FROM_SYSBUS
(
PL181S
tate
,
dev
);
DriveInfo
*
dinfo
;
memory_region_init_io
(
&
s
->
iomem
,
OBJECT
(
s
),
&
pl181_ops
,
s
,
"pl181"
,
0x1000
);
...
...
@@ -503,7 +503,7 @@ static void pl181_class_init(ObjectClass *klass, void *data)
static
const
TypeInfo
pl181_info
=
{
.
name
=
"pl181"
,
.
parent
=
TYPE_SYS_BUS_DEVICE
,
.
instance_size
=
sizeof
(
pl181_s
tate
),
.
instance_size
=
sizeof
(
PL181S
tate
),
.
class_init
=
pl181_class_init
,
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录