]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
crc16-ccitt: Rename file with CRC-16-CCITT implementation to crc16-ccitt.c
authorPali Rohár <pali@kernel.org>
Tue, 12 Apr 2022 09:20:40 +0000 (11:20 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 21 Apr 2022 18:32:40 +0000 (14:32 -0400)
U-Boot CRC-16 implementation uses polynomial x^16 + x^12 + x^5 + 1 which is
not standard CRC-16 algorithm, but it is known as CRC-16-CCITT. Rename file
crc16.c to crc16-ccitt.c to reduce confusion.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
include/u-boot/crc.h
lib/Makefile
lib/crc16-ccitt.c [moved from lib/crc16.c with 99% similarity]
tools/Makefile

index 52ec6a9e2d4b2d73d11b5be1c45b292aa5894d82..eba8edfb4f319348377de4d1198570e0beea1e42 100644 (file)
@@ -25,7 +25,7 @@
  */
 unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len);
 
-/* lib/crc16.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */
+/* lib/crc16-ccitt.c - 16 bit CRC with polynomial x^16+x^12+x^5+1 (CRC-CCITT) */
 uint16_t crc16_ccitt(uint16_t crc_start, const unsigned char *s, int len);
 /**
  * crc16_ccitt_wd_buf - Perform CRC16-CCIT on an input buffer and return the
index 13fe5fb7a430620c538e12b532a7cd0325b2c2ed..cf662a765a474cbecd1f247bc05a8d364912c273 100644 (file)
@@ -35,7 +35,7 @@ obj-$(CONFIG_CIRCBUF) += circbuf.o
 endif
 
 obj-y += crc8.o
-obj-y += crc16.o
+obj-y += crc16-ccitt.o
 obj-$(CONFIG_ERRNO_STR) += errno_str.o
 obj-$(CONFIG_FIT) += fdtdec_common.o
 obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o
@@ -91,9 +91,9 @@ obj-$(CONFIG_$(SPL_TPL_)OF_LIBFDT) += libfdt/
 obj-$(CONFIG_$(SPL_TPL_)OF_REAL) += fdtdec_common.o fdtdec.o
 
 ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o
-obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16.o
-obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16.o
+obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16-ccitt.o
+obj-$(CONFIG_$(SPL_TPL_)HASH) += crc16-ccitt.o
+obj-$(CONFIG_MMC_SPI_CRC_ON) += crc16-ccitt.o
 obj-y += net_utils.o
 endif
 obj-$(CONFIG_ADDR_MAP) += addr_map.o
similarity index 99%
rename from lib/crc16.c
rename to lib/crc16-ccitt.c
index f46ba727c9a869afae3af9bfd0abff1d3b26db42..6cadbc103d3ec8a7487b7c8736792fc8639b5ea2 100644 (file)
@@ -2,7 +2,7 @@
 /*
  *==========================================================================
  *
- *      crc16.c
+ *      crc16-ccitt.c
  *
  *      16 bit CRC with polynomial x^16+x^12+x^5+1
  *
index e17271be8bc157e77b545d8362de921f845ba4a2..9f2339666a7c9af92242866ca8e9e008ee495770 100644 (file)
@@ -132,7 +132,7 @@ dumpimage-mkimage-objs := aisimage.o \
                        $(ROCKCHIP_OBS) \
                        socfpgaimage.o \
                        sunxi_egon.o \
-                       lib/crc16.o \
+                       lib/crc16-ccitt.o \
                        lib/hash-checksum.o \
                        lib/sha1.o \
                        lib/sha256.o \