summaryrefslogtreecommitdiffstats
path: root/post/board/lwmon5/watchdog.c
diff options
context:
space:
mode:
authorSascha Laue <sascha.laue@liebherr.com>2010-08-19 09:38:56 +0200
committerStefan Roese <sr@denx.de>2010-10-04 11:19:35 +0200
commitf14ae4180a37cf05c6bcfa5d55cc2955e920e1e2 (patch)
treede40c143117aae93ab9d01ee179bed48bd6db4b7 /post/board/lwmon5/watchdog.c
parentd0e6665a24c2c2a3d333db169fcd1261a0903146 (diff)
downloadblackbird-obmc-uboot-f14ae4180a37cf05c6bcfa5d55cc2955e920e1e2.tar.gz
blackbird-obmc-uboot-f14ae4180a37cf05c6bcfa5d55cc2955e920e1e2.zip
ppc4xx: Big lwmon5 board support rework/update
This patch brings the lwmon5 board support up-to-date. Here a summary of the changes: lwmon5 board port related: - GPIO's changed to control the LSB transmitter - Reset USB PHY's upon power-up - Enable CAN upon power-up - USB init error workaround (errata CHIP_6) - EBC: Enable burstmode and modify the timings for the GDC memory - EBC: Speed up NOR flash timings lwmon5 board POST related: - Add FPGA memory test - Add GDC memory test - DSP POST reworked - SYSMON POST: Fix handling of negative temperatures - Add output for sysmon1 POST - HW-watchdog min. time test reworked Additionally some coding-style changes were done. Signed-off-by: Sascha Laue <sascha.laue@liebherr.com> Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'post/board/lwmon5/watchdog.c')
-rw-r--r--post/board/lwmon5/watchdog.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/post/board/lwmon5/watchdog.c b/post/board/lwmon5/watchdog.c
index f181506fe4..4e5ed0dda2 100644
--- a/post/board/lwmon5/watchdog.c
+++ b/post/board/lwmon5/watchdog.c
@@ -57,8 +57,11 @@ int sysmon1_post_test(int flags)
* 3.1. GPIO62 is low
* Assuming system voltage failure.
*/
- post_log("Abnormal voltage detected (GPIO62)\n");
+ post_log("sysmon1 Abnormal voltage detected (GPIO62)\n");
+ post_log("POST sysmon1 FAILED\n");
return 1;
+ } else {
+ post_log("sysmon1 PASSED\n");
}
return 0;
@@ -117,10 +120,16 @@ int lwmon5_watchdog_post_test(int flags)
ulong time;
/* 3.3.1. So, the test succeed, save measured time to syslog. */
time = in_be32((void *)CONFIG_SYS_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;
+ if (time > 90 ) { /* ms*/
+ post_log("hw watchdog time : %u ms, passed ", time);
+ /* 3.3.2. Set scratch register 1 to 0x0000xxxx */
+ watchdog_magic_write(0);
+ return 0;
+ } else {
+ /*test minimum watchdogtime */
+ post_log("hw watchdog time : %u ms, failed ", time);
+ return 2;
+ }
}
return -1;
}
OpenPOWER on IntegriCloud