]> git.dujemihanovic.xyz Git - u-boot.git/commit
rng: stm32: add error concealment sequence
authorGatien Chevallier <gatien.chevallier@foss.st.com>
Tue, 19 Sep 2023 15:27:57 +0000 (17:27 +0200)
committerPatrice Chotard <patrice.chotard@foss.st.com>
Wed, 4 Oct 2023 11:26:03 +0000 (13:26 +0200)
commit6032292534e0f47012edd76cd88b2c952856f928
tree51600686018ecaeaeda7042d4a9acbbbf206e891
parent01af3636230656cdcba7a1c625c17a5c32a3fb69
rng: stm32: add error concealment sequence

Seed errors can occur when using the hardware RNG. Implement the
sequences to handle them. This avoids irrecoverable RNG state.

Try to conceal seed errors when possible. If, despite the error
concealing tries, a seed error is still present, then return an error.

A clock error does not compromise the hardware block and data can
still be read from RNG_DR. Just warn that the RNG clock is too slow
and clear RNG_SR.

Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
drivers/rng/stm32_rng.c