aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Douglass <dan.douglass@freescale.com>2014-04-02 15:01:26 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:58:14 -0400
commit8812fdf2277fc6f964f2d524de1dbe7b4965eca9 (patch)
tree0e5ef602564fedb90613f4f8f1c3c3286449390f
parent275ec7fc8550dfc14ab6bb9b2ea09aa5525d00aa (diff)
ENGR00298286 arm: dts: imx6qdl: add clock to CAAM.
CAAM depends on the clock used by WEIM interface. This patch supplied by Haung Shijie corrects the issue by adding the clock as a resource for the CAAM driver. Signed-off-by: Dan Douglass <dan.douglass@freescale.com>
-rw-r--r--drivers/crypto/caam/ctrl.c12
-rw-r--r--drivers/crypto/caam/intern.h3
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 3df6f232c799..2744acecb01a 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -2,7 +2,7 @@
2 * CAAM control-plane driver backend 2 * CAAM control-plane driver backend
3 * Controller-level driver, kernel property detection, initialization 3 * Controller-level driver, kernel property detection, initialization
4 * 4 *
5 * Copyright (C) 2008-2013 Freescale Semiconductor, Inc. 5 * Copyright (C) 2008-2014 Freescale Semiconductor, Inc.
6 */ 6 */
7 7
8#include "compat.h" 8#include "compat.h"
@@ -49,6 +49,7 @@ static int caam_remove(struct platform_device *pdev)
49 clk_disable(ctrlpriv->caam_ipg); 49 clk_disable(ctrlpriv->caam_ipg);
50 clk_disable(ctrlpriv->caam_mem); 50 clk_disable(ctrlpriv->caam_mem);
51 clk_disable(ctrlpriv->caam_aclk); 51 clk_disable(ctrlpriv->caam_aclk);
52 clk_disable(ctrlpriv->caam_emi_slow);
52#endif 53#endif
53 54
54 kfree(ctrlpriv->jrdev); 55 kfree(ctrlpriv->jrdev);
@@ -321,6 +322,15 @@ static int caam_probe(struct platform_device *pdev)
321 return -ENODEV; 322 return -ENODEV;
322 } 323 }
323 324
325 ctrlpriv->caam_emi_slow = devm_clk_get(&ctrlpriv->pdev->dev,
326 "caam_emi_slow");
327 ret = clk_prepare_enable(ctrlpriv->caam_emi_slow);
328 if (ret < 0) {
329 dev_err(&pdev->dev, "can't prepare CAAM emi"
330 " slow clock: %d\n", ret);
331 return -ENODEV;
332 }
333
324 ret = clk_prepare(ctrlpriv->caam_ipg); 334 ret = clk_prepare(ctrlpriv->caam_ipg);
325 if (ret < 0) { 335 if (ret < 0) {
326 dev_err(&pdev->dev, "can't prepare CAAM ipg clock: %d\n", ret); 336 dev_err(&pdev->dev, "can't prepare CAAM ipg clock: %d\n", ret);
diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h
index 6bb12f3098fe..d544e6942d8e 100644
--- a/drivers/crypto/caam/intern.h
+++ b/drivers/crypto/caam/intern.h
@@ -2,7 +2,7 @@
2 * CAAM/SEC 4.x driver backend 2 * CAAM/SEC 4.x driver backend
3 * Private/internal definitions between modules 3 * Private/internal definitions between modules
4 * 4 *
5 * Copyright (C) 2008-2013 Freescale Semiconductor, Inc. 5 * Copyright (C) 2008-2014 Freescale Semiconductor, Inc.
6 * 6 *
7 */ 7 */
8 8
@@ -107,6 +107,7 @@ struct caam_drv_private {
107 struct clk *caam_ipg; 107 struct clk *caam_ipg;
108 struct clk *caam_mem; 108 struct clk *caam_mem;
109 struct clk *caam_aclk; 109 struct clk *caam_aclk;
110 struct clk *caam_emi_slow;
110#endif 111#endif
111 /* 112 /*
112 * debugfs entries for developer view into driver/device 113 * debugfs entries for developer view into driver/device