mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
![Jeremy Kerr](/assets/img/avatar_default.png)
Add a little helper for crc4 calculations. This works 4-bits-at-a-time, using a simple table approach. We will need this in the FSI core code, as well as any master implementations that need to calculate CRCs in software. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Chris Bostic <cbostic@linux.vnet.ibm.com> Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 lines
153 B
C
8 lines
153 B
C
#ifndef _LINUX_CRC4_H
|
|
#define _LINUX_CRC4_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
extern uint8_t crc4(uint8_t c, uint64_t x, int bits);
|
|
|
|
#endif /* _LINUX_CRC4_H */
|