diff options
author | wdenk <wdenk> | 2004-10-11 22:43:02 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2004-10-11 22:43:02 +0000 |
commit | 2ee665339b06285a5fd9e36410d1167efc9b0606 (patch) | |
tree | d6de628020ca2600a1ecb20027ce06d1b7986d1d /lib_generic/bzlib_decompress.c | |
parent | 9455b7f39cecbcd869b1ba49a1307cb97e67360f (diff) | |
download | u-boot-midas-2ee665339b06285a5fd9e36410d1167efc9b0606.tar.gz u-boot-midas-2ee665339b06285a5fd9e36410d1167efc9b0606.tar.bz2 u-boot-midas-2ee665339b06285a5fd9e36410d1167efc9b0606.zip |
* Patch by Pantelis Antoniou, 14 Sep 2004:
Fix early serial hang when CONFIG_SERIAL_MULTI is defined.
* Patch by Pantelis Antoniou, 14 Sep 2004:
Kick watchdog when bz-decompressing
Diffstat (limited to 'lib_generic/bzlib_decompress.c')
-rw-r--r-- | lib_generic/bzlib_decompress.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib_generic/bzlib_decompress.c b/lib_generic/bzlib_decompress.c index a4a16879e7..a5750520cc 100644 --- a/lib_generic/bzlib_decompress.c +++ b/lib_generic/bzlib_decompress.c @@ -1,4 +1,6 @@ #include <config.h> +#include <common.h> +#include <watchdog.h> #ifdef CONFIG_BZIP2 /*-------------------------------------------------------------*/ @@ -416,6 +418,9 @@ Int32 BZ2_decompress ( DState* s ) while (True) { +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) + WATCHDOG_RESET(); +#endif if (nextSym == EOB) break; if (nextSym == BZ_RUNA || nextSym == BZ_RUNB) { @@ -498,6 +503,9 @@ Int32 BZ2_decompress ( DState* s ) if (s->mtfbase[0] == 0) { kk = MTFA_SIZE-1; for (ii = 256 / MTFL_SIZE-1; ii >= 0; ii--) { +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) + WATCHDOG_RESET(); +#endif for (jj = MTFL_SIZE-1; jj >= 0; jj--) { s->mtfa[kk] = s->mtfa[s->mtfbase[ii] + jj]; kk--; @@ -560,6 +568,9 @@ Int32 BZ2_decompress ( DState* s ) } while (i != s->origPtr); +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) + WATCHDOG_RESET(); +#endif s->tPos = s->origPtr; s->nblock_used = 0; if (s->blockRandomised) { @@ -572,6 +583,9 @@ Int32 BZ2_decompress ( DState* s ) } else { +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) + WATCHDOG_RESET(); +#endif /*-- compute the T^(-1) vector --*/ for (i = 0; i < nblock; i++) { uc = (UChar)(s->tt[i] & 0xff); |