diff options
author | Simon Glass <sjg@chromium.org> | 2024-12-19 11:29:07 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-12-27 15:16:10 -0600 |
commit | 6f1b27a724b0d75bf89cc0f8be95fc3bcb4d4fe8 (patch) | |
tree | 20191f61b0279738ecf2fbaa281f7fe5cf775fd3 /common/hash.c | |
parent | 286b48c9579eed29cbb53584c58c382c268cabfd (diff) |
hash: Plumb crc8 into the hash functions
Add an entry for crc8, with watchdog handling.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'common/hash.c')
-rw-r--r-- | common/hash.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/hash.c b/common/hash.c index db6925d6782..8dd9da85768 100644 --- a/common/hash.c +++ b/common/hash.c @@ -304,6 +304,14 @@ static struct hash_algo hash_algo[] = { .hash_update = hash_update_crc16_ccitt, .hash_finish = hash_finish_crc16_ccitt, }, +#if CONFIG_IS_ENABLED(CRC8) && IS_ENABLED(CONFIG_HASH_CRC8) + { + .name = "crc8", + .digest_size = 1, + .chunk_size = CHUNKSZ_CRC32, + .hash_func_ws = crc8_wd_buf, + }, +#endif #if CONFIG_IS_ENABLED(CRC32) { .name = "crc32", |