X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib_generic%2Fcrc32.c;h=b27048ceebf2f07075457aedc5f1b0a3cb6db381;hb=84efbf4d144ff8aaed3cca036aebb1fe69eff3f4;hp=73070de400a1b5dbb69ce8fbf5b3ae38cfb12c38;hpb=aff4f86448f6586930f0a3be7fc4b0ddcf450980;p=platform%2Fkernel%2Fu-boot.git diff --git a/lib_generic/crc32.c b/lib_generic/crc32.c index 73070de..b27048c 100644 --- a/lib_generic/crc32.c +++ b/lib_generic/crc32.c @@ -13,9 +13,11 @@ #else #include #endif -#include -#include "zlib.h" +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) +#include +#endif +#include "u-boot/zlib.h" #define local static #define ZEXPORT /* empty */ @@ -54,7 +56,7 @@ local void make_crc_table() { uint32_t c; int n, k; - uLong poly; /* polynomial exclusive-or pattern */ + uLong poly; /* polynomial exclusive-or pattern */ /* terms of polynomial defining this crc (except x^32): */ static const Byte p[] = {0,1,2,4,5,7,8,10,11,12,16,22,23,26}; @@ -170,9 +172,7 @@ uint32_t ZEXPORT crc32 (uint32_t crc, const Bytef *buf, uInt len) return crc ^ 0xffffffffL; } -#if defined(CONFIG_CMD_JFFS2) || \ - (defined(CONFIG_CMD_NAND) \ - && !defined(CFG_NAND_LEGACY)) +#if defined(CONFIG_CMD_JFFS2) || defined(CONFIG_CMD_NAND) /* No ones complement version. JFFS2 (and other things ?) * don't use ones compliment in their CRC calculations. @@ -220,7 +220,7 @@ uint32_t ZEXPORT crc32_wd (uint32_t crc, WATCHDOG_RESET (); } #else - crc = crc32 (crc, buf, len); + crc = crc32 (crc, buf, len); #endif return crc;