2014-01-10 11:45:21

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 8/8 v3] crypto:s5p-sss: Use clk_prepare/clk_unprepare

This patch set adds use of clk_prepare/clk_unprepare as
required by generic clock framework.

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
---
Changes since v2:
New change to fix a WARN_ON during the bootup

drivers/crypto/s5p-sss.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index 7058bb6..3db7e52 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -653,7 +653,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
return -ENOENT;
}

- clk_enable(pdata->clk);
+ clk_prepare_enable(pdata->clk);

spin_lock_init(&pdata->lock);
pdata->ioaddr = devm_ioremap(dev, res->start,
@@ -714,7 +714,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
tasklet_kill(&pdata->tasklet);

err_irq:
- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

@@ -734,7 +734,7 @@ static int s5p_aes_remove(struct platform_device *pdev)

tasklet_kill(&pdata->tasklet);

- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

--
1.7.9.5


2014-01-10 16:05:08

by Tomasz Figa

[permalink] [raw]
Subject: Re: [PATCH 8/8 v3] crypto:s5p-sss: Use clk_prepare/clk_unprepare

Hi Naveen,

On 10.01.2014 12:45, Naveen Krishna Chatradhi wrote:
> This patch set adds use of clk_prepare/clk_unprepare as
> required by generic clock framework.
>
> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
> ---
> Changes since v2:
> New change to fix a WARN_ON during the bootup
>
> drivers/crypto/s5p-sss.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)

Reviewed-by: Tomasz Figa <[email protected]>

Best regards,
Tomasz

2014-01-15 09:17:46

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 8/8 v4] crypto:s5p-sss: Use clk_prepare/clk_unprepare

This patch set adds use of clk_prepare/clk_unprepare as
required by generic clock framework.

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
---
Changes since v3:
None

drivers/crypto/s5p-sss.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index f7c66c7..870e794 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -648,7 +648,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
return -ENOENT;
}

- clk_enable(pdata->clk);
+ clk_prepare_enable(pdata->clk);

spin_lock_init(&pdata->lock);
pdata->ioaddr = devm_ioremap(dev, res->start,
@@ -711,7 +711,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
tasklet_kill(&pdata->tasklet);

err_irq:
- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

@@ -731,7 +731,7 @@ static int s5p_aes_remove(struct platform_device *pdev)

tasklet_kill(&pdata->tasklet);

- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

--
1.7.9.5

2014-01-23 10:18:47

by Naveen Krishna Ch

[permalink] [raw]
Subject: Re: [PATCH 8/8 v4] crypto:s5p-sss: Use clk_prepare/clk_unprepare

Hello All,

On 15 January 2014 14:47, Naveen Krishna Chatradhi
<[email protected]> wrote:
> This patch set adds use of clk_prepare/clk_unprepare as
> required by generic clock framework.
>
> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
> Reviewed-by: Tomasz Figa <[email protected]>
> ---
> Changes since v3:
> None
>
> drivers/crypto/s5p-sss.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
> index f7c66c7..870e794 100644
> --- a/drivers/crypto/s5p-sss.c
> +++ b/drivers/crypto/s5p-sss.c
> @@ -648,7 +648,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
> return -ENOENT;
> }
>
> - clk_enable(pdata->clk);
> + clk_prepare_enable(pdata->clk);
>
> spin_lock_init(&pdata->lock);
> pdata->ioaddr = devm_ioremap(dev, res->start,
> @@ -711,7 +711,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
> tasklet_kill(&pdata->tasklet);
>
> err_irq:
> - clk_disable(pdata->clk);
> + clk_disable_unprepare(pdata->clk);
>
> s5p_dev = NULL;
>
> @@ -731,7 +731,7 @@ static int s5p_aes_remove(struct platform_device *pdev)
>
> tasklet_kill(&pdata->tasklet);
>
> - clk_disable(pdata->clk);
> + clk_disable_unprepare(pdata->clk);
>
> s5p_dev = NULL;
>
> --
> 1.7.9.5
Any update on this patch, Please
>



--
Shine bright,
(: Nav :)

2014-01-23 10:41:33

by Sylwester Nawrocki

[permalink] [raw]
Subject: Re: [PATCH 8/8 v4] crypto:s5p-sss: Use clk_prepare/clk_unprepare

Hi,

On 23/01/14 11:18, Naveen Krishna Ch wrote:
> Hello All,
>
> On 15 January 2014 14:47, Naveen Krishna Chatradhi
> <[email protected]> wrote:
>> This patch set adds use of clk_prepare/clk_unprepare as
>> required by generic clock framework.
>>
>> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
>> Reviewed-by: Tomasz Figa <[email protected]>
>> ---
>> Changes since v3:
>> None
>>
>> drivers/crypto/s5p-sss.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
>> index f7c66c7..870e794 100644
>> --- a/drivers/crypto/s5p-sss.c
>> +++ b/drivers/crypto/s5p-sss.c
>> @@ -648,7 +648,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
>> return -ENOENT;
>> }
>>
>> - clk_enable(pdata->clk);
>> + clk_prepare_enable(pdata->clk);

