2009-08-15 23:58:19 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2009
|
|
|
|
* Marvell Semiconductor <www.marvell.com>
|
|
|
|
* Written-by: Prafulla Wadaskar <prafulla@marvell.com>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2009-08-15 23:58:19 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _UBOOT_CRC_H
|
|
|
|
#define _UBOOT_CRC_H
|
|
|
|
|
2010-04-13 03:28:05 +00:00
|
|
|
/* lib/crc32.c */
|
2009-08-15 23:58:19 +00:00
|
|
|
uint32_t crc32 (uint32_t, const unsigned char *, uint);
|
|
|
|
uint32_t crc32_wd (uint32_t, const unsigned char *, uint, uint);
|
|
|
|
uint32_t crc32_no_comp (uint32_t, const unsigned char *, uint);
|
|
|
|
|
2013-02-24 20:30:22 +00:00
|
|
|
/**
|
|
|
|
* crc32_wd_buf - Perform CRC32 on a buffer and return result in buffer
|
|
|
|
*
|
|
|
|
* @input: Input buffer
|
|
|
|
* @ilen: Input buffer length
|
|
|
|
* @output: Place to put checksum result (4 bytes)
|
|
|
|
* @chunk_sz: Trigger watchdog after processing this many bytes
|
|
|
|
*/
|
|
|
|
void crc32_wd_buf(const unsigned char *input, uint ilen,
|
|
|
|
unsigned char *output, uint chunk_sz);
|
|
|
|
|
2009-08-15 23:58:19 +00:00
|
|
|
#endif /* _UBOOT_CRC_H */
|