ppx4xx: Fix sdram init on PMC440 boards
[oweals/u-boot.git] / lib_generic / crc32.c
index ce18fc2252a71c7aeb5e2cd5208f5669cd96a18c..df0dbca346634360c035a19312843e6cf3fbcf16 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #ifndef USE_HOSTCC     /* Shut down "ANSI does not permit..." warnings */
-#include <common.h>    /* to get command definitions like CFG_CMD_JFFS2 */
+#include <common.h>
 #endif
 
 #include "zlib.h"
@@ -171,14 +171,15 @@ uLong ZEXPORT crc32(crc, buf, len)
     return crc ^ 0xffffffffL;
 }
 
-#if (CONFIG_COMMANDS & CFG_CMD_JFFS2)
+#if defined(CONFIG_CMD_JFFS2) || \
+       (defined(CONFIG_CMD_NAND) \
+       && !defined(CFG_NAND_LEGACY))
 
 /* No ones complement version. JFFS2 (and other things ?)
  * don't use ones compliment in their CRC calculations.
  */
 uLong ZEXPORT crc32_no_comp(uLong crc, const Bytef *buf, uInt len)
 {
-    if (buf == Z_NULL) return 0L;
 #ifdef DYNAMIC_CRC_TABLE
     if (crc_table_empty)
       make_crc_table();
@@ -195,4 +196,4 @@ uLong ZEXPORT crc32_no_comp(uLong crc, const Bytef *buf, uInt len)
     return crc;
 }
 
-#endif /* CFG_CMD_JFFS2 */
+#endif