summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/caamrng.c
diff options
context:
space:
mode:
authorRuchika Gupta <ruchika.gupta@freescale.com>2013-10-25 08:31:01 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2013-10-30 05:02:57 +0100
commit313ea293e9c4d1eabcaddd2c0800f083b03c2a2e (patch)
treecd6e48a5aa2a1ea84895cbe1278c1318eece5cdb /drivers/crypto/caam/caamrng.c
parenthwrng: msm - Add PRNG support for MSM SoC's (diff)
downloadlinux-313ea293e9c4d1eabcaddd2c0800f083b03c2a2e.tar.xz
linux-313ea293e9c4d1eabcaddd2c0800f083b03c2a2e.zip
crypto: caam - Add Platform driver for Job Ring
The SEC Job Rings are now available as individual devices. This would enable sharing of job rings between kernel and user space. Job Rings can now be dynamically bound/unbound from kernel. Changes are made in the following layers of CAAM Driver 1. Controller driver - Does basic initialization of CAAM Block. - Creates platform devices for Job Rings. (Earlier the initialization of Job ring was done by the controller driver) 2. JobRing Platform driver - Manages the platform Job Ring devices created by the controller driver Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Reviewed-by: Garg Vakul-B16394 <vakul@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/caamrng.c')
-rw-r--r--drivers/crypto/caam/caamrng.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c
index 588ad2288f82..4e4ed155c5be 100644
--- a/drivers/crypto/caam/caamrng.c
+++ b/drivers/crypto/caam/caamrng.c
@@ -279,7 +279,7 @@ static void __exit caam_rng_exit(void)
static int __init caam_rng_init(void)
{
struct device_node *dev_node;
- struct platform_device *pdev;
+ struct platform_device *pdev, *jrpdev;
struct device *ctrldev;
struct caam_drv_private *priv;
@@ -305,9 +305,10 @@ static int __init caam_rng_init(void)
if (!priv)
return -ENODEV;
- caam_init_rng(&rng_ctx, priv->jrdev[0]);
+ jrpdev = priv->jrpdev[0];
+ caam_init_rng(&rng_ctx, &jrpdev->dev);
- dev_info(priv->jrdev[0], "registering rng-caam\n");
+ dev_info(&jrpdev->dev, "registering rng-caam\n");
return hwrng_register(&caam_rng);
}