summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-11-14 22:57:14 +0300
committerTom Rini <trini@konsulko.com>2019-12-03 02:23:07 +0300
commitc3a4d1c3ee1f528a62e0de55ed034fa6d23c0add (patch)
treefa74607979d7d94f35241b3bf939453816662167 /include
parent840ef4d43b69a687660b3722b9c4a8a44a2912f8 (diff)
downloadu-boot-c3a4d1c3ee1f528a62e0de55ed034fa6d23c0add.tar.xz
common: Drop linux/crc8.h
We have an existing U-Boot header for the one function that this defines. Use that instead of the linux/ one. Move over the nice comment. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/crc8.h23
-rw-r--r--include/u-boot/crc.h14
2 files changed, 13 insertions, 24 deletions
diff --git a/include/linux/crc8.h b/include/linux/crc8.h
deleted file mode 100644
index 0ab5b9ab21..0000000000
--- a/include/linux/crc8.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * Copyright (c) 2013 Google, Inc
- */
-
-
-#ifndef __linux_crc8_h
-#define __linux_crc8_h
-
-/**
- * crc8() - Calculate and return CRC-8 of the data
- *
- * This uses an x^8 + x^2 + x + 1 polynomial. A table-based algorithm would
- * be faster, but for only a few bytes it isn't worth the code size
- *
- * @crc_start: CRC8 start value
- * @vptr: Buffer to checksum
- * @len: Length of buffer in bytes
- * @return CRC8 checksum
- */
-unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len);
-
-#endif
diff --git a/include/u-boot/crc.h b/include/u-boot/crc.h
index 788ef29a17..b42bcda2b3 100644
--- a/include/u-boot/crc.h
+++ b/include/u-boot/crc.h
@@ -8,7 +8,19 @@
#ifndef _UBOOT_CRC_H
#define _UBOOT_CRC_H
-/* lib/crc8.c */
+/**
+ * crc8() - Calculate and return CRC-8 of the data
+ *
+ * This uses an x^8 + x^2 + x + 1 polynomial. A table-based algorithm would
+ * be faster, but for only a few bytes it isn't worth the code size
+ *
+ * lib/crc8.c
+ *
+ * @crc_start: CRC8 start value
+ * @vptr: Buffer to checksum
+ * @len: Length of buffer in bytes
+ * @return CRC8 checksum
+ */
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) */