diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2012-02-13 06:24:20 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-02-27 08:41:52 -0500 |
commit | 6e13c6505cdff9766d5268ffb8c972c1a2f996e6 (patch) | |
tree | e5e08928aaecfae70f5b2b904df1a30551af08d4 /drivers/usb/musb | |
parent | 136ced891ad2762dfe5ba476103e82ea2b9aff41 (diff) |
usb: otg: Convert all users to pass struct usb_otg for OTG functions
This changes the otg functions so that they receive struct
otg instead of struct usb_phy as parameter and
converts all users of these functions to pass the otg member
of their usb_phy.
Includes fixes to IMX code from Sascha Hauer.
[ balbi@ti.com : fixed a compile warning on ehci-mv.c ]
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Acked-by: Li Yang <leoli@freescale.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Reviewed-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r-- | drivers/usb/musb/musb_core.c | 2 | ||||
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 8 | ||||
-rw-r--r-- | drivers/usb/musb/omap2430.c | 8 |
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 7e9be74dba4d..88bf453e33da 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c | |||
@@ -1961,7 +1961,7 @@ 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; |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 3a1793663d91..caeaf9f96f73 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1624,7 +1624,7 @@ static int musb_gadget_wakeup(struct usb_gadget *gadget) | |||
1624 | } | 1624 | } |
1625 | 1625 | ||
1626 | spin_unlock_irqrestore(&musb->lock, flags); | 1626 | spin_unlock_irqrestore(&musb->lock, flags); |
1627 | otg_start_srp(musb->xceiv); | 1627 | otg_start_srp(musb->xceiv->otg); |
1628 | spin_lock_irqsave(&musb->lock, flags); | 1628 | spin_lock_irqsave(&musb->lock, flags); |
1629 | 1629 | ||
1630 | /* Block idling for at least 1s */ | 1630 | /* Block idling for at least 1s */ |
@@ -1915,7 +1915,7 @@ static int musb_gadget_start(struct usb_gadget *g, | |||
1915 | spin_lock_irqsave(&musb->lock, flags); | 1915 | spin_lock_irqsave(&musb->lock, flags); |
1916 | musb->is_active = 1; | 1916 | musb->is_active = 1; |
1917 | 1917 | ||
1918 | otg_set_peripheral(musb->xceiv, &musb->g); | 1918 | otg_set_peripheral(otg, &musb->g); |
1919 | musb->xceiv->state = OTG_STATE_B_IDLE; | 1919 | musb->xceiv->state = OTG_STATE_B_IDLE; |
1920 | 1920 | ||
1921 | /* | 1921 | /* |
@@ -1947,7 +1947,7 @@ static int musb_gadget_start(struct usb_gadget *g, | |||
1947 | 1947 | ||
1948 | if ((musb->xceiv->last_event == USB_EVENT_ID) | 1948 | if ((musb->xceiv->last_event == USB_EVENT_ID) |
1949 | && otg->set_vbus) | 1949 | && otg->set_vbus) |
1950 | otg_set_vbus(musb->xceiv, 1); | 1950 | otg_set_vbus(otg, 1); |
1951 | 1951 | ||
1952 | hcd->self.uses_pio_for_control = 1; | 1952 | hcd->self.uses_pio_for_control = 1; |
1953 | } | 1953 | } |
@@ -2029,7 +2029,7 @@ static int musb_gadget_stop(struct usb_gadget *g, | |||
2029 | 2029 | ||
2030 | musb->xceiv->state = OTG_STATE_UNDEFINED; | 2030 | musb->xceiv->state = OTG_STATE_UNDEFINED; |
2031 | stop_activity(musb, driver); | 2031 | stop_activity(musb, driver); |
2032 | otg_set_peripheral(musb->xceiv, NULL); | 2032 | otg_set_peripheral(musb->xceiv->otg, NULL); |
2033 | 2033 | ||
2034 | dev_dbg(musb->controller, "unregistering driver %s\n", driver->function); | 2034 | dev_dbg(musb->controller, "unregistering driver %s\n", driver->function); |
2035 | 2035 | ||
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 96a3d3763cc4..d8df60a9fc2a 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -164,8 +164,8 @@ static void omap2430_musb_set_vbus(struct musb *musb, int is_on) | |||
164 | } | 164 | } |
165 | } | 165 | } |
166 | 166 | ||
167 | if (ret && musb->xceiv->set_vbus) | 167 | if (ret && otg->set_vbus) |
168 | otg_set_vbus(musb->xceiv, 1); | 168 | otg_set_vbus(otg, 1); |
169 | } else { | 169 | } else { |
170 | musb->is_active = 1; | 170 | musb->is_active = 1; |
171 | otg->default_a = 1; | 171 | otg->default_a = 1; |
@@ -270,8 +270,8 @@ static void musb_otg_notifier_work(struct work_struct *data_notifier_work) | |||
270 | } | 270 | } |
271 | 271 | ||
272 | if (data->interface_type == MUSB_INTERFACE_UTMI) { | 272 | if (data->interface_type == MUSB_INTERFACE_UTMI) { |
273 | if (musb->xceiv->set_vbus) | 273 | if (musb->xceiv->otg->set_vbus) |
274 | otg_set_vbus(musb->xceiv, 0); | 274 | otg_set_vbus(musb->xceiv->otg, 0); |
275 | } | 275 | } |
276 | usb_phy_shutdown(musb->xceiv); | 276 | usb_phy_shutdown(musb->xceiv); |
277 | break; | 277 | break; |