Skip to contentSkip to conversation

omap: Remove set_clock for usb-musb.c

PATCH In review Tony Lindgren 2 participants 4 messages Dec 29, 2009

Subsystems (4)
lore
Share & tools
lore

Tony Lindgren

author maintainer
#0 lore raw

PATCH 1/1 omap: Remove set_clock for usb-musb.c

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

Quoted 1 line

From 58c67fd38d9aa65cf35550f7b0e8c279d86afefe Mon Sep 17 00:00:00 2001

From: Tony Lindgren <[email protected]>
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.

arch/arm/mach-omap2/usb-musb.c +0 -23
index a80441d..74c40ab 100644
@@ -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
author maintainer
#1 lore raw
Quoted 2 lines · Tony Lindgren

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

Quoted 52 lines

From 58c67fd38d9aa65cf35550f7b0e8c279d86afefe Mon Sep 17 00:00:00 2001
From: Tony Lindgren <[email protected]>
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.

arch/arm/mach-omap2/usb-musb.c +0 -23
index a80441d..74c40ab 100644
@@ -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
author maintainer
#3 lore raw
Quoted 7 lines · Felipe Balbi
Quoted 2 lines · Tony Lindgren

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