summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_core.c
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2012-02-13 13:24:15 +0200
committerFelipe Balbi <balbi@ti.com>2012-02-13 13:52:54 +0200
commitd445b6da8da491e025eb60576ce959f6a3a56a4f (patch)
tree06bf3afc86c3c6248a9c2d980cf359bdb008447e /drivers/usb/musb/musb_core.c
parent76eb57ec1bf3201d2f417cafa5c974e7c0b6aaf9 (diff)
downloadop-kernel-dev-d445b6da8da491e025eb60576ce959f6a3a56a4f.zip
op-kernel-dev-d445b6da8da491e025eb60576ce959f6a3a56a4f.tar.gz
usb: musb: Start using struct usb_otg
Use struct usb_otg members with OTG specific functions instead of usb_phy members. [ balbi@ti.com: added a missing change on musb_gadget.c to avoid a compile error on a later patch ] Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r--drivers/usb/musb/musb_core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index 7b7ecf6..f9ecd5e 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -414,6 +414,7 @@ void musb_hnp_stop(struct musb *musb)
static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
u8 devctl, u8 power)
{
+ struct usb_otg *otg = musb->xceiv->otg;
irqreturn_t handled = IRQ_NONE;
dev_dbg(musb->controller, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl,
@@ -626,7 +627,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
case OTG_STATE_B_PERIPHERAL:
musb_g_suspend(musb);
musb->is_active = is_otg_enabled(musb)
- && musb->xceiv->gadget->b_hnp_enable;
+ && otg->gadget->b_hnp_enable;
if (musb->is_active) {
musb->xceiv->state = OTG_STATE_B_WAIT_ACON;
dev_dbg(musb->controller, "HNP: Setting timer for b_ase0_brst\n");
@@ -643,7 +644,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb,
case OTG_STATE_A_HOST:
musb->xceiv->state = OTG_STATE_A_SUSPEND;
musb->is_active = is_otg_enabled(musb)
- && musb->xceiv->host->b_hnp_enable;
+ && otg->host->b_hnp_enable;
break;
case OTG_STATE_B_HOST:
/* Transition to B_PERIPHERAL, see 6.8.2.6 p 44 */
@@ -1965,7 +1966,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
if (is_otg_enabled(musb))
hcd->self.otg_port = 1;
- musb->xceiv->host = &hcd->self;
+ musb->xceiv->otg->host = &hcd->self;
hcd->power_budget = 2 * (plat->power ? : 250);
/* program PHY to use external vBus if required */
@@ -1984,7 +1985,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
struct usb_hcd *hcd = musb_to_hcd(musb);
MUSB_HST_MODE(musb);
- musb->xceiv->default_a = 1;
+ musb->xceiv->otg->default_a = 1;
musb->xceiv->state = OTG_STATE_A_IDLE;
status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
@@ -1999,7 +2000,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
} else /* peripheral is enabled */ {
MUSB_DEV_MODE(musb);
- musb->xceiv->default_a = 0;
+ musb->xceiv->otg->default_a = 0;
musb->xceiv->state = OTG_STATE_B_IDLE;
status = musb_gadget_setup(musb);
OpenPOWER on IntegriCloud