Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2852f2d authored by Bin Liu's avatar Bin Liu Committed by Greg Kroah-Hartman
Browse files

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: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bcb8fd3a
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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);
		}
+0 −2
Original line number Diff line number Diff line
@@ -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);
		}
+23 −26
Original line number Diff line number Diff line
@@ -311,14 +311,12 @@ static irqreturn_t davinci_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);
		}
@@ -425,6 +423,9 @@ static int davinci_musb_init(struct musb *musb)

static int davinci_musb_exit(struct musb *musb)
{
	int	maxdelay = 30;
	u8	devctl, warn = 0;

	del_timer_sync(&musb->dev_timer);

	/* force VBUS off */
@@ -438,12 +439,9 @@ static int davinci_musb_exit(struct musb *musb)

	davinci_musb_source_power(musb, 0 /*off*/, 1);

	/* delay, to avoid problems with module reload */
	if (musb->xceiv->otg->default_a) {
		int	maxdelay = 30;
		u8	devctl, warn = 0;

		/* if there's no peripheral connected, this can take a
	/*
	 * delay, to avoid problems with module reload.
	 * if there's no peripheral connected, this can take a
	 * long time to fall, especially on EVM with huge C133.
	 */
	do {
@@ -462,7 +460,6 @@ static int davinci_musb_exit(struct musb *musb)
	/* in OTG mode, another host might be connected */
	if (devctl & MUSB_DEVCTL_VBUS)
		dev_dbg(musb->controller, "VBUS off timeout (devctl %02x)\n", devctl);
	}

	phy_off();

+2 −7
Original line number Diff line number Diff line
@@ -2352,13 +2352,8 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
		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;
	}

	switch (musb->port_mode) {
	case MUSB_HOST:
+0 −2
Original line number Diff line number Diff line
@@ -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;
		}

Loading