[PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

Subsystems: musb multipoint high speed dual-role controller, the rest, usb subsystem

STALE4954d

8 messages, 4 authors, 2013-01-17 · open the first message on its own page

[PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Fabio Baltieri <hidden>
Date: 2013-01-07 16:47:59

This patch converts the module to use clk_prepare_enable and
clk_disable_unprepare variants as required by common clock framework.

Without this the system crash during probe function.

Signed-off-by: Fabio Baltieri <redacted>
---
 drivers/usb/musb/ux500.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c
index a27ca1a..0804661 100644
--- a/drivers/usb/musb/ux500.c
+++ b/drivers/usb/musb/ux500.c
@@ -108,7 +108,7 @@ static int ux500_probe(struct platform_device *pdev)
 		goto err3;
 	}
 
-	ret = clk_enable(clk);
+	ret = clk_prepare_enable(clk);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to enable clock\n");
 		goto err4;
@@ -148,7 +148,7 @@ static int ux500_probe(struct platform_device *pdev)
 	return 0;
 
 err5:
-	clk_disable(clk);
+	clk_disable_unprepare(clk);
 
 err4:
 	clk_put(clk);
@@ -168,7 +168,7 @@ static int ux500_remove(struct platform_device *pdev)
 	struct ux500_glue	*glue = platform_get_drvdata(pdev);
 
 	platform_device_unregister(glue->musb);
-	clk_disable(glue->clk);
+	clk_disable_unprepare(glue->clk);
 	clk_put(glue->clk);
 	kfree(glue);
 
@@ -182,7 +182,7 @@ static int ux500_suspend(struct device *dev)
 	struct musb		*musb = glue_to_musb(glue);
 
 	usb_phy_set_suspend(musb->xceiv, 1);
-	clk_disable(glue->clk);
+	clk_disable_unprepare(glue->clk);
 
 	return 0;
 }
@@ -193,7 +193,7 @@ static int ux500_resume(struct device *dev)
 	struct musb		*musb = glue_to_musb(glue);
 	int			ret;
 
