aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/da8xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/da8xx.c')
-rw-r--r--drivers/usb/musb/da8xx.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 662ed34980bd..4da7492ddbdb 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -172,11 +172,7 @@ static void da8xx_musb_disable(struct musb *musb)
172 musb_writel(reg_base, DA8XX_USB_END_OF_INTR_REG, 0); 172 musb_writel(reg_base, DA8XX_USB_END_OF_INTR_REG, 0);
173} 173}
174 174
175#ifdef CONFIG_USB_MUSB_HDRC_HCD 175#define portstate(stmt) stmt
176#define portstate(stmt) stmt
177#else
178#define portstate(stmt)
179#endif
180 176
181static void da8xx_musb_set_vbus(struct musb *musb, int is_on) 177static void da8xx_musb_set_vbus(struct musb *musb, int is_on)
182{ 178{
@@ -397,21 +393,15 @@ static int da8xx_musb_set_mode(struct musb *musb, u8 musb_mode)
397 393
398 cfgchip2 &= ~CFGCHIP2_OTGMODE; 394 cfgchip2 &= ~CFGCHIP2_OTGMODE;
399 switch (musb_mode) { 395 switch (musb_mode) {
400#ifdef CONFIG_USB_MUSB_HDRC_HCD
401 case MUSB_HOST: /* Force VBUS valid, ID = 0 */ 396 case MUSB_HOST: /* Force VBUS valid, ID = 0 */
402 cfgchip2 |= CFGCHIP2_FORCE_HOST; 397 cfgchip2 |= CFGCHIP2_FORCE_HOST;
403 break; 398 break;
404#endif
405#ifdef CONFIG_USB_GADGET_MUSB_HDRC
406 case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */ 399 case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */
407 cfgchip2 |= CFGCHIP2_FORCE_DEVICE; 400 cfgchip2 |= CFGCHIP2_FORCE_DEVICE;
408 break; 401 break;
409#endif
410#ifdef CONFIG_USB_MUSB_OTG
411 case MUSB_OTG: /* Don't override the VBUS/ID comparators */ 402 case MUSB_OTG: /* Don't override the VBUS/ID comparators */
412 cfgchip2 |= CFGCHIP2_NO_OVERRIDE; 403 cfgchip2 |= CFGCHIP2_NO_OVERRIDE;
413 break; 404 break;
414#endif
415 default: 405 default:
416 dev_dbg(musb->controller, "Trying to set unsupported mode %u\n", musb_mode); 406 dev_dbg(musb->controller, "Trying to set unsupported mode %u\n", musb_mode);
417 } 407 }