]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: octeontx2 - CN10K CPT to RNM workaround
authorSrujana Challa <schalla@marvell.com>
Tue, 25 Jan 2022 18:26:22 +0000 (23:56 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 5 Feb 2022 04:10:50 +0000 (15:10 +1100)
commita26db40715294369baf7ffe9284ee9370b31a11b
tree446ab0b5f0470cd54c7b1ddb6fcc5154083f640b
parenta8214c82bb90c2aeac2ad884fda93c90c735ab64
crypto: octeontx2 - CN10K CPT to RNM workaround

When software sets CPT_AF_CTL[RNM_REQ_EN]=1 and RNM in not producing
entropy(i.e., RNM_ENTROPY_STATUS[NORMAL_CNT] < 0x40), the first cycle of
the response may be lost due to a conditional clocking issue. Due to
this, the subsequent random number stream will be corrupted. So, this
patch adds support to ensure RNM_ENTROPY_STATUS[NORMAL_CNT] = 0x40
before writing CPT_AF_CTL[RNM_REQ_EN] = 1, as a workaround.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c