For SEC including a RNG block with a version greater than 4,
special initialization must occur before any descriptor can be
submitted. Not only SEC with a version greater than 5.0 need
this, but also any SEC that has RNG block version ID greater
or equal to 4.

Example platforms: BSC 9131/9132 have SEC v4.4 but RNG 4

Signed-off-by: Alex Porosanu <alexandru.poros...@freescale.com>
---
 drivers/crypto/caam/ctrl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index d5e6837..132b98a 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -305,10 +305,10 @@ static int caam_probe(struct platform_device *pdev)
        }
 
        /*
-        * RNG4 based SECs (v5+) need special initialization prior
+        * RNG4 based SECs need special initialization prior
         * to executing any descriptors
         */
-       if (of_device_is_compatible(nprop, "fsl,sec-v5.0")) {
+       if (get_rng_vid(topregs) >= 4) {
                kick_trng(pdev);
                ret = instantiate_rng(ctrlpriv->jrdev[0]);
                if (ret) {
-- 
1.7.7.6


--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to