lkml.org 
[lkml]   [2013]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/9] crypto: ux500/hash - Prepare clock before enabling it
Date
If we fail to prepare the ux500-hash clock before enabling it the
platform will fail to boot. Here we insure this happens.

Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Andreas Westin <andreas.westin@stericsson.com>
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/crypto/ux500/hash/hash_core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c
index 632c333..118386a 100644
--- a/drivers/crypto/ux500/hash/hash_core.c
+++ b/drivers/crypto/ux500/hash/hash_core.c
@@ -308,10 +308,10 @@ static int hash_disable_power(
device_data->restore_dev_state = true;
}

- clk_disable(device_data->clk);
+ clk_disable_unprepare(device_data->clk);
ret = regulator_disable(device_data->regulator);
if (ret)
- dev_err(dev, "[%s] regulator_disable() failed!", __func__);
+ dev_err(dev, "[%s] regulator_disable_unprepare() failed!", __func__);

device_data->power_state = false;

@@ -344,9 +344,9 @@ static int hash_enable_power(
__func__);
goto out;
}
- ret = clk_enable(device_data->clk);
+ ret = clk_prepare_enable(device_data->clk);
if (ret) {
- dev_err(dev, "[%s]: clk_enable() failed!",
+ dev_err(dev, "[%s]: clk_prepare_enable() failed!",
__func__);
ret = regulator_disable(
device_data->regulator);
--
1.7.10.4


\
 
 \ /
  Last update: 2013-04-18 12:41    [W:0.692 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site