]> git.baikalelectronics.ru Git - uboot.git/commit
misc: atsha204a: Remove duplicate CRC-16 implementation
authorPali Rohár <pali@kernel.org>
Tue, 12 Apr 2022 09:20:44 +0000 (11:20 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 21 Apr 2022 18:32:40 +0000 (14:32 -0400)
commitbbf20cfeb1610a6c424f780b553a84d903ffdf4c
treeb6cbe06ca61fb437f23cfe830951f8f4a8005fdc
parentd2e58f2b374f13c3b49916c54a76f4158064634d
misc: atsha204a: Remove duplicate CRC-16 implementation

ATSHA204A uses bit-reversed checksum of standard CRC-16 with polynomial
x^16 + x^15 + x^2 + 1.

This ATSHA204A specific checksum can be calculated just by using common
U-Boot functions bitrev16() and crc16().

So replace custom driver CRC-16 implementation by common U-Boot functions.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/misc/Kconfig
drivers/misc/atsha204a-i2c.c