diff options
Diffstat (limited to 'drivers/usb/musb/musb_core.c')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 3746fff628b..b527e9e6dba 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -131,9 +131,9 @@ static inline struct musb *dev_to_musb(struct device *dev) | |||
131 | /*-------------------------------------------------------------------------*/ | 131 | /*-------------------------------------------------------------------------*/ |
132 | 132 | ||
133 | #ifndef CONFIG_BLACKFIN | 133 | #ifndef CONFIG_BLACKFIN |
134 | static int musb_ulpi_read(struct otg_transceiver *otg, u32 offset) | 134 | static int musb_ulpi_read(struct usb_phy *phy, u32 offset) |
135 | { | 135 | { |
136 | void __iomem *addr = otg->io_priv; | 136 | void __iomem *addr = phy->io_priv; |
137 | int i = 0; | 137 | int i = 0; |
138 | u8 r; | 138 | u8 r; |
139 | u8 power; | 139 | u8 power; |
@@ -165,10 +165,9 @@ static int musb_ulpi_read(struct otg_transceiver *otg, u32 offset) | |||
165 | return musb_readb(addr, MUSB_ULPI_REG_DATA); | 165 | return musb_readb(addr, MUSB_ULPI_REG_DATA); |
166 | } | 166 | } |
167 | 167 | ||
168 | static int musb_ulpi_write(struct otg_transceiver *otg, | 168 | static int musb_ulpi_write(struct usb_phy *phy, u32 offset, u32 data) |
169 | u32 offset, u32 data) | ||
170 | { | 169 | { |
171 | void __iomem *addr = otg->io_priv; | 170 | void __iomem *addr = phy->io_priv; |
172 | int i = 0; | 171 | int i = 0; |
173 | u8 r = 0; | 172 | u8 r = 0; |
174 | u8 power; | 173 | u8 power; |
@@ -200,7 +199,7 @@ static int musb_ulpi_write(struct otg_transceiver *otg, | |||
200 | #define musb_ulpi_write NULL | 199 | #define musb_ulpi_write NULL |
201 | #endif | 200 | #endif |
202 | 201 | ||
203 | static struct otg_io_access_ops musb_ulpi_access = { | 202 | static struct usb_phy_io_ops musb_ulpi_access = { |
204 | .read = musb_ulpi_read, | 203 | .read = musb_ulpi_read, |
205 | .write = musb_ulpi_write, | 204 | .write = musb_ulpi_write, |
206 | }; | 205 | }; |
@@ -414,6 +413,7 @@ void musb_hnp_stop(struct musb *musb) | |||
414 | static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | 413 | static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, |
415 | u8 devctl, u8 power) | 414 | u8 devctl, u8 power) |
416 | { | 415 | { |
416 | struct usb_otg *otg = musb->xceiv->otg; | ||
417 | irqreturn_t handled = IRQ_NONE; | 417 | irqreturn_t handled = IRQ_NONE; |
418 | 418 | ||
419 | dev_dbg(musb->controller, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl, | 419 | dev_dbg(musb->controller, "<== Power=%02x, DevCtl=%02x, int_usb=0x%x\n", power, devctl, |
@@ -626,7 +626,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | |||
626 | case OTG_STATE_B_PERIPHERAL: | 626 | case OTG_STATE_B_PERIPHERAL: |
627 | musb_g_suspend(musb); | 627 | musb_g_suspend(musb); |
628 | musb->is_active = is_otg_enabled(musb) | 628 | musb->is_active = is_otg_enabled(musb) |
629 | && musb->xceiv->gadget->b_hnp_enable; | 629 | && otg->gadget->b_hnp_enable; |
630 | if (musb->is_active) { | 630 | if (musb->is_active) { |
631 | musb->xceiv->state = OTG_STATE_B_WAIT_ACON; | 631 | musb->xceiv->state = OTG_STATE_B_WAIT_ACON; |
632 | dev_dbg(musb->controller, "HNP: Setting timer for b_ase0_brst\n"); | 632 | dev_dbg(musb->controller, "HNP: Setting timer for b_ase0_brst\n"); |
@@ -643,7 +643,7 @@ static irqreturn_t musb_stage0_irq(struct musb *musb, u8 int_usb, | |||
643 | case OTG_STATE_A_HOST: | 643 | case OTG_STATE_A_HOST: |
644 | musb->xceiv->state = OTG_STATE_A_SUSPEND; | 644 | musb->xceiv->state = OTG_STATE_A_SUSPEND; |
645 | musb->is_active = is_otg_enabled(musb) | 645 | musb->is_active = is_otg_enabled(musb) |
646 | && musb->xceiv->host->b_hnp_enable; | 646 | && otg->host->b_hnp_enable; |
647 | break; | 647 | break; |
648 | case OTG_STATE_B_HOST: | 648 | case OTG_STATE_B_HOST: |
649 | /* Transition to B_PERIPHERAL, see 6.8.2.6 p 44 */ | 649 | /* Transition to B_PERIPHERAL, see 6.8.2.6 p 44 */ |
@@ -1961,11 +1961,11 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1961 | if (is_host_enabled(musb)) { | 1961 | if (is_host_enabled(musb)) { |
1962 | struct usb_hcd *hcd = musb_to_hcd(musb); | 1962 | struct usb_hcd *hcd = musb_to_hcd(musb); |
1963 | 1963 | ||
1964 | otg_set_host(musb->xceiv, &hcd->self); | 1964 | otg_set_host(musb->xceiv->otg, &hcd->self); |
1965 | 1965 | ||
1966 | if (is_otg_enabled(musb)) | 1966 | if (is_otg_enabled(musb)) |
1967 | hcd->self.otg_port = 1; | 1967 | hcd->self.otg_port = 1; |
1968 | musb->xceiv->host = &hcd->self; | 1968 | musb->xceiv->otg->host = &hcd->self; |
1969 | hcd->power_budget = 2 * (plat->power ? : 250); | 1969 | hcd->power_budget = 2 * (plat->power ? : 250); |
1970 | 1970 | ||
1971 | /* program PHY to use external vBus if required */ | 1971 | /* program PHY to use external vBus if required */ |
@@ -1984,7 +1984,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1984 | struct usb_hcd *hcd = musb_to_hcd(musb); | 1984 | struct usb_hcd *hcd = musb_to_hcd(musb); |
1985 | 1985 | ||
1986 | MUSB_HST_MODE(musb); | 1986 | MUSB_HST_MODE(musb); |
1987 | musb->xceiv->default_a = 1; | 1987 | musb->xceiv->otg->default_a = 1; |
1988 | musb->xceiv->state = OTG_STATE_A_IDLE; | 1988 | musb->xceiv->state = OTG_STATE_A_IDLE; |
1989 | 1989 | ||
1990 | status = usb_add_hcd(musb_to_hcd(musb), -1, 0); | 1990 | status = usb_add_hcd(musb_to_hcd(musb), -1, 0); |
@@ -1999,7 +1999,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) | |||
1999 | 1999 | ||
2000 | } else /* peripheral is enabled */ { | 2000 | } else /* peripheral is enabled */ { |
2001 | MUSB_DEV_MODE(musb); | 2001 | MUSB_DEV_MODE(musb); |
2002 | musb->xceiv->default_a = 0; | 2002 | musb->xceiv->otg->default_a = 0; |
2003 | musb->xceiv->state = OTG_STATE_B_IDLE; | 2003 | musb->xceiv->state = OTG_STATE_B_IDLE; |
2004 | 2004 | ||
2005 | status = musb_gadget_setup(musb); | 2005 | status = musb_gadget_setup(musb); |