summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-12-07 10:24:12 -0700
committerTom Rini <[email protected]>2024-12-12 16:35:24 -0600
commitf0315babfb43c6d1f5d4ff0ea7554ec2c27bf7b1 (patch)
tree05e5b0e9c3e37875d659aa2f30b9173e84686293 /common
parent63702119d65c23602fa386766593c4ade6e6c7e7 (diff)
hash: Plumb crc8 into the hash functions
Add an entry for crc8, with watchdog handling. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'common')
-rw-r--r--common/hash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/hash.c b/common/hash.c
index db6925d6782..5d389420eff 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)
+ {
+ .name = "crc8",
+ .digest_size = 1,
+ .chunk_size = CHUNKSZ_CRC32,
+ .hash_func_ws = crc8_wd_buf,
+ },
+#endif
#if CONFIG_IS_ENABLED(CRC32)
{
.name = "crc32",