diff options
author | Simon Glass <sjg@chromium.org> | 2025-01-26 11:43:14 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-02-03 16:00:42 -0600 |
commit | 5929c2f39f557940a49d2852f95ade939358b705 (patch) | |
tree | 2c9a6ace6bddd7958f312afcbed2549499b5cf49 /lib | |
parent | 00ae9b2ac3493ed74449cd3b7cf50bce1b98d36d (diff) |
lib: Allow crc16 code to be dropped
This code is not necessarily needed in VPL, even if SPL uses it, so
adjust the rules to allow it to be dropped.
Do the same for the hash API.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Kconfig | 10 | ||||
-rw-r--r-- | lib/Makefile | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index b27965fc480..1a683dea670 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -758,6 +758,16 @@ config VPL_CRC8 checksum with feedback to produce an 8-bit result. The code is small and it does not require a lookup table (unlike CRC32). +config CRC16 + bool "Support CRC16" + default y + help + Enables CRC16 support. This is normally required. Two algorithms are + provided: + + - CCITT, with a polynomical x^16 + x^12 + x^5 + 1 + - standard, with polynomial x^16 + x^15 + x^2 + 1 (0x8005) + config SPL_CRC16 bool "Support CRC16 in SPL" depends on SPL diff --git a/lib/Makefile b/lib/Makefile index fc6e68c901a..06bbbb48a05 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -35,8 +35,6 @@ obj-$(CONFIG_CIRCBUF) += circbuf.o endif obj-y += crc8.o -obj-y += crc16.o -obj-y += crc16-ccitt.o obj-$(CONFIG_ERRNO_STR) += errno_str.o obj-$(CONFIG_FIT) += fdtdec_common.o obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o @@ -71,6 +69,7 @@ endif obj-$(CONFIG_$(PHASE_)CRC8) += crc8.o obj-$(CONFIG_$(PHASE_)CRC16) += crc16.o +obj-$(CONFIG_$(PHASE_)CRC16) += crc16-ccitt.o obj-y += crypto/ |