image: Use the correct checks for CRC32
authorSimon Glass <sjg@chromium.org>
Sun, 26 Sep 2021 01:43:24 +0000 (19:43 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 8 Oct 2021 19:53:26 +0000 (15:53 -0400)
commite7d285b2f38202f9d7ffbdcae59283f08bafd8b9
treefb0f32f97c2267949ca6146cc6c0ab94d3ffe8a2
parent2bbed3ff8c7fa0c0fa3fd28a9497bf7a99e3388b
image: Use the correct checks for CRC32

Add a host Kconfig for CRC32. With this we can use CONFIG_IS_ENABLED(CRC32)
directly in the host build, so drop the unnecessary indirection.

Add a few more conditions to SPL_CRC32 to avoid build failures as well as
TPL_CRC32. Also update hash.c to make crc32 optional and to actually take
notice of SPL_CRC32.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
common/hash.c
common/spl/Kconfig
lib/Kconfig
lib/Makefile
tools/Kconfig