From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15CB2C433EF for ; Tue, 12 Apr 2022 09:22:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A28F383DEF; Tue, 12 Apr 2022 11:22:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="sh7uNnud"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0211683DCD; Tue, 12 Apr 2022 11:22:02 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E0C8F83DD5 for ; Tue, 12 Apr 2022 11:21:54 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 04D6261791; Tue, 12 Apr 2022 09:21:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40AA5C385A1; Tue, 12 Apr 2022 09:21:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649755312; bh=wQ8S6yfk9cqqdvD5aSCTmB/2LfO2x8fOscJMbUUTZA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sh7uNnudQHMgYgZFP4pKYobqOF6dBYzLld4+3U/KwKZzMdvgkQrEh0rEymc518iuz FV2EPQZaZt5J6OtYkEFy5cE7+93TunB1vL9SPDDjUOWti+UdQNUSEYC9hMOZjGWGXm yc+ZfdIIEIB1W9sJwbjkZYveHpV5WXC5m1a5GPfE9QKS771hokd9NKwfiAZudevH2j A7O4Qma/nP/Be9k9i3etpEku3+/1bZxZN+6hn5EG4WRXHxOZUQSoSY8AUt8ab/DBpl D13klIdWOKjaJ9iqMhfbZzX7oj5MwrtrTbGuYxNaQedt8f4G7ADz82c5Uyw9XdbDlb MzQ/upR4/XKkw== Received: by pali.im (Postfix) id 8D8232AB2; Tue, 12 Apr 2022 11:21:49 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Simon Glass , Bin Meng , Adrian Fiergolski , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Stefan Roese Cc: u-boot@lists.denx.de Subject: [PATCH 1/5] crc16-ccitt: Rename file with CRC-16-CCITT implementation to crc16-ccitt.c Date: Tue, 12 Apr 2022 11:20:40 +0200 Message-Id: <20220412092044.25133-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20220412092044.25133-1-pali@kernel.org> References: <20220412092044.25133-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 --- include/u-boot/crc.h | 2 +- lib/Makefile | 8 ++++---- lib/{crc16.c => crc16-ccitt.c} | 2 +- tools/Makefile | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename lib/{crc16.c => crc16-ccitt.c} (99%) diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h index 52ec6a9e2d4b..eba8edfb4f31 100644 --- a/include/u-boot/crc.h +++ b/include/u-boot/crc.h @@ -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 diff --git a/lib/Makefile b/lib/Makefile index 11b03d1cbec8..b4f03cc149d3 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -37,7 +37,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 @@ -90,9 +90,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 diff --git a/lib/crc16.c b/lib/crc16-ccitt.c similarity index 99% rename from lib/crc16.c rename to lib/crc16-ccitt.c index f46ba727c9a8..6cadbc103d3e 100644 --- a/lib/crc16.c +++ b/lib/crc16-ccitt.c @@ -2,7 +2,7 @@ /* *========================================================================== * - * crc16.c + * crc16-ccitt.c * * 16 bit CRC with polynomial x^16+x^12+x^5+1 * diff --git a/tools/Makefile b/tools/Makefile index 60231c728ceb..852dc638f418 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -131,7 +131,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 \ -- 2.20.1