diff options
author | Dan Douglass <dan.douglass@freescale.com> | 2014-04-02 14:01:26 -0500 |
---|---|---|
committer | Dan Douglass <dan.douglass@freescale.com> | 2014-04-02 14:26:47 -0500 |
commit | a8a6771e74f06698fa0f8c5c06f23e5787f142a2 (patch) | |
tree | 8b8569a9a797a285c7afce651ec07f34517ca824 /drivers | |
parent | 09d2fb672e250d4e6f2eb505215afe5c97ca29f7 (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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/caam/ctrl.c | 12 | ||||
-rw-r--r-- | drivers/crypto/caam/intern.h | 3 |
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 @@ * CAAM control-plane driver backend * Controller-level driver, kernel property detection, initialization * - * Copyright (C) 2008-2013 Freescale Semiconductor, Inc. + * Copyright (C) 2008-2014 Freescale Semiconductor, Inc. */ #include "compat.h" @@ -49,6 +49,7 @@ static int caam_remove(struct platform_device *pdev) clk_disable(ctrlpriv->caam_ipg); clk_disable(ctrlpriv->caam_mem); clk_disable(ctrlpriv->caam_aclk); + clk_disable(ctrlpriv->caam_emi_slow); #endif kfree(ctrlpriv->jrdev); @@ -321,6 +322,15 @@ static int caam_probe(struct platform_device *pdev) return -ENODEV; } + ctrlpriv->caam_emi_slow = devm_clk_get(&ctrlpriv->pdev->dev, + "caam_emi_slow"); + ret = clk_prepare_enable(ctrlpriv->caam_emi_slow); + if (ret < 0) { + dev_err(&pdev->dev, "can't prepare CAAM emi" + " slow clock: %d\n", ret); + return -ENODEV; + } + ret = clk_prepare(ctrlpriv->caam_ipg); if (ret < 0) { 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 @@ * CAAM/SEC 4.x driver backend * Private/internal definitions between modules * - * Copyright (C) 2008-2013 Freescale Semiconductor, Inc. + * Copyright (C) 2008-2014 Freescale Semiconductor, Inc. * */ @@ -107,6 +107,7 @@ struct caam_drv_private { struct clk *caam_ipg; struct clk *caam_mem; struct clk *caam_aclk; + struct clk *caam_emi_slow; #endif /* * debugfs entries for developer view into driver/device |