u-boot/lib
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
..
bzip2 bzlib: Try another way to fix an unused variable 2016-02-06 13:59:48 +01:00
dhry cmd_dhry.c: Use lldiv for vax_mips calculation as well 2016-03-17 10:14:25 -04:00
efi efi_stub: Move carriage return before line feed in putc() 2016-03-27 09:12:25 -04:00
efi_loader efi_loader: Always allocate the highest available address 2016-04-01 17:18:06 -04:00
libfdt libfdt: Add a function to write a property placeholder 2016-03-14 14:19:11 -04:00
lzma
lzo
rsa Kconfig: Move CONFIG_FIT and related options to Kconfig 2016-03-14 19:18:07 -04:00
tizen
zlib Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
addr_map.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
aes.c
asm-offsets.c
bch.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
bitrev.c
circbuf.c
crc7.c
crc8.c lib/crc8: Add crc start value 2016-04-11 20:48:26 -04:00
crc16.c lib/crc16.c: Rename cyg_crc16() to crc16_ccitt() and add crc start value 2016-03-14 19:18:42 -04:00
crc32.c
ctype.c
display_options.c Drop config.h header from display_options.c 2015-11-19 20:27:50 -07:00
div64.c lib: Don't instrument the div64 function 2016-02-26 08:53:10 -07:00
errno_str.c
errno.c
fdtdec_common.c lib, fdt: Adding fdtdec_get_uint function 2015-11-05 02:34:14 +01:00
fdtdec_test.c
fdtdec.c x86: dts: Drop memory SPD compatible string 2016-03-17 10:27:27 +08:00
gunzip.c dm: Drop the block_dev_desc_t typedef 2016-03-14 15:34:50 -06:00
gzip.c Move malloc_cache_aligned() to its own header 2015-09-11 17:15:16 -04:00
hang.c
hashtable.c env: import: hashtable: Free memory allocated before exiting from himport_r() 2015-09-15 15:05:13 -04:00
initcall.c efi: Display the correct initcall pre-relocation values 2015-08-05 08:42:41 -06:00
Kconfig cosmetic: Fix typos "privide" 2016-04-01 00:59:47 +09:00
ldiv.c
linux_compat.c linux_compat: handle __GFP_ZERO in kmalloc() 2015-07-22 07:30:44 -06:00
linux_string.c
list_sort.c
lmb.c
lz4_wrapper.c Fix sandbox build on Ubuntu 10.04 2015-11-18 15:28:59 -05:00
lz4.c Add support for LZ4 decompression algorithm 2015-10-11 17:12:10 -04:00
Makefile efi_loader: hook up in build environment 2016-03-15 21:30:11 -04:00
md5.c
membuff.c Add a circular memory buffer implementation 2015-11-19 20:27:50 -07:00
net_utils.c net: cosmetic: Change IPaddr_t to struct in_addr 2015-04-18 11:11:32 -06:00
panic.c lib: Split panic functions out of vsprintf.c 2015-12-13 17:07:30 -07:00
physmem.c lib/physmem.c: Switch to __weak for arch_phys_memset 2016-04-01 17:17:43 -04:00
qsort.c
rand.c
rbtree.c
rc4.c Add rivest cipher 4 (rc4) implementation 2015-07-21 17:39:28 -06:00
sha1.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
sha256.c
slre.c
string.c
strmhz.c
strto.c lib: split out strtoxxxx functions out of vsprintf.c 2015-12-13 17:07:30 -07:00
time.c timer: Provide an early timer 2016-02-26 08:53:10 -07:00
tiny-printf.c tiny-printf: Always print zeroes 2016-01-20 19:06:22 -07:00
tpm.c dm: Use uclass_first_device_err() where it is useful 2016-03-14 15:34:50 -06:00
trace.c
uuid.c uuid: add selection by string for known partition type GUID 2015-11-12 15:58:58 -05:00
vsprintf.c vsprintf.c: Always enable CONFIG_SYS_VSNPRINTF 2016-01-19 08:31:16 -05:00