|
@@ -544,6 +544,9 @@ static int caam_probe(struct platform_device *pdev)
|
|
* the TRNG parameters.
|
|
* the TRNG parameters.
|
|
*/
|
|
*/
|
|
if (!(ctrlpriv->rng4_sh_init || inst_handles)) {
|
|
if (!(ctrlpriv->rng4_sh_init || inst_handles)) {
|
|
|
|
+ dev_info(dev,
|
|
|
|
+ "Entropy delay = %u\n",
|
|
|
|
+ ent_delay);
|
|
kick_trng(pdev, ent_delay);
|
|
kick_trng(pdev, ent_delay);
|
|
ent_delay += 400;
|
|
ent_delay += 400;
|
|
}
|
|
}
|
|
@@ -556,6 +559,12 @@ static int caam_probe(struct platform_device *pdev)
|
|
*/
|
|
*/
|
|
ret = instantiate_rng(dev, inst_handles,
|
|
ret = instantiate_rng(dev, inst_handles,
|
|
gen_sk);
|
|
gen_sk);
|
|
|
|
+ if (ret == -EAGAIN)
|
|
|
|
+ /*
|
|
|
|
+ * if here, the loop will rerun,
|
|
|
|
+ * so don't hog the CPU
|
|
|
|
+ */
|
|
|
|
+ cpu_relax();
|
|
} while ((ret == -EAGAIN) && (ent_delay < RTSDCTL_ENT_DLY_MAX));
|
|
} while ((ret == -EAGAIN) && (ent_delay < RTSDCTL_ENT_DLY_MAX));
|
|
if (ret) {
|
|
if (ret) {
|
|
dev_err(dev, "failed to instantiate RNG");
|
|
dev_err(dev, "failed to instantiate RNG");
|