• Stefan Roese's avatar
    lib/crc8: Add crc start value · 456ecd08
    Stefan Roese authored
    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: 's avatarStefan Roese <sr@denx.de>
    Cc: Simon Glass <sjg@chromium.org>
    Reviewed-by: 's avatarSimon Glass <sjg@chromium.org>
    456ecd08
Name
Last commit
Last update
..
byteorder Loading commit data...
mtd Loading commit data...
unaligned Loading commit data...
usb Loading commit data...
apm_bios.h Loading commit data...
bch.h Loading commit data...
bitops.h Loading commit data...
bitrev.h Loading commit data...
bug.h Loading commit data...
compat.h Loading commit data...
compiler-clang.h Loading commit data...
compiler-gcc.h Loading commit data...
compiler-intel.h Loading commit data...
compiler.h Loading commit data...
crc32.h Loading commit data...
crc7.h Loading commit data...
crc8.h Loading commit data...
ctype.h Loading commit data...
drm_dp_helper.h Loading commit data...
edd.h Loading commit data...
err.h Loading commit data...
ethtool.h Loading commit data...
fb.h Loading commit data...
immap_qe.h Loading commit data...
input.h Loading commit data...
io.h Loading commit data...
ioctl.h Loading commit data...
ioport.h Loading commit data...
kbuild.h Loading commit data...
kconfig.h Loading commit data...
kernel.h Loading commit data...
linkage.h Loading commit data...
linux_string.h Loading commit data...
list.h Loading commit data...
list_sort.h Loading commit data...
log2.h Loading commit data...
lzo.h Loading commit data...
math64.h Loading commit data...
mbus.h Loading commit data...
mc146818rtc.h Loading commit data...
mdio.h Loading commit data...
mii.h Loading commit data...
netdevice.h Loading commit data...
poison.h Loading commit data...
posix_types.h Loading commit data...
psci.h Loading commit data...
rbtree.h Loading commit data...
rbtree_augmented.h Loading commit data...
screen_info.h Loading commit data...
serial_reg.h Loading commit data...
sizes.h Loading commit data...
stat.h Loading commit data...
stddef.h Loading commit data...
string.h Loading commit data...
stringify.h Loading commit data...
time.h Loading commit data...
types.h Loading commit data...