Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
b4496b13
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,发现更多精彩内容 >>
提交
b4496b13
编写于
5月 14, 2009
作者:
P
Paul Brook
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PL080 qdev conversion
Signed-off-by:
N
Paul Brook
<
paul@codesourcery.com
>
上级
82634c2d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
12 deletion
+28
-12
hw/pl080.c
hw/pl080.c
+26
-10
hw/realview.c
hw/realview.c
+1
-1
hw/versatilepb.c
hw/versatilepb.c
+1
-1
未找到文件。
hw/pl080.c
浏览文件 @
b4496b13
...
...
@@ -7,8 +7,7 @@
* This code is licenced under the GPL.
*/
#include "hw.h"
#include "primecell.h"
#include "sysbus.h"
#define PL080_MAX_CHANNELS 8
#define PL080_CONF_E 0x1
...
...
@@ -37,6 +36,7 @@ typedef struct {
}
pl080_channel
;
typedef
struct
{
SysBusDevice
busdev
;
uint8_t
tc_int
;
uint8_t
tc_mask
;
uint8_t
err_int
;
...
...
@@ -319,19 +319,35 @@ static CPUWriteMemoryFunc *pl080_writefn[] = {
pl080_write
};
/* The PL080 and PL081 are the same except for the number of channels
they implement (8 and 2 respectively). */
void
*
pl080_init
(
uint32_t
base
,
qemu_irq
irq
,
int
nchannels
)
static
void
pl08x_init
(
SysBusDevice
*
dev
,
int
nchannels
)
{
int
iomemtype
;
pl080_state
*
s
;
pl080_state
*
s
=
FROM_SYSBUS
(
pl080_state
,
dev
)
;
s
=
(
pl080_state
*
)
qemu_mallocz
(
sizeof
(
pl080_state
));
iomemtype
=
cpu_register_io_memory
(
0
,
pl080_readfn
,
pl080_writefn
,
s
);
cpu_register_physical_memory
(
base
,
0x0000
1000
,
iomemtype
);
s
->
irq
=
irq
;
sysbus_init_mmio
(
dev
,
0x
1000
,
iomemtype
);
s
ysbus_init_irq
(
dev
,
&
s
->
irq
)
;
s
->
nchannels
=
nchannels
;
/* ??? Save/restore. */
return
s
;
}
static
void
pl080_init
(
SysBusDevice
*
dev
)
{
pl08x_init
(
dev
,
8
);
}
static
void
pl081_init
(
SysBusDevice
*
dev
)
{
pl08x_init
(
dev
,
2
);
}
/* The PL080 and PL081 are the same except for the number of channels
they implement (8 and 2 respectively). */
static
void
pl080_register_devices
(
void
)
{
sysbus_register_dev
(
"pl080"
,
sizeof
(
pl080_state
),
pl080_init
);
sysbus_register_dev
(
"pl081"
,
sizeof
(
pl080_state
),
pl081_init
);
}
device_init
(
pl080_register_devices
)
hw/realview.c
浏览文件 @
b4496b13
...
...
@@ -89,7 +89,7 @@ static void realview_init(ram_addr_t ram_size,
sysbus_create_simple
(
"pl011"
,
0x1000c000
,
pic
[
15
]);
/* DMA controller is optional, apparently. */
pl080_init
(
0x10030000
,
pic
[
24
],
2
);
sysbus_create_simple
(
"pl081"
,
0x10030000
,
pic
[
24
]
);
sysbus_create_simple
(
"sp804"
,
0x10011000
,
pic
[
4
]);
sysbus_create_simple
(
"sp804"
,
0x10012000
,
pic
[
5
]);
...
...
hw/versatilepb.c
浏览文件 @
b4496b13
...
...
@@ -226,7 +226,7 @@ static void versatile_init(ram_addr_t ram_size,
sysbus_create_simple
(
"pl011"
,
0x101f3000
,
pic
[
14
]);
sysbus_create_simple
(
"pl011"
,
0x10009000
,
sic
[
6
]);
pl080_init
(
0x10130000
,
pic
[
17
],
8
);
sysbus_create_simple
(
"pl080"
,
0x10130000
,
pic
[
17
]
);
sysbus_create_simple
(
"sp804"
,
0x101e2000
,
pic
[
4
]);
sysbus_create_simple
(
"sp804"
,
0x101e3000
,
pic
[
5
]);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录