summaryrefslogtreecommitdiffstats
path: root/common/ddr_spd.c
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/ddr_spd.c
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/ddr_spd.c')
-rw-r--r--common/ddr_spd.c2
1 files changed, 1 insertions, 1 deletions
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);