--- zzzz-none-000/linux-4.1.52/drivers/char/hw_random/iproc-rng200.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/drivers/char/hw_random/iproc-rng200.c 2022-03-02 11:37:12.000000000 +0000 @@ -143,9 +143,12 @@ if (!wait) /* Cannot wait, return immediately */ return max - num_remaining; - +#if defined(CONFIG_BCM_KF_HWRNG) + udelay(20); +#else /* Can wait, give others chance to run */ usleep_range(min(num_remaining * 10, 500U), 500); +#endif } } @@ -206,6 +209,9 @@ priv->rng.read = iproc_rng200_read, priv->rng.init = iproc_rng200_init, priv->rng.cleanup = iproc_rng200_cleanup, +#if defined(CONFIG_BCM_KF_HWRNG) + priv->rng.quality = 1024, +#endif /* BCM_KF_HWRNG */ /* Register driver */ ret = devm_hwrng_register(dev, &priv->rng); @@ -214,7 +220,7 @@ return ret; } - dev_info(dev, "hwrng registered\n"); + dev_info(dev,"hwrng registered\n"); return 0; }