]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common: Drop linux/crc8.h
authorSimon Glass <sjg@chromium.org>
Thu, 14 Nov 2019 19:57:14 +0000 (12:57 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 2 Dec 2019 23:23:07 +0000 (18:23 -0500)
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>
board/theadorable/theadorable.c
drivers/tpm/tpm2_tis_sandbox.c
drivers/tpm/tpm_tis_sandbox.c
include/linux/crc8.h [deleted file]
include/u-boot/crc.h
lib/crc8.c

index d42350319cc4f2c9905443a143135a4c191ffc3c..2958d5ff88245cfc33bce4a9c674351d8729e3ea 100644 (file)
 #include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/soc.h>
-#include <linux/crc8.h>
 #include <linux/mbus.h>
 #ifdef CONFIG_NET
 #include <netdev.h>
 #endif
+#include <u-boot/crc.h>
 #include "theadorable.h"
 
 #include "../drivers/ddr/marvell/axp/ddr3_hw_training.h"
index f282ea6adf9e71d8fcda2567f5a6aff18a786fc4..522988795c0822a1300aadcf431e11e0f2f40009 100644 (file)
@@ -9,7 +9,7 @@
 #include <tpm-v2.h>
 #include <asm/state.h>
 #include <asm/unaligned.h>
-#include <linux/crc8.h>
+#include <u-boot/crc.h>
 
 /* Hierarchies */
 enum tpm2_hierarchy {
index 3336f559e5714c4b9bc74a25f2fb1918134161cc..2dff0d3eee93b2c404ddd36317442bddb3953946 100644 (file)
@@ -8,7 +8,7 @@
 #include <tpm-v1.h>
 #include <asm/state.h>
 #include <asm/unaligned.h>
-#include <linux/crc8.h>
+#include <u-boot/crc.h>
 
 /* TPM NVRAM location indices. */
 #define FIRMWARE_NV_INDEX              0x1007
diff --git a/include/linux/crc8.h b/include/linux/crc8.h
deleted file mode 100644 (file)
index 0ab5b9a..0000000
+++ /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
index 788ef29a17b273c3d7de0ddc6359baf80c9c07d1..b42bcda2b3110fa30848b2747e0b408c049e3566 100644 (file)
@@ -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) */
index 55f7c07285cd3baf32612eaaf44fbed167a1ffcf..87b87b675b27fa77280cdf98a5cdf17c66b79566 100644 (file)
@@ -3,7 +3,12 @@
  * Copyright (c) 2013 Google, Inc
  */
 
-#include "linux/crc8.h"
+#ifdef USE_HOSTCC
+#include <arpa/inet.h>
+#else
+#include <common.h>
+#endif
+#include <u-boot/crc.h>
 
 #define POLY   (0x1070U << 3)