diff options
author | Jon Loeliger <jdl@freescale.com> | 2005-07-28 10:35:56 -0500 |
---|---|---|
committer | Jon Loeliger <jdl@freescale.com> | 2005-07-28 10:35:56 -0500 |
commit | a720fd99b614ba36293565771bcd19799bc53959 (patch) | |
tree | ac6bb53573fffe2745caf93330cd5aa7a4e76e82 /post | |
parent | f046ccd15c8bc9613bfd72916b761a127d36e5c6 (diff) | |
parent | 15f36a5efd31fe608b43dc197ebbd80d3cecbe44 (diff) | |
download | u-boot-imx-a720fd99b614ba36293565771bcd19799bc53959.zip u-boot-imx-a720fd99b614ba36293565771bcd19799bc53959.tar.gz u-boot-imx-a720fd99b614ba36293565771bcd19799bc53959.tar.bz2 |
Merge with rsync://git-user@source.denx.net/git/u-boot.git
Diffstat (limited to 'post')
-rw-r--r-- | post/sysmon.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/post/sysmon.c b/post/sysmon.c index 8758ccd..72fcac3 100644 --- a/post/sysmon.c +++ b/post/sysmon.c @@ -185,6 +185,10 @@ static char *sysmon_unit_value (sysmon_table_t *s, uint val) char *p, sign; int dec, frac; + if (val == -1) { + return "I/O ERROR"; + } + if (unit_val < 0) { sign = '-'; unit_val = -unit_val; @@ -297,8 +301,13 @@ int sysmon_post_test (int flags) } val = t->sysmon->read(t->sysmon, t->addr); - t->val_valid = val >= t->val_min && val <= t->val_max; - t->val_valid_alt = val >= t->val_min_alt && val <= t->val_max_alt; + if (val != -1) { + t->val_valid = val >= t->val_min && val <= t->val_max; + t->val_valid_alt = val >= t->val_min_alt && val <= t->val_max_alt; + } else { + t->val_valid = 0; + t->val_valid_alt = 0; + } if (t->exec_after) { t->exec_after(t); |