-	ret = clk_enable(glue->clk);
+	ret = clk_prepare_enable(glue->clk);
 	if (ret) {
 		dev_err(dev, "failed to enable clock\n");
 		return ret;
-- 
1.7.12.1

Re: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Linus Walleij <hidden>
Date: 2013-01-10 11:23:34

On Mon, Jan 7, 2013 at 5:47 PM, Fabio Baltieri
[off-list ref] wrote:
This patch converts the module to use clk_prepare_enable and
clk_disable_unprepare variants as required by common clock framework.

Without this the system crash during probe function.

Signed-off-by: Fabio Baltieri <redacted>
Acked-by: Linus Walleij <redacted>

Yours,
Linus Walleij

Re: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Fabio Baltieri <hidden>
Date: 2013-01-10 13:38:29

Hello Linus,

On Thu, Jan 10, 2013 at 12:23:32PM +0100, Linus Walleij wrote:
On Mon, Jan 7, 2013 at 5:47 PM, Fabio Baltieri
[off-list ref] wrote:
quoted
This patch converts the module to use clk_prepare_enable and
clk_disable_unprepare variants as required by common clock framework.

Without this the system crash during probe function.

Signed-off-by: Fabio Baltieri <redacted>
Acked-by: Linus Walleij <redacted>
Thanks for the ACK.  This bug was here unnoticed since 3.6 merge window,
do you think it may make sense to add this driver to u8500_defconfig?  I
can send a patch if you say so...

Thanks,
Fabio

-- 
Fabio Baltieri

Re: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Linus Walleij <hidden>
Date: 2013-01-17 10:46:32

On Thu, Jan 10, 2013 at 2:38 PM, Fabio Baltieri
[off-list ref] wrote:
On Thu, Jan 10, 2013 at 12:23:32PM +0100, Linus Walleij wrote:
quoted
On Mon, Jan 7, 2013 at 5:47 PM, Fabio Baltieri
[off-list ref] wrote:
quoted
This patch converts the module to use clk_prepare_enable and
clk_disable_unprepare variants as required by common clock framework.

Without this the system crash during probe function.

Signed-off-by: Fabio Baltieri <redacted>
Acked-by: Linus Walleij <redacted>
Thanks for the ACK.  This bug was here unnoticed since 3.6 merge window,
Then it should have Cc: stable at kernel.org..
do you think it may make sense to add this driver to u8500_defconfig?  I
can send a patch if you say so...
Yes, can you make a patch updating the defconfig and also enabling
a few other things like charging maybe? Sync with Lee.

Yours,
Linus Walleij

Re: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Felipe Balbi <hidden>
Date: 2013-01-17 10:51:22

On Thu, Jan 17, 2013 at 11:46:30AM +0100, Linus Walleij wrote:
On Thu, Jan 10, 2013 at 2:38 PM, Fabio Baltieri
[off-list ref] wrote:
quoted
On Thu, Jan 10, 2013 at 12:23:32PM +0100, Linus Walleij wrote:
quoted
On Mon, Jan 7, 2013 at 5:47 PM, Fabio Baltieri
[off-list ref] wrote:
quoted
This patch converts the module to use clk_prepare_enable and
clk_disable_unprepare variants as required by common clock framework.

Without this the system crash during probe function.

Signed-off-by: Fabio Baltieri <redacted>
Acked-by: Linus Walleij <redacted>
Thanks for the ACK.  This bug was here unnoticed since 3.6 merge window,
Then it should have Cc: stable at kernel.org..
just added to my tree.

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130117/c7c4d190/attachment.sig>

Re: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Fabio Baltieri <hidden>
Date: 2013-01-17 12:57:15

On Thu, Jan 17, 2013 at 12:51:04PM +0200, Felipe Balbi wrote:
quoted
quoted
Thanks for the ACK.  This bug was here unnoticed since 3.6 merge window,
Then it should have Cc: stable at kernel.org..
just added to my tree.
Hi Felipe, thanks for adding the stable tag to the patch, but I actually
made a bit of confusion with the versions, so I double checked and it
turns out this is really needed on v3.7 stable, not v3.6.

Will you be so kind to remove v3.6 from the stable tag from this
patch?

Thanks and sorry for the added noise!
Fabio

-- 
Fabio Baltieri

Re: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Sergei Shtylyov <hidden>
Date: 2013-01-17 13:13:06

Hello.

On 17-01-2013 14:46, Linus Walleij wrote:
quoted
quoted
[off-list ref] wrote:
quoted
quoted
quoted
This patch converts the module to use clk_prepare_enable and
clk_disable_unprepare variants as required by common clock framework.
quoted
quoted
quoted
Without this the system crash during probe function.
quoted
quoted
quoted
Signed-off-by: Fabio Baltieri <redacted>
quoted
quoted
Acked-by: Linus Walleij <redacted>
quoted
Thanks for the ACK.  This bug was here unnoticed since 3.6 merge window,
Then it should have Cc: stable at kernel.org..
    The new address is stable at vger.kernel.org.

WBR, Sergei

Re: [PATCH] usb: musb: ux500: use clk_prepare_enable and clk_disable_unprepare

From: Felipe Balbi <hidden>
Date: 2013-01-17 13:15:23

Hi,

On Thu, Jan 17, 2013 at 01:57:02PM +0100, Fabio Baltieri wrote:
On Thu, Jan 17, 2013 at 12:51:04PM +0200, Felipe Balbi wrote:
quoted
quoted
quoted
Thanks for the ACK.  This bug was here unnoticed since 3.6 merge window,
Then it should have Cc: stable at kernel.org..
just added to my tree.
Hi Felipe, thanks for adding the stable tag to the patch, but I actually
made a bit of confusion with the versions, so I double checked and it
turns out this is really needed on v3.7 stable, not v3.6.

Will you be so kind to remove v3.6 from the stable tag from this
patch?
rebasing a "stable" branch is the most annoying you can ask me to do, I
will do it this time and hope I don't break anyone tracking my branches.

Next time, please be more careful.

cheers

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130117/71363da5/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help