1# Copyright (c) 2016,2023 Intel Corporation 2# Copyright (c) 2025 Renesas Electronics Corporation 3# SPDX-License-Identifier: Apache-2.0 4 5DT_CHOSEN_Z_CRC := zephyr,crc 6 7menuconfig CRC 8 bool "Cyclic redundancy check (CRC) Support" 9 help 10 Enable use of CRC. 11 12if CRC 13 14module = CRC 15module-str = CRC 16source "subsys/logging/Kconfig.template.log_config" 17 18config CRC_HW_HANDLER 19 bool "CRC Hardware Accelerator" 20 default y if $(dt_chosen_enabled,$(DT_CHOSEN_Z_CRC)) 21 select CRC_DRIVER 22 help 23 Enable use of CRC hardware 24 25config CRC4 26 bool "CRC-4 (Generic)" 27 depends on CRC_DRIVER_HAS_CRC4 28 default y 29 help 30 Implements a generic CRC-4 algorithm. This is suitable for platforms 31 without hardware CRC support. Offers flexibility but has lower performance 32 compared to hardware-based implementations. 33 34config CRC4_TI 35 bool "CRC-4 (TI Polynomial)" 36 depends on CRC_DRIVER_HAS_CRC4_TI 37 default y 38 help 39 Implements the TI-specific CRC-4 algorithm. Commonly used in low-level 40 embedded communication where minimal CRC overhead is needed. 41 42config CRC7_BE 43 bool "CRC-7 (Big Endian)" 44 depends on CRC_DRIVER_HAS_CRC7_BE 45 default y 46 help 47 Implements a CRC-7 algorithm with Big Endian bit order. Often used 48 in SD card protocols and other serial communication standards. 49 50config CRC8 51 bool "CRC-8 (Generic)" 52 depends on CRC_DRIVER_HAS_CRC8 53 default y 54 help 55 Implements a generic CRC-8 algorithm. Useful for small data integrity 56 checks such as checksums and simple communication protocols. 57 58config CRC8_ROHC 59 bool "CRC-8 (ROHC)" 60 depends on CRC_DRIVER_HAS_CRC8_ROHC 61 default y 62 help 63 Implements the CRC-8 ROHC (Robust Header Compression) algorithm, 64 typically used in compressed IP header protocols and networking. 65 66config CRC8_CCITT 67 bool "CRC-8 (CCITT)" 68 depends on CRC_DRIVER_HAS_CRC8_CCITT 69 default y 70 help 71 Implements the CRC-8 CCITT polynomial. Commonly used in 72 telecommunications and low-power sensor protocols. 73 74config CRC16 75 bool "CRC-16 (Generic)" 76 depends on CRC_DRIVER_HAS_CRC16 77 default y 78 help 79 Implements the generic CRC-16 algorithm. Frequently used in 80 storage, file transmission, and basic serial communication protocols. 81 82config CRC16_ANSI 83 bool "CRC-16 (ANSI)" 84 depends on CRC_DRIVER_HAS_CRC16_ANSI 85 default y 86 help 87 Implements the ANSI variant of CRC-16, also known as CRC-16-IBM. 88 Commonly applied in legacy serial and file systems. 89 90config CRC16_CCITT 91 bool "CRC-16 (CCITT)" 92 depends on CRC_DRIVER_HAS_CRC16_CCITT 93 default y 94 help 95 Implements the CCITT variant of CRC-16, widely used in 96 telecommunication systems such as XMODEM and HDLC protocols. 97 98config CRC16_ITU_T 99 bool "CRC-16 (ITU-T)" 100 depends on CRC_DRIVER_HAS_CRC16_ITU_T 101 default y 102 help 103 Implements the ITU-T (formerly CCITT) CRC-16 variant. 104 Popular in modem protocols and wireless communication standards. 105 106config CRC16_REFLECT 107 bool "CRC-16 (Reflected)" 108 depends on CRC_DRIVER_HAS_CRC16_REFLECT 109 default y 110 help 111 Implements the reflected (bit-reversed) variant of CRC-16-CCITT. 112 Useful in systems that process data in LSB-first order. 113 114config CRC24_PGP 115 bool "CRC-24 (PGP)" 116 depends on CRC_DRIVER_HAS_CRC24_PGP 117 default y 118 help 119 Implements a CRC24 algorithm, used in applications like Bluetooth 120 and certain cryptographic protocols. 121 122config CRC32_C 123 bool "CRC-32C" 124 depends on CRC_DRIVER_HAS_CRC32_C 125 default y 126 help 127 Implements the CRC32-C (Castagnoli) algorithm, optimized for 128 high-performance applications such as storage, networking, 129 and error detection in modern processors. 130 131config CRC32_IEEE 132 bool "CRC-32 (IEEE)" 133 depends on CRC_DRIVER_HAS_CRC32_IEEE 134 default y 135 help 136 Implements the CRC32-IEEE (CRC-32) algorithm, commonly used 137 in Ethernet, ZIP file integrity checks, and other standard 138 networking and storage applications. 139 140 141config CRC32_K_4_2 142 bool "CRC-32K/4.2" 143 depends on CRC_DRIVER_HAS_CRC32_K_4_2 144 default y 145 help 146 Implement the CRC-32K/4.2 algorithm, a variant of the standard 147 CRC32-IEEE used in Ethernet, ZIP files, and other data integrity 148 applications. 149 150config CRC32_K_4_2_TABLE_256 151 bool "CRC-32K/4.2 Table 256" 152 help 153 Enables the software implementation of the CRC-32K/4.2 algorithm 154 using a 256-entry lookup table for faster computation. 155 156config CRC_SHELL 157 bool "CRC Shell" 158 depends on SHELL 159 select GETOPT 160 help 161 Enable CRC checking for memory regions from the shell. 162 163endif # CRC 164