summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-03-04 10:48:39 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-03-04 14:19:17 +0100
commit74de1afbd2ed4262d4105b12641de0c5c487d930 (patch)
tree925c267bb2196c4d59e8f41060fbd5bf4eeef81e /common
parent990100d9a75b2818a93b834df8bf14aa02c6c8e7 (diff)
downloadbarebox-74de1afbd2ed4262d4105b12641de0c5c487d930.tar.gz
crc: import crc_itu_t() from kernel
Our cyc_crc16() function is the same function as crc_itu_t() in the Linux kernel. Import and use crc_itu_t() from the Kernel for consistency. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/Kconfig2
-rw-r--r--common/ddr_spd.c2
-rw-r--r--common/ratp/Kconfig2
3 files changed, 3 insertions, 3 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 21b33f0..749bdcf 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -1229,4 +1229,4 @@ config HAS_DEBUG_LL
config DDR_SPD
bool
- select CRC16
+ select CRC_ITU_T
diff --git a/common/ddr_spd.c b/common/ddr_spd.c
index 7e2945e..2110972 100644
--- a/common/ddr_spd.c
+++ b/common/ddr_spd.c
@@ -51,7 +51,7 @@ uint32_t ddr3_spd_checksum_pass(const struct ddr3_spd_eeprom_s *spd)
*/
len = !(spd->info_size_crc & 0x80) ? 126 : 117;
- csum16 = cyg_crc16((char *)spd, len);
+ csum16 = crc_itu_t(0, (char *)spd, len);
crc_lsb = (char) (csum16 & 0xff);
crc_msb = (char) (csum16 >> 8);
diff --git a/common/ratp/Kconfig b/common/ratp/Kconfig
index 25c931b..30462c6 100644
--- a/common/ratp/Kconfig
+++ b/common/ratp/Kconfig
@@ -2,7 +2,7 @@
config CONSOLE_RATP
bool
select RATP
- select CRC16
+ select CRC_ITU_T
select POLLER
select CMDLINE_EDITING
depends on CONSOLE_FULL