123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #define CRCPOLY_LE 0xedb88320
- #define CRCPOLY_BE 0x04c11db7
- #define CRC32C_POLY_LE 0x82F63B78
- #ifdef CONFIG_CRC32_SLICEBY8
- # define CRC_LE_BITS 64
- # define CRC_BE_BITS 64
- #endif
- #ifdef CONFIG_CRC32_SLICEBY4
- # define CRC_LE_BITS 32
- # define CRC_BE_BITS 32
- #endif
- #ifdef CONFIG_CRC32_SARWATE
- # define CRC_LE_BITS 8
- # define CRC_BE_BITS 8
- #endif
- #ifdef CONFIG_CRC32_BIT
- # define CRC_LE_BITS 1
- # define CRC_BE_BITS 1
- #endif
- #ifndef CRC_LE_BITS
- # ifdef CONFIG_64BIT
- # define CRC_LE_BITS 64
- # else
- # define CRC_LE_BITS 32
- # endif
- #endif
- #ifndef CRC_BE_BITS
- # ifdef CONFIG_64BIT
- # define CRC_BE_BITS 64
- # else
- # define CRC_BE_BITS 32
- # endif
- #endif
- #if CRC_LE_BITS > 64 || CRC_LE_BITS < 1 || CRC_LE_BITS == 16 || \
- CRC_LE_BITS & CRC_LE_BITS-1
- # error "CRC_LE_BITS must be one of {1, 2, 4, 8, 32, 64}"
- #endif
- #if CRC_BE_BITS > 64 || CRC_BE_BITS < 1 || CRC_BE_BITS == 16 || \
- CRC_BE_BITS & CRC_BE_BITS-1
- # error "CRC_BE_BITS must be one of {1, 2, 4, 8, 32, 64}"
- #endif
|