0001
0002
0003
0004 #ifdef CONFIG_CRC32_SLICEBY8
0005 # define CRC_LE_BITS 64
0006 # define CRC_BE_BITS 64
0007 #endif
0008 #ifdef CONFIG_CRC32_SLICEBY4
0009 # define CRC_LE_BITS 32
0010 # define CRC_BE_BITS 32
0011 #endif
0012 #ifdef CONFIG_CRC32_SARWATE
0013 # define CRC_LE_BITS 8
0014 # define CRC_BE_BITS 8
0015 #endif
0016 #ifdef CONFIG_CRC32_BIT
0017 # define CRC_LE_BITS 1
0018 # define CRC_BE_BITS 1
0019 #endif
0020
0021
0022
0023
0024
0025
0026
0027
0028 #ifndef CRC_LE_BITS
0029 # ifdef CONFIG_64BIT
0030 # define CRC_LE_BITS 64
0031 # else
0032 # define CRC_LE_BITS 32
0033 # endif
0034 #endif
0035 #ifndef CRC_BE_BITS
0036 # ifdef CONFIG_64BIT
0037 # define CRC_BE_BITS 64
0038 # else
0039 # define CRC_BE_BITS 32
0040 # endif
0041 #endif
0042
0043
0044
0045
0046
0047 #if CRC_LE_BITS > 64 || CRC_LE_BITS < 1 || CRC_LE_BITS == 16 || \
0048 CRC_LE_BITS & CRC_LE_BITS-1
0049 # error "CRC_LE_BITS must be one of {1, 2, 4, 8, 32, 64}"
0050 #endif
0051
0052
0053
0054
0055
0056 #if CRC_BE_BITS > 64 || CRC_BE_BITS < 1 || CRC_BE_BITS == 16 || \
0057 CRC_BE_BITS & CRC_BE_BITS-1
0058 # error "CRC_BE_BITS must be one of {1, 2, 4, 8, 32, 64}"
0059 #endif