* [PATCH] omap: Remove set_clock for usb-musb.c
@ 2009-12-29 19:31 Tony Lindgren
2009-12-29 19:35 ` Tony Lindgren
2009-12-29 19:37 ` Felipe Balbi
0 siblings, 2 replies; 4+ messages in thread
From: Tony Lindgren @ 2009-12-29 19:31 UTC (permalink / raw)
To: Felipe Balbi; +Cc: linux-omap
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
Felipe, can you take a look at this patch? To me it seems
like it should be now OK to get rid of set_clock.
Regards,
Tony
[-- Attachment #2: musb-nuke-set-clock.patch --]
[-- Type: text/x-diff, Size: 1313 bytes --]
>From 58c67fd38d9aa65cf35550f7b0e8c279d86afefe Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Tue, 29 Dec 2009 11:26:45 -0800
Subject: [PATCH] omap: Remove set_clock for usb-musb.c
This is no longer needed because of clkdev. We are
already using clk_enable/disable directly in musb_core.c
if set_clock is NULL.
Signed-off-by: Tony Lindgren <tony@atomide.com>
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index a80441d..74c40ab 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -47,27 +47,6 @@ static struct resource musb_resources[] = {
},
};
-static int clk_on;
-
-static int musb_set_clock(struct clk *clk, int state)
-{
- if (state) {
- if (clk_on > 0)
- return -ENODEV;
-
- clk_enable(clk);
- clk_on = 1;
- } else {
- if (clk_on == 0)
- return -ENODEV;
-
- clk_disable(clk);
- clk_on = 0;
- }
-
- return 0;
-}
-
static struct musb_hdrc_eps_bits musb_eps[] = {
{ "ep1_tx", 10, },
{ "ep1_rx", 10, },
@@ -121,8 +100,6 @@ static struct musb_hdrc_platform_data musb_plat = {
#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
.mode = MUSB_PERIPHERAL,
#endif
- /* .clock is set dynamically */
- .set_clock = musb_set_clock,
.config = &musb_config,
/* REVISIT charge pump on TWL4030 can supply up to
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] omap: Remove set_clock for usb-musb.c
2009-12-29 19:31 [PATCH] omap: Remove set_clock for usb-musb.c Tony Lindgren
@ 2009-12-29 19:35 ` Tony Lindgren
2009-12-29 19:37 ` Felipe Balbi
1 sibling, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2009-12-29 19:35 UTC (permalink / raw)
To: Felipe Balbi; +Cc: linux-omap
* Tony Lindgren <tony@atomide.com> [091229 11:29]:
> Felipe, can you take a look at this patch? To me it seems
> like it should be now OK to get rid of set_clock.
Heh, never mind, looks like you already did the same patch earlier :)
Tony
> From 58c67fd38d9aa65cf35550f7b0e8c279d86afefe Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 29 Dec 2009 11:26:45 -0800
> Subject: [PATCH] omap: Remove set_clock for usb-musb.c
>
> This is no longer needed because of clkdev. We are
> already using clk_enable/disable directly in musb_core.c
> if set_clock is NULL.
>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
>
> diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
> index a80441d..74c40ab 100644
> --- a/arch/arm/mach-omap2/usb-musb.c
> +++ b/arch/arm/mach-omap2/usb-musb.c
> @@ -47,27 +47,6 @@ static struct resource musb_resources[] = {
> },
> };
>
> -static int clk_on;
> -
> -static int musb_set_clock(struct clk *clk, int state)
> -{
> - if (state) {
> - if (clk_on > 0)
> - return -ENODEV;
> -
> - clk_enable(clk);
> - clk_on = 1;
> - } else {
> - if (clk_on == 0)
> - return -ENODEV;
> -
> - clk_disable(clk);
> - clk_on = 0;
> - }
> -
> - return 0;
> -}
> -
> static struct musb_hdrc_eps_bits musb_eps[] = {
> { "ep1_tx", 10, },
> { "ep1_rx", 10, },
> @@ -121,8 +100,6 @@ static struct musb_hdrc_platform_data musb_plat = {
> #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
> .mode = MUSB_PERIPHERAL,
> #endif
> - /* .clock is set dynamically */
> - .set_clock = musb_set_clock,
> .config = &musb_config,
>
> /* REVISIT charge pump on TWL4030 can supply up to
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] omap: Remove set_clock for usb-musb.c
2009-12-29 19:31 [PATCH] omap: Remove set_clock for usb-musb.c Tony Lindgren
2009-12-29 19:35 ` Tony Lindgren
@ 2009-12-29 19:37 ` Felipe Balbi
2009-12-29 19:42 ` Tony Lindgren
1 sibling, 1 reply; 4+ messages in thread
From: Felipe Balbi @ 2009-12-29 19:37 UTC (permalink / raw)
To: Tony Lindgren; +Cc: Felipe Balbi, linux-omap
On Tue, 2009-12-29 at 11:31 -0800, Tony Lindgren wrote:
> Felipe, can you take a look at this patch? To me it seems
> like it should be now OK to get rid of set_clock.
I did that yesterday. Take a look at my git tree if you will:
http://gitorious.org/usb/usb/commits/for-tony
--
balbi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] omap: Remove set_clock for usb-musb.c
2009-12-29 19:37 ` Felipe Balbi
@ 2009-12-29 19:42 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2009-12-29 19:42 UTC (permalink / raw)
To: Felipe Balbi; +Cc: Felipe Balbi, linux-omap
* Felipe Balbi <me@felipebalbi.com> [091229 11:35]:
> On Tue, 2009-12-29 at 11:31 -0800, Tony Lindgren wrote:
> > Felipe, can you take a look at this patch? To me it seems
> > like it should be now OK to get rid of set_clock.
>
> I did that yesterday. Take a look at my git tree if you will:
>
> http://gitorious.org/usb/usb/commits/for-tony
Hehe yeah :)
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-29 19:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-29 19:31 [PATCH] omap: Remove set_clock for usb-musb.c Tony Lindgren
2009-12-29 19:35 ` Tony Lindgren
2009-12-29 19:37 ` Felipe Balbi
2009-12-29 19:42 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox