Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
a63bdb31
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看板
提交
a63bdb31
编写于
5月 14, 2009
作者:
P
Paul Brook
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PL031 qdev conversion
Signed-off-by:
N
Paul Brook
<
paul@codesourcery.com
>
上级
a5580466
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
14 deletion
+16
-14
hw/integratorcp.c
hw/integratorcp.c
+1
-1
hw/pl031.c
hw/pl031.c
+13
-8
hw/primecell.h
hw/primecell.h
+0
-3
hw/realview.c
hw/realview.c
+1
-1
hw/versatilepb.c
hw/versatilepb.c
+1
-1
未找到文件。
hw/integratorcp.c
浏览文件 @
a63bdb31
...
...
@@ -481,7 +481,7 @@ static void integratorcp_init(ram_addr_t ram_size,
cpu_pic
[
ARM_PIC_CPU_FIQ
]);
icp_pic_init
(
0xca000000
,
pic
[
26
],
NULL
);
icp_pit_init
(
0x13000000
,
pic
,
5
);
pl031_init
(
0x15000000
,
pic
[
8
]);
sysbus_create_simple
(
"pl031"
,
0x15000000
,
pic
[
8
]);
sysbus_create_simple
(
"pl011"
,
0x16000000
,
pic
[
1
]);
sysbus_create_simple
(
"pl011"
,
0x17000000
,
pic
[
2
]);
icp_control_init
(
0xcb000000
);
...
...
hw/pl031.c
浏览文件 @
a63bdb31
...
...
@@ -9,8 +9,7 @@
*
*/
#include "hw.h"
#include "primecell.h"
#include "sysbus.h"
#include "qemu-timer.h"
//#define DEBUG_PL031
...
...
@@ -32,6 +31,7 @@ do { printf("pl031: " fmt , ## __VA_ARGS__); } while (0)
#define RTC_ICR 0x1c
/* Interrupt clear register */
typedef
struct
{
SysBusDevice
busdev
;
QEMUTimer
*
timer
;
qemu_irq
irq
;
...
...
@@ -183,25 +183,30 @@ static CPUReadMemoryFunc * pl031_readfn[] = {
pl031_read
};
void
pl031_init
(
uint32_t
base
,
qemu_irq
irq
)
static
void
pl031_init
(
SysBusDevice
*
dev
)
{
int
iomemtype
;
pl031_state
*
s
;
pl031_state
*
s
=
FROM_SYSBUS
(
pl031_state
,
dev
)
;
struct
tm
tm
;
s
=
qemu_mallocz
(
sizeof
(
pl031_state
));
iomemtype
=
cpu_register_io_memory
(
0
,
pl031_readfn
,
pl031_writefn
,
s
);
if
(
iomemtype
==
-
1
)
{
hw_error
(
"pl031_init: Can't register I/O memory
\n
"
);
}
cpu_register_physical_memory
(
base
,
0x0000
1000
,
iomemtype
);
sysbus_init_mmio
(
dev
,
0x
1000
,
iomemtype
);
s
->
irq
=
irq
;
s
ysbus_init_irq
(
dev
,
&
s
->
irq
)
;
/* ??? We assume vm_clock is zero at this point. */
qemu_get_timedate
(
&
tm
,
0
);
s
->
tick_offset
=
mktimegm
(
&
tm
);
s
->
timer
=
qemu_new_timer
(
vm_clock
,
pl031_interrupt
,
s
);
}
static
void
pl031_register_devices
(
void
)
{
sysbus_register_dev
(
"pl031"
,
sizeof
(
pl031_state
),
pl031_init
);
}
device_init
(
pl031_register_devices
)
hw/primecell.h
浏览文件 @
a63bdb31
...
...
@@ -5,9 +5,6 @@
/* Also includes some devices that are currently only used by the
ARM boards. */
/* pl031.c */
void
pl031_init
(
uint32_t
base
,
qemu_irq
irq
);
/* pl022.c */
typedef
int
(
*
ssi_xfer_cb
)(
void
*
,
int
);
void
pl022_init
(
uint32_t
base
,
qemu_irq
irq
,
ssi_xfer_cb
xfer_cb
,
...
...
hw/realview.c
浏览文件 @
a63bdb31
...
...
@@ -104,7 +104,7 @@ static void realview_init(ram_addr_t ram_size,
}
pl181_init
(
0x10005000
,
drives_table
[
index
].
bdrv
,
pic
[
17
],
pic
[
18
]);
pl031_init
(
0x10017000
,
pic
[
10
]);
sysbus_create_simple
(
"pl031"
,
0x10017000
,
pic
[
10
]);
pci_bus
=
pci_vpb_init
(
pic
,
48
,
1
);
if
(
usb_enabled
)
{
...
...
hw/versatilepb.c
浏览文件 @
a63bdb31
...
...
@@ -237,7 +237,7 @@ static void versatile_init(ram_addr_t ram_size,
#endif
/* Add PL031 Real Time Clock. */
pl031_init
(
0x101e8000
,
pic
[
10
]);
sysbus_create_simple
(
"pl031"
,
0x101e8000
,
pic
[
10
]);
/* Memory map for Versatile/PB: */
/* 0x10000000 System registers. */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录