]> git.ipfire.org Git - people/ms/u-boot.git/blame - include/u-boot/crc.h
Merge tag 'xilinx-fixes-for-v2017.03' of git://www.denx.de/git/u-boot-microblaze
[people/ms/u-boot.git] / include / u-boot / crc.h
CommitLineData
449609f5
PW
1/*
2 * (C) Copyright 2009
3 * Marvell Semiconductor <www.marvell.com>
4 * Written-by: Prafulla Wadaskar <prafulla@marvell.com>
5 *
1a459660 6 * SPDX-License-Identifier: GPL-2.0+
449609f5
PW
7 */
8
9#ifndef _UBOOT_CRC_H
10#define _UBOOT_CRC_H
11
1d3c5392 12/* lib/crc8.c */
13unsigned int crc8(unsigned int crc_start, const unsigned char *vptr, int len);
14
78acc472 15/* lib/crc32.c */
449609f5
PW
16uint32_t crc32 (uint32_t, const unsigned char *, uint);
17uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint);
18uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint);
19
d20a40de
SG
20/**
21 * crc32_wd_buf - Perform CRC32 on a buffer and return result in buffer
22 *
23 * @input: Input buffer
24 * @ilen: Input buffer length
25 * @output: Place to put checksum result (4 bytes)
26 * @chunk_sz: Trigger watchdog after processing this many bytes
27 */
28void crc32_wd_buf(const unsigned char *input, uint ilen,
29 unsigned char *output, uint chunk_sz);
30
449609f5 31#endif /* _UBOOT_CRC_H */