aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_virthub.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-11-24 08:46:26 -0500
committerFelipe Balbi <balbi@ti.com>2012-08-09 05:34:46 -0400
commit032ec49f5351e9cb242b1a1c367d14415043ab95 (patch)
treec23887e0302e4fa10a5ee6501a85e69bbd802475 /drivers/usb/musb/musb_virthub.c
parent4f3e8d263d34e52e75b5adfa14811467d3033d8e (diff)
usb: musb: drop useless board_mode usage
we are compiling the driver always with full OTG capabilities, so that board_mode trick becomes useless. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_virthub.c')
-rw-r--r--drivers/usb/musb/musb_virthub.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index 22ec3e379980..f70579154ded 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -81,8 +81,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
81 switch (musb->xceiv->state) { 81 switch (musb->xceiv->state) {
82 case OTG_STATE_A_HOST: 82 case OTG_STATE_A_HOST:
83 musb->xceiv->state = OTG_STATE_A_SUSPEND; 83 musb->xceiv->state = OTG_STATE_A_SUSPEND;
84 musb->is_active = is_otg_enabled(musb) 84 musb->is_active = otg->host->b_hnp_enable;
85 && otg->host->b_hnp_enable;
86 if (musb->is_active) 85 if (musb->is_active)
87 mod_timer(&musb->otg_timer, jiffies 86 mod_timer(&musb->otg_timer, jiffies
88 + msecs_to_jiffies( 87 + msecs_to_jiffies(
@@ -91,8 +90,7 @@ static void musb_port_suspend(struct musb *musb, bool do_suspend)
91 break; 90 break;
92 case OTG_STATE_B_HOST: 91 case OTG_STATE_B_HOST:
93 musb->xceiv->state = OTG_STATE_B_WAIT_ACON; 92 musb->xceiv->state = OTG_STATE_B_WAIT_ACON;
94 musb->is_active = is_otg_enabled(musb) 93 musb->is_active = otg->host->b_hnp_enable;
95 && otg->host->b_hnp_enable;
96 musb_platform_try_idle(musb, 0); 94 musb_platform_try_idle(musb, 0);
97 break; 95 break;
98 default: 96 default:
@@ -190,8 +188,7 @@ void musb_root_disconnect(struct musb *musb)
190 188
191 switch (musb->xceiv->state) { 189 switch (musb->xceiv->state) {
192 case OTG_STATE_A_SUSPEND: 190 case OTG_STATE_A_SUSPEND:
193 if (is_otg_enabled(musb) 191 if (otg->host->b_hnp_enable) {
194 && otg->host->b_hnp_enable) {
195 musb->xceiv->state = OTG_STATE_A_PERIPHERAL; 192 musb->xceiv->state = OTG_STATE_A_PERIPHERAL;
196 musb->g.is_a_peripheral = 1; 193 musb->g.is_a_peripheral = 1;
197 break; 194 break;
@@ -273,7 +270,7 @@ int musb_hub_control(
273 musb_port_suspend(musb, false); 270 musb_port_suspend(musb, false);
274 break; 271 break;
275 case USB_PORT_FEAT_POWER: 272 case USB_PORT_FEAT_POWER:
276 if (!(is_otg_enabled(musb) && hcd->self.is_b_host)) 273 if (!hcd->self.is_b_host)
277 musb_platform_set_vbus(musb, 0); 274 musb_platform_set_vbus(musb, 0);
278 break; 275 break;
279 case USB_PORT_FEAT_C_CONNECTION: 276 case USB_PORT_FEAT_C_CONNECTION:
@@ -369,7 +366,7 @@ int musb_hub_control(
369 * initialization logic, e.g. for OTG, or change any 366 * initialization logic, e.g. for OTG, or change any
370 * logic relating to VBUS power-up. 367 * logic relating to VBUS power-up.
371 */ 368 */
372 if (!(is_otg_enabled(musb) && hcd->self.is_b_host)) 369 if (!hcd->self.is_b_host)
373 musb_start(musb); 370 musb_start(musb);
374 break; 371 break;
375 case USB_PORT_FEAT_RESET: 372 case USB_PORT_FEAT_RESET: