diff options
author | Ruchika Gupta <ruchika.gupta@freescale.com> | 2013-10-25 06:31:01 (GMT) |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-10-30 04:02:57 (GMT) |
commit | 313ea293e9c4d1eabcaddd2c0800f083b03c2a2e (patch) | |
tree | cd6e48a5aa2a1ea84895cbe1278c1318eece5cdb /drivers/crypto/caam/caamrng.c | |
parent | 0d289788247a4751b2dfa0a23960ac4de9450a94 (diff) | |
download | linux-313ea293e9c4d1eabcaddd2c0800f083b03c2a2e.tar.xz |
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c index 588ad22..4e4ed15 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); } |