1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #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
|