summaryrefslogtreecommitdiffstats
path: root/qemu/roms/u-boot/lib/crc8.c
diff options
context:
space:
mode:
Diffstat (limited to 'qemu/roms/u-boot/lib/crc8.c')
-rw-r--r--qemu/roms/u-boot/lib/crc8.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/qemu/roms/u-boot/lib/crc8.c b/qemu/roms/u-boot/lib/crc8.c
deleted file mode 100644
index 8b68a29e4..000000000
--- a/qemu/roms/u-boot/lib/crc8.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 2013 Google, Inc
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#include "linux/crc8.h"
-
-unsigned int crc8(const unsigned char *vptr, int len)
-{
- const unsigned char *data = vptr;
- unsigned int crc = 0;
- int i, j;
-
- for (j = len; j; j--, data++) {
- crc ^= (*data << 8);
- for (i = 8; i; i--) {
- if (crc & 0x8000)
- crc ^= (0x1070 << 3);
- crc <<= 1;
- }
- }
-
- return (crc >> 8) & 0xff;
-}