u-boot/include/linux
Stefan Roese 456ecd08ec lib/crc8: Add crc start value
To make the usage of this function more flexible, lets add the CRC start
value as parameter to this function. This way it can be used by other
functions requiring different start values than 0 as well.

For non-zero CRC start values to work, I've reworked the function a bit.
The new implementation is copied from the Linux version in
drivers/i2c/i2c-core.c / i2c_smbus_pec(). Which supports non-zero
CRC stating values.

I've double-checked that the results for zero starting values are
identical to the results from the original version of this function.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2016-04-11 20:48:26 -04:00
..
byteorder include/linux/byteorder: Always defines __fswab64, __swab64p and __swab64s 2012-11-30 07:15:04 -07:00
mtd include/linux/mtd: Update copyright notices 2015-11-12 13:19:03 -05:00
unaligned include/linux/unaligned/generic.h: fix warning: preprocessor token __force redefined 2012-11-04 11:00:34 -07:00
usb armv8: LS2080A: Consolidate LS2080A and LS2085A 2016-04-06 10:26:46 -07:00
apm_bios.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
bch.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
bitops.h bitops: Add fls_long and __ffs64 2015-11-05 10:52:34 -05:00
bitrev.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
bug.h bug.h: move BUILD_BUG_* defines to include/linux/bug.h 2016-01-25 10:39:59 -05:00
compat.h compat: Remove is_power_of_2() definition 2015-11-05 16:46:59 -05:00
compiler-clang.h compiler*.h: sync include/linux/compiler*.h with Linux 3.16 2014-09-16 12:23:57 -04:00
compiler-gcc.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
compiler-intel.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
compiler.h compiler*.h: sync include/linux/compiler*.h with Linux 4.5-rc6 2016-02-29 11:43:24 -05:00
crc7.h lib: add crc7 from Linux 2011-01-18 23:38:08 +01:00
crc8.h lib/crc8: Add crc start value 2016-04-11 20:48:26 -04:00
crc32.h Coding style cleanup, update CHANGELOG. 2008-12-16 01:02:17 +01:00
ctype.h Add isblank 2011-10-17 22:25:34 +02:00
drm_dp_helper.h tegra124: video: Add full link training for eDP 2015-05-13 09:24:12 -07:00
edd.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
err.h linux include: add ERR_CAST 2014-08-25 17:02:33 -04:00
ethtool.h add support for Xilinx 1000BASE-X phy (GTX) 2013-06-24 19:11:13 -05:00
fb.h fb: Add a prototype for board_video_skip() 2014-03-05 12:23:48 +01:00
immap_qe.h QE/DeepSleep: add QE deepsleep support for mpc85xx 2015-04-21 10:19:19 -07:00
input.h Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
io.h include: introduce include/linux/io.h as a wrapper of asm/io.h 2015-05-28 08:18:19 -04:00
ioctl.h x86: Fix support for booting bzImage 2010-05-06 00:17:01 +02:00
ioport.h x86: Fix support for booting bzImage 2010-05-06 00:17:01 +02:00
kbuild.h clang: workaround for generated constants 2014-09-09 13:51:54 +02:00
kconfig.h linux/kconfig.h: add CPP macros useful for per-image config options 2015-08-18 13:46:00 -04:00
kernel.h Fix SIZE_MAX compiler warning when using stdint.h 2014-11-25 06:33:58 -07:00
linkage.h Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
linux_string.h Make linux kernel string funcs available to tools 2012-12-13 11:46:07 -07:00
list.h Coding style cleanup, update CHANGELOG 2008-09-13 02:23:05 +02:00
list_sort.h lib, list_sort: add list_sort from linux 3.14 2014-08-25 17:02:33 -04:00
log2.h include: Add log2 header from the kernel 2015-11-05 10:51:53 -05:00
lzo.h add lzop decompression support 2009-12-05 01:30:23 +01:00
math64.h UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00
mbus.h arm: mvebu: Add common mbus functions to use on Marvell SoCs 2014-10-23 09:59:20 -04:00
mc146818rtc.h Replace BCD2BIN and BIN2BCD macros with inline functions 2009-08-25 12:57:55 +02:00
mdio.h Minor coding style cleanup. 2011-09-11 21:24:09 +02:00
mii.h add support for Xilinx 1000BASE-X phy (GTX) 2013-06-24 19:11:13 -05:00
netdevice.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
poison.h update linux/list 2008-08-31 04:24:51 +02:00
posix_types.h
psci.h armv8: Add psci.h from the Linux kernel 2016-01-19 22:25:37 +00:00
rbtree.h kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
rbtree_augmented.h lib, rbtree: resync with Linux-3.14 2014-08-25 17:02:33 -04:00
screen_info.h x86: Fix support for booting bzImage 2010-05-06 00:17:01 +02:00
serial_reg.h arm: debug: replace license blocks with SPDX 2014-10-26 22:22:09 +01:00
sizes.h sizes.h - consolidate for all architectures 2014-03-04 12:15:01 -05:00
stat.h nios2: add struct stat support in linux/stat.h 2010-04-02 12:28:40 -04:00
stddef.h include/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined' 2012-11-04 11:00:34 -07:00
string.h lib: string: move strlcpy() to a common place 2014-12-11 13:18:41 -07:00
stringify.h COMMON: Add __stringify() function 2012-10-15 11:53:47 -07:00
time.h
types.h Revert "include/linux: move typdef for uintptr_t" 2015-12-16 07:11:15 -05:00