How about properly checking the return value ?

--
Thanks,
Sylwester

2014-01-29 07:38:12

by Naveen Krishna Ch

[permalink] [raw]
Subject: Re: [PATCH 8/8 v4] crypto:s5p-sss: Use clk_prepare/clk_unprepare

Hello Sylwester,

On 23 January 2014 16:11, Sylwester Nawrocki <[email protected]> wrote:
> Hi,
>
> On 23/01/14 11:18, Naveen Krishna Ch wrote:
>> Hello All,
>>
>> On 15 January 2014 14:47, Naveen Krishna Chatradhi
>> <[email protected]> wrote:
>>> This patch set adds use of clk_prepare/clk_unprepare as
>>> required by generic clock framework.
>>>
>>> Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
>>> Reviewed-by: Tomasz Figa <[email protected]>
>>> ---
>>> Changes since v3:
>>> None
>>>
>>> drivers/crypto/s5p-sss.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
>>> index f7c66c7..870e794 100644
>>> --- a/drivers/crypto/s5p-sss.c
>>> +++ b/drivers/crypto/s5p-sss.c
>>> @@ -648,7 +648,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
>>> return -ENOENT;
>>> }
>>>
>>> - clk_enable(pdata->clk);
>>> + clk_prepare_enable(pdata->clk);
>
> How about properly checking the return value ?
Sure, Thanks.
>
> --
> Thanks,
> Sylwester



--
Shine bright,
(: Nav :)

2014-01-29 09:28:18

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 8/9 v5] crypto:s5p-sss: Use clk_prepare/clk_unprepare

This patch set adds use of clk_prepare/clk_unprepare as
required by generic clock framework.

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
---
Changes since v4:
Handle return value of clk_prepare_enable

Changes since v3:
None

drivers/crypto/s5p-sss.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index a890273..5bd3bd9 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -648,7 +648,11 @@ static int s5p_aes_probe(struct platform_device *pdev)
return -ENOENT;
}

- clk_enable(pdata->clk);
+ err = clk_prepare_enable(pdata->clk);
+ if (err < 0) {
+ dev_err(dev, "Enabling SSS clk failed, err %d\n", err);
+ return err;
+ }

spin_lock_init(&pdata->lock);
pdata->ioaddr = devm_ioremap(dev, res->start,
@@ -711,7 +715,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
tasklet_kill(&pdata->tasklet);

err_irq:
- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

@@ -731,7 +735,7 @@ static int s5p_aes_remove(struct platform_device *pdev)

tasklet_kill(&pdata->tasklet);

- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

--
1.7.9.5

2014-02-07 05:26:56

by Naveen Krishna Chatradhi

[permalink] [raw]
Subject: [PATCH 8/9 v6] crypto:s5p-sss: Use clk_prepare/clk_unprepare

This patch set adds use of clk_prepare/clk_unprepare as
required by generic clock framework.

Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
Reviewed-by: Tomasz Figa <[email protected]>
---
changes since v5:
None

drivers/crypto/s5p-sss.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index a890273..d35a477 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -648,7 +648,11 @@ static int s5p_aes_probe(struct platform_device *pdev)
return -ENOENT;
}

- clk_enable(pdata->clk);
+ err = clk_prepare_enable(pdata->clk);
+ if (err < 0) {
+ dev_err(dev, "Enabling SSS clk failed, err %d\n", err);
+ return err;
+ }

spin_lock_init(&pdata->lock);
pdata->ioaddr = devm_ioremap(dev, res->start,
@@ -711,7 +715,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
tasklet_kill(&pdata->tasklet);

err_irq:
- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

@@ -731,7 +735,7 @@ static int s5p_aes_remove(struct platform_device *pdev)

tasklet_kill(&pdata->tasklet);

- clk_disable(pdata->clk);
+ clk_disable_unprepare(pdata->clk);

s5p_dev = NULL;

--
1.7.9.5