Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
0809ea2f
U
U-Boot.Mirror
项目概览
OS
/
U-Boot.Mirror
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
U-Boot.Mirror
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0809ea2f
编写于
10月 15, 2008
作者:
H
Heiko Schocher
提交者:
Wolfgang Denk
10月 18, 2008
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
mgcoge: fix Coding Style issues.
Signed-off-by:
N
Heiko Schocher
<
hs@denx.de
>
上级
e43a27c4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
38 addition
and
41 deletion
+38
-41
board/keymile/mgcoge/mgcoge.c
board/keymile/mgcoge/mgcoge.c
+38
-41
未找到文件。
board/keymile/mgcoge/mgcoge.c
浏览文件 @
0809ea2f
/*
* (C) Copyright 2007
* (C) Copyright 2007
- 2008
* Heiko Schocher, DENX Software Engineering, hs@denx.de.
*
* See file CREDITS for list of people who contributed to this
...
...
@@ -243,13 +243,13 @@ static long int try_init (volatile memctl8260_t * memctl, ulong sdmr,
*
sdmr_ptr
=
sdmr
|
PSDMR_OP_NORM
|
PSDMR_RFEN
;
*
base
=
c
;
size
=
get_ram_size
((
long
*
)
base
,
maxsize
);
size
=
get_ram_size
((
long
*
)
base
,
maxsize
);
*
orx_ptr
=
orx
|
~
(
size
-
1
);
return
(
size
);
}
phys_size_t
initdram
(
int
board_type
)
phys_size_t
initdram
(
int
board_type
)
{
volatile
immap_t
*
immap
=
(
immap_t
*
)
CFG_IMMR
;
volatile
memctl8260_t
*
memctl
=
&
immap
->
im_memctl
;
...
...
@@ -273,7 +273,7 @@ phys_size_t initdram(int board_type)
int
checkboard
(
void
)
{
puts
(
"Board: mgcoge
\n
"
);
puts
(
"Board: mgcoge
\n
"
);
return
0
;
}
...
...
@@ -281,7 +281,7 @@ int checkboard(void)
/*
* Early board initalization.
*/
int
board_early_init_r
(
void
)
int
board_early_init_r
(
void
)
{
/* setup the UPIOx */
*
(
char
*
)(
CFG_PIGGY_BASE
+
0x02
)
=
0xc0
;
...
...
@@ -293,68 +293,65 @@ int board_early_init_r(void)
/*
* update "memory" property in the blob
*/
void
ft_blob_update
(
void
*
blob
,
bd_t
*
bd
)
void
ft_blob_update
(
void
*
blob
,
bd_t
*
bd
)
{
int
ret
,
nodeoffset
=
0
;
ulong
memory_data
[
2
]
=
{
0
};
ulong
flash_data
[
8
]
=
{
0
};
memory_data
[
0
]
=
cpu_to_be32
(
bd
->
bi_memstart
);
memory_data
[
1
]
=
cpu_to_be32
(
bd
->
bi_memsize
);
memory_data
[
0
]
=
cpu_to_be32
(
bd
->
bi_memstart
);
memory_data
[
1
]
=
cpu_to_be32
(
bd
->
bi_memsize
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/memory"
);
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"reg"
,
memory_data
,
sizeof
(
memory_data
));
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"reg"
,
memory_data
,
sizeof
(
memory_data
));
if
(
ret
<
0
)
printf
(
"ft_blob_update(): cannot set /memory/reg "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
else
{
printf
(
"ft_blob_update(): cannot set /memory/reg "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
else
{
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /memory node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
printf
(
"ft_blob_update(): cannot find /memory node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
/* update Flash addr, size */
flash_data
[
2
]
=
cpu_to_be32
(
CFG_FLASH_BASE
);
flash_data
[
3
]
=
cpu_to_be32
(
CFG_FLASH_SIZE
);
flash_data
[
4
]
=
cpu_to_be32
(
1
);
flash_data
[
5
]
=
cpu_to_be32
(
0
);
flash_data
[
6
]
=
cpu_to_be32
(
CFG_FLASH_BASE_1
);
flash_data
[
7
]
=
cpu_to_be32
(
CFG_FLASH_SIZE_1
);
flash_data
[
2
]
=
cpu_to_be32
(
CFG_FLASH_BASE
);
flash_data
[
3
]
=
cpu_to_be32
(
CFG_FLASH_SIZE
);
flash_data
[
4
]
=
cpu_to_be32
(
1
);
flash_data
[
5
]
=
cpu_to_be32
(
0
);
flash_data
[
6
]
=
cpu_to_be32
(
CFG_FLASH_BASE_1
);
flash_data
[
7
]
=
cpu_to_be32
(
CFG_FLASH_SIZE_1
);
nodeoffset
=
fdt_path_offset
(
blob
,
"/localbus"
);
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"ranges"
,
flash_data
,
sizeof
(
flash_data
));
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"ranges"
,
flash_data
,
sizeof
(
flash_data
));
if
(
ret
<
0
)
printf
(
"ft_blob_update(): cannot set /localbus/ranges "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
else
{
printf
(
"ft_blob_update(): cannot set /localbus/ranges "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
else
{
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /localbus node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
printf
(
"ft_blob_update(): cannot find /localbus node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
/* MAC Adresse */
nodeoffset
=
fdt_path_offset
(
blob
,
"/soc/cpm/ethernet"
);
if
(
nodeoffset
>=
0
)
{
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"mac-address"
,
bd
->
bi_enetaddr
,
sizeof
(
uchar
)
*
6
);
ret
=
fdt_setprop
(
blob
,
nodeoffset
,
"mac-address"
,
bd
->
bi_enetaddr
,
sizeof
(
uchar
)
*
6
);
if
(
ret
<
0
)
printf
(
"ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
else
{
printf
(
"ft_blob_update(): cannot set /soc/cpm/ethernet/mac-address "
"property err:%s
\n
"
,
fdt_strerror
(
ret
));
}
else
{
/* memory node is required in dts */
printf
(
"ft_blob_update(): cannot find /soc/cpm/ethernet node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
printf
(
"ft_blob_update(): cannot find /soc/cpm/ethernet node "
"err:%s
\n
"
,
fdt_strerror
(
nodeoffset
));
}
}
void
ft_board_setup
(
void
*
blob
,
bd_t
*
bd
)
void
ft_board_setup
(
void
*
blob
,
bd_t
*
bd
)
{
ft_cpu_setup
(
blob
,
bd
);
ft_blob_update
(
blob
,
bd
);
ft_cpu_setup
(
blob
,
bd
);
ft_blob_update
(
blob
,
bd
);
}
#endif
/* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录