Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
5da96624
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看板
提交
5da96624
编写于
5月 17, 2012
作者:
A
Alexander Graf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PPC: e500: dt: create /soc8544 node dynamically
Signed-off-by:
N
Alexander Graf
<
agraf@suse.de
>
上级
f5231aaf
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
9 deletion
+17
-9
hw/ppce500_mpc8544ds.c
hw/ppce500_mpc8544ds.c
+17
-0
pc-bios/mpc8544ds.dts
pc-bios/mpc8544ds.dts
+0
-9
未找到文件。
hw/ppce500_mpc8544ds.c
浏览文件 @
5da96624
...
@@ -43,6 +43,8 @@
...
@@ -43,6 +43,8 @@
#define RAM_SIZES_ALIGN (64UL << 20)
#define RAM_SIZES_ALIGN (64UL << 20)
#define MPC8544_CCSRBAR_BASE 0xE0000000
#define MPC8544_CCSRBAR_BASE 0xE0000000
#define MPC8544_CCSRBAR_REGSIZE 0x00001000
#define MPC8544_CCSRBAR_SIZE 0x00100000
#define MPC8544_MPIC_REGS_BASE (MPC8544_CCSRBAR_BASE + 0x40000)
#define MPC8544_MPIC_REGS_BASE (MPC8544_CCSRBAR_BASE + 0x40000)
#define MPC8544_SERIAL0_REGS_BASE (MPC8544_CCSRBAR_BASE + 0x4500)
#define MPC8544_SERIAL0_REGS_BASE (MPC8544_CCSRBAR_BASE + 0x4500)
#define MPC8544_SERIAL1_REGS_BASE (MPC8544_CCSRBAR_BASE + 0x4600)
#define MPC8544_SERIAL1_REGS_BASE (MPC8544_CCSRBAR_BASE + 0x4600)
...
@@ -78,6 +80,7 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
...
@@ -78,6 +80,7 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
int
i
;
int
i
;
char
compatible
[]
=
"MPC8544DS
\0
MPC85xxDS"
;
char
compatible
[]
=
"MPC8544DS
\0
MPC85xxDS"
;
char
model
[]
=
"MPC8544DS"
;
char
model
[]
=
"MPC8544DS"
;
char
soc
[
128
];
filename
=
qemu_find_file
(
QEMU_FILE_TYPE_BIOS
,
BINARY_DEVICE_TREE_FILE
);
filename
=
qemu_find_file
(
QEMU_FILE_TYPE_BIOS
,
BINARY_DEVICE_TREE_FILE
);
if
(
!
filename
)
{
if
(
!
filename
)
{
...
@@ -179,6 +182,20 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
...
@@ -179,6 +182,20 @@ static int mpc8544_load_device_tree(CPUPPCState *env,
}
}
}
}
/* XXX These should go into their respective devices' code */
snprintf
(
soc
,
sizeof
(
soc
),
"/soc8544@%x"
,
MPC8544_CCSRBAR_BASE
);
qemu_devtree_add_subnode
(
fdt
,
soc
);
qemu_devtree_setprop_string
(
fdt
,
soc
,
"device_type"
,
"soc"
);
qemu_devtree_setprop_string
(
fdt
,
soc
,
"compatible"
,
"simple-bus"
);
qemu_devtree_setprop_cell
(
fdt
,
soc
,
"#address-cells"
,
1
);
qemu_devtree_setprop_cell
(
fdt
,
soc
,
"#size-cells"
,
1
);
qemu_devtree_setprop_cells
(
fdt
,
soc
,
"ranges"
,
0x0
,
MPC8544_CCSRBAR_BASE
,
MPC8544_CCSRBAR_SIZE
);
qemu_devtree_setprop_cells
(
fdt
,
soc
,
"reg"
,
MPC8544_CCSRBAR_BASE
,
MPC8544_CCSRBAR_REGSIZE
);
/* XXX should contain a reasonable value */
qemu_devtree_setprop_cell
(
fdt
,
soc
,
"bus-frequency"
,
0
);
ret
=
rom_add_blob_fixed
(
BINARY_DEVICE_TREE_FILE
,
fdt
,
fdt_size
,
addr
);
ret
=
rom_add_blob_fixed
(
BINARY_DEVICE_TREE_FILE
,
fdt
,
fdt_size
,
addr
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
goto
out
;
goto
out
;
...
...
pc-bios/mpc8544ds.dts
浏览文件 @
5da96624
...
@@ -18,15 +18,6 @@
...
@@ -18,15 +18,6 @@
};
};
soc8544@e0000000 {
soc8544@e0000000 {
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
compatible = "simple-bus";
ranges = <0x0 0xe0000000 0x100000>;
reg = <0xe0000000 0x1000>; // CCSRBAR 1M
bus-frequency = <0>; // Filled out by uboot.
serial0: serial@4500 {
serial0: serial@4500 {
cell-index = <0>;
cell-index = <0>;
device_type = "serial";
device_type = "serial";
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录