OSDN Git Service

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)
commitbd9305b0cb69bfe98885a63a9e6231ae92e822e2
tree446ab0b5f0470cd54c7b1ddb6fcc5154083f640b
parentf4f7c153a61782f3fb259d0f39aab91444e555d9
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