usb: musb: remove references to default_a of struct usb_otg
Subsystems (4)
Bin Liu
maintainerPATCH 10/11 usb: musb: remove references to default_a of struct usb_otg
musb drivers do not use the otg fsm framework, so referencing to otg->default_a doesn't have any effect, so remove the references.
But tusb6010 glue driver uses it locally to control the vbus power, so keep the references in tusb6010 only.
Signed-off-by Bin Liu <[email protected]>
--- drivers/usb/musb/am35x.c | 3 --- drivers/usb/musb/da8xx.c | 2 -- drivers/usb/musb/davinci.c | 49 ++++++++++++++++++++---------------------- drivers/usb/musb/musb_core.c | 9 ++------ drivers/usb/musb/musb_dsps.c | 2 -- drivers/usb/musb/musb_gadget.c | 1 - drivers/usb/musb/musb_host.c | 1 - drivers/usb/musb/omap2430.c | 5 ----- drivers/usb/musb/sunxi.c | 2 -- drivers/usb/musb/ux500.c | 2 -- 10 files changed, 25 insertions(+), 51 deletions(-)
drivers/usb/musb/am35x.c +0 -3
@@ -201,7 +201,6 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci)struct device *dev = musb->controller;struct musb_hdrc_platform_data *plat =dev_get_platdata (dev);struct omap_musb_board_data *data = plat->board_data; -struct usb_otg *otg = musb->xceiv->otg;unsigned long flags;irqreturn_t ret =IRQ_NONE ;u32 epintr, usbintr;
@@ -264,14 +263,12 @@ static irqreturn_t am35x_musb_interrupt(int irq, void *hci)WARNING ("VBUS error workaround (delay coming)\n" ); }else if (drvvbus) {MUSB_HST_MODE (musb); - otg->default_a =1 ; musb->xceiv->otg->state =OTG_STATE_A_WAIT_VRISE ;portstate (musb->port1_status |=USB_PORT_STAT_POWER );del_timer (&musb->dev_timer); }else { musb->is_active =0 ;MUSB_DEV_MODE (musb); - otg->default_a =0 ; musb->xceiv->otg->state =OTG_STATE_B_IDLE ;portstate (musb->port1_status &= ~USB_PORT_STAT_POWER ); }
drivers/usb/musb/da8xx.c +0 -2
@@ -280,7 +280,6 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)WARNING ("VBUS error workaround (delay coming)\n" ); }else if (drvvbus) {MUSB_HST_MODE (musb); - otg->default_a =1 ; musb->xceiv->otg->state =OTG_STATE_A_WAIT_VRISE ;portstate (musb->port1_status |=USB_PORT_STAT_POWER );del_timer (&musb->dev_timer);
@@ -295,7 +294,6 @@ static irqreturn_t da8xx_musb_interrupt(int irq, void *hci)*/ musb->is_active =0 ;MUSB_DEV_MODE (musb); - otg->default_a =0 ; musb->xceiv->otg->state =OTG_STATE_B_IDLE ;portstate (musb->port1_status &= ~USB_PORT_STAT_POWER ); }
drivers/usb/musb/davinci.c +23 -26
74 lines not on this page · raw message
drivers/usb/musb/musb_core.c +2 -7
@@ -2352,13 +2352,8 @@ static void musb_deassert_reset(struct work_struct *work)musb_writeb (musb->mregs,MUSB_ULPI_BUSCONTROL , busctl); } -if (musb->xceiv->otg->default_a) { -MUSB_HST_MODE (musb); - musb->xceiv->otg->state =OTG_STATE_A_IDLE ; - }else { -MUSB_DEV_MODE (musb); - musb->xceiv->otg->state =OTG_STATE_B_IDLE ; - } +MUSB_DEV_MODE (musb); + musb->xceiv->otg->state =OTG_STATE_B_IDLE ;switch (musb->port_mode) {case MUSB_HOST :
drivers/usb/musb/musb_dsps.c +0 -2
@@ -360,13 +360,11 @@ static irqreturn_t dsps_interrupt(int irq, void *hci)WARNING ("VBUS error workaround (delay coming)\n" ); }else if (drvvbus) {MUSB_HST_MODE (musb); - musb->xceiv->otg->default_a =1 ; musb->xceiv->otg->state =OTG_STATE_A_WAIT_VRISE ;dsps_mod_timer_optional (glue); }else { musb->is_active =0 ;MUSB_DEV_MODE (musb); - musb->xceiv->otg->default_a =0 ; musb->xceiv->otg->state =OTG_STATE_B_IDLE ; }
drivers/usb/musb/musb_gadget.c +0 -1
@@ -1793,7 +1793,6 @@ int musb_gadget_setup(struct musb *musb) musb->g.speed =USB_SPEED_UNKNOWN ;MUSB_DEV_MODE (musb); - musb->xceiv->otg->default_a =0 ; musb->xceiv->otg->state =OTG_STATE_B_IDLE ;/* this "gadget" abstracts/virtualizes the controller */
drivers/usb/musb/musb_host.c +0 -1
@@ -2747,7 +2747,6 @@ int musb_host_setup(struct musb *musb, int power_budget)if (musb->port_mode ==MUSB_HOST ) {MUSB_HST_MODE (musb); - musb->xceiv->otg->default_a =1 ; musb->xceiv->otg->state =OTG_STATE_A_IDLE ; }otg_set_host (musb->xceiv->otg, &hcd->self);
drivers/usb/musb/omap2430.c +0 -5
@@ -77,7 +77,6 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)otg_set_vbus (otg,1 ); }else { musb->is_active =1 ; - otg->default_a =1 ; musb->xceiv->otg->state =OTG_STATE_A_WAIT_VRISE ; devctl |=MUSB_DEVCTL_SESSION ;MUSB_HST_MODE (musb);
@@ -89,7 +88,6 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on)* jumping right to B_IDLE... */ - otg->default_a =0 ; musb->xceiv->otg->state =OTG_STATE_B_IDLE ; devctl &= ~MUSB_DEVCTL_SESSION ;
@@ -148,14 +146,12 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)struct musb_hdrc_platform_data *pdata =dev_get_platdata (musb->controller);struct omap_musb_board_data *data = pdata->board_data; -struct usb_otg *otg = musb->xceiv->otg;pm_runtime_get_sync (musb->controller);switch (glue->status) {case MUSB_ID_GROUND :dev_dbg (musb->controller,"ID GND\n" ); - otg->default_a = true; musb->xceiv->otg->state =OTG_STATE_A_IDLE ; musb->xceiv->last_event =USB_EVENT_ID ;if (musb->gadget_driver) {
@@ -168,7 +164,6 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)case MUSB_VBUS_VALID :dev_dbg (musb->controller,"VBUS Connect\n" ); - otg->default_a = false; musb->xceiv->otg->state =OTG_STATE_B_IDLE ; musb->xceiv->last_event =USB_EVENT_VBUS ;omap_control_usb_set_mode (glue->control_otghs,USB_MODE_DEVICE );
drivers/usb/musb/sunxi.c +0 -2
@@ -105,13 +105,11 @@ static void sunxi_musb_work(struct work_struct *work) devctl =readb (musb->mregs +SUNXI_MUSB_DEVCTL );if (test_bit (SUNXI_MUSB_FL_HOSTMODE , &glue->flags)) {set_bit (SUNXI_MUSB_FL_VBUS_ON , &glue->flags); - musb->xceiv->otg->default_a =1 ; musb->xceiv->otg->state =OTG_STATE_A_WAIT_VRISE ;MUSB_HST_MODE (musb); devctl |=MUSB_DEVCTL_SESSION ; }else {clear_bit (SUNXI_MUSB_FL_VBUS_ON , &glue->flags); - musb->xceiv->otg->default_a =0 ; musb->xceiv->otg->state =OTG_STATE_B_IDLE ;MUSB_DEV_MODE (musb); devctl &= ~MUSB_DEVCTL_SESSION ;
drivers/usb/musb/ux500.c +0 -2
@@ -62,7 +62,6 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on) }else { musb->is_active =1 ; - musb->xceiv->otg->default_a =1 ; musb->xceiv->otg->state =OTG_STATE_A_WAIT_VRISE ; devctl |=MUSB_DEVCTL_SESSION ;MUSB_HST_MODE (musb);
@@ -73,7 +72,6 @@ static void ux500_musb_set_vbus(struct musb *musb, int is_on)/* NOTE: we're skipping A_WAIT_VFALL -> A_IDLE and jumping * right to B_IDLE... */ - musb->xceiv->otg->default_a =0 ; devctl &= ~MUSB_DEVCTL_SESSION ;MUSB_DEV_MODE (musb); }