Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OS
U-Boot.Mirror
提交
81a0ac62
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,发现更多精彩内容 >>
提交
81a0ac62
编写于
3月 20, 2008
作者:
W
Wolfgang Denk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
lwmon5 POST: remove unreachable code
plus some coding style cleanup Signed-off-by:
N
Wolfgang Denk
<
wd@denx.de
>
上级
b73a19e1
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
24 addition
and
19 deletion
+24
-19
post/board/lwmon5/watchdog.c
post/board/lwmon5/watchdog.c
+24
-19
未找到文件。
post/board/lwmon5/watchdog.c
浏览文件 @
81a0ac62
...
...
@@ -24,7 +24,8 @@
#include <common.h>
/* This test verifies if the reason of last reset was an abnormal voltage
/*
* This test verifies if the reason of last reset was an abnormal voltage
* condition, than it performs watchdog test, measuing time required to
* trigger watchdog reset.
*/
...
...
@@ -55,7 +56,8 @@ static void watchdog_magic_write(uint value)
int
sysmon1_post_test
(
int
flags
)
{
if
(
gpio_read_in_bit
(
CFG_GPIO_SYSMON_STATUS
))
{
/* 3.1. GPIO62 is low
/*
* 3.1. GPIO62 is low
* Assuming system voltage failure.
*/
post_log
(
"Abnormal voltage detected (GPIO62)
\n
"
);
...
...
@@ -67,11 +69,14 @@ int sysmon1_post_test(int flags)
int
lwmon5_watchdog_post_test
(
int
flags
)
{
ulong
time
;
/* On each reset scratch register 1 should be tested,
* but first test GPIO62:
*/
if
(
!
(
flags
&
POST_MANUAL
)
&&
sysmon1_post_test
(
flags
))
{
/* 3.1. GPIO62 is low
/*
* 3.1. GPIO62 is low
* Assuming system voltage failure.
*/
/* 3.1.1. Set scratch register 1 to 0x0000xxxx */
...
...
@@ -81,12 +86,12 @@ int lwmon5_watchdog_post_test(int flags)
}
if
(
watchdog_magic_read
()
!=
CFG_WATCHDOG_MAGIC
)
{
/* 3.2. Scratch register 1 differs from magic value 0x1248xxxx
/*
* 3.2. Scratch register 1 differs from magic value 0x1248xxxx
* Assuming PowerOn
*/
int
ints
;
ulong
base
;
ulong
time
;
/* 3.2.1. Set magic value to scratch register */
watchdog_magic_write
(
CFG_WATCHDOG_MAGIC
);
...
...
@@ -104,28 +109,28 @@ int lwmon5_watchdog_post_test(int flags)
if
(
ints
)
enable_interrupts
();
/* 3.2.5. Reset didn't happen. - Set 0x0000xxxx
/*
* 3.2.5. Reset didn't happen. - Set 0x0000xxxx
* into scratch register 1
*/
watchdog_magic_write
(
0
);
/* 3.2.6. Mark test as failed. */
post_log
(
"hw watchdog time : %u ms, failed "
,
time
);
return
2
;
}
else
{
/* 3.3. Scratch register matches magic value 0x1248xxxx
}
/*
* 3.3. Scratch register matches magic value 0x1248xxxx
* Assume this is watchdog-initiated reset
*/
ulong
time
;
/* 3.3.1. So, the test succeed, save measured time to syslog. */
time
=
in_be32
((
void
*
)
CFG_WATCHDOG_TIME_ADDR
);
post_log
(
"hw watchdog time : %u ms, passed "
,
time
);
/* 3.3.2. Set scratch register 1 to 0x0000xxxx */
watchdog_magic_write
(
0
);
return
0
;
}
return
-
1
;
}
#endif
/* CONFIG_POST & CFG_POST_WATCHDOG */
#endif
/* CONFIG_POST */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录