upstream u-boot with additional patches for our devices/boards:
https://lists.denx.de/pipermail/u-boot/2017-March/282789.html (AXP crashes) ;
Gbit ethernet patch for some LIME2 revisions ;
with SPI flash support
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
621 B
30 lines
621 B
16 years ago
|
/*
|
||
|
* crc16.h - CRC-16 routine
|
||
|
*
|
||
|
* Implements the standard CRC-16:
|
||
|
* Width 16
|
||
|
* Poly 0x8005 (x^16 + x^15 + x^2 + 1)
|
||
|
* Init 0
|
||
|
*
|
||
|
* Copyright (c) 2005 Ben Gardner <bgardner@wabtec.com>
|
||
|
*
|
||
|
* This source code is licensed under the GNU General Public License,
|
||
|
* Version 2. See the file COPYING for more details.
|
||
|
*/
|
||
|
|
||
|
#ifndef __CRC16_H
|
||
|
#define __CRC16_H
|
||
|
|
||
|
#include <linux/types.h>
|
||
|
|
||
|
extern u16 const crc16_table[256];
|
||
|
|
||
|
extern u16 crc16(u16 crc, const u8 *buffer, size_t len);
|
||
|
|
||
|
static inline u16 crc16_byte(u16 crc, const u8 data)
|
||
|
{
|
||
|
return (crc >> 8) ^ crc16_table[(crc ^ data) & 0xff];
|
||
|
}
|
||
|
|
||
|
#endif /* __CRC16_H */
|