diff options
| -rw-r--r-- | drivers/mfd/omap-usb-host.c | 9 | ||||
| -rw-r--r-- | drivers/staging/usbip/vhci_hcd.c | 2 | ||||
| -rw-r--r-- | drivers/usb/host/ehci-omap.c | 20 | ||||
| -rw-r--r-- | drivers/usb/host/isp1760-hcd.c | 1 | ||||
| -rw-r--r-- | drivers/usb/host/xhci-hub.c | 19 | ||||
| -rw-r--r-- | drivers/usb/musb/musb_gadget.c | 6 | ||||
| -rw-r--r-- | drivers/usb/musb/omap2430.c | 2 |
7 files changed, 45 insertions, 14 deletions
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 53450f433f10..2e165117457b 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
| 26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
| 27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
| 28 | #include <linux/regulator/consumer.h> | ||
| 29 | #include <plat/usb.h> | 28 | #include <plat/usb.h> |
| 30 | 29 | ||
| 31 | #define USBHS_DRIVER_NAME "usbhs-omap" | 30 | #define USBHS_DRIVER_NAME "usbhs-omap" |
| @@ -700,8 +699,7 @@ static int usbhs_enable(struct device *dev) | |||
| 700 | dev_dbg(dev, "starting TI HSUSB Controller\n"); | 699 | dev_dbg(dev, "starting TI HSUSB Controller\n"); |
| 701 | if (!pdata) { | 700 | if (!pdata) { |
| 702 | dev_dbg(dev, "missing platform_data\n"); | 701 | dev_dbg(dev, "missing platform_data\n"); |
| 703 | ret = -ENODEV; | 702 | return -ENODEV; |
| 704 | goto end_enable; | ||
| 705 | } | 703 | } |
| 706 | 704 | ||
| 707 | spin_lock_irqsave(&omap->lock, flags); | 705 | spin_lock_irqsave(&omap->lock, flags); |
| @@ -915,7 +913,8 @@ static int usbhs_enable(struct device *dev) | |||
| 915 | 913 | ||
| 916 | end_count: | 914 | end_count: |
| 917 | omap->count++; | 915 | omap->count++; |
| 918 | goto end_enable; | 916 | spin_unlock_irqrestore(&omap->lock, flags); |
| 917 | return 0; | ||
| 919 | 918 | ||
| 920 | err_tll: | 919 | err_tll: |
| 921 | if (pdata->ehci_data->phy_reset) { | 920 | if (pdata->ehci_data->phy_reset) { |
| @@ -931,8 +930,6 @@ err_tll: | |||
| 931 | clk_disable(omap->usbhost_fs_fck); | 930 | clk_disable(omap->usbhost_fs_fck); |
| 932 | clk_disable(omap->usbhost_hs_fck); | 931 | clk_disable(omap->usbhost_hs_fck); |
| 933 | clk_disable(omap->usbhost_ick); | 932 | clk_disable(omap->usbhost_ick); |
| 934 | |||
| 935 | end_enable: | ||
| 936 | spin_unlock_irqrestore(&omap->lock, flags); | 933 | spin_unlock_irqrestore(&omap->lock, flags); |
| 937 | return ret; | 934 | return ret; |
| 938 | } | 935 | } |
diff --git a/drivers/staging/usbip/vhci_hcd.c b/drivers/staging/usbip/vhci_hcd.c index 0f02a4b12ae4..5d0caa8648e2 100644 --- a/drivers/staging/usbip/vhci_hcd.c +++ b/drivers/staging/usbip/vhci_hcd.c | |||
| @@ -1139,7 +1139,7 @@ static int vhci_hcd_probe(struct platform_device *pdev) | |||
| 1139 | usbip_uerr("create hcd failed\n"); | 1139 | usbip_uerr("create hcd failed\n"); |
| 1140 | return -ENOMEM; | 1140 | return -ENOMEM; |
| 1141 | } | 1141 | } |
| 1142 | 1142 | hcd->has_tt = 1; | |
| 1143 | 1143 | ||
| 1144 | /* this is private data for vhci_hcd */ | 1144 | /* this is private data for vhci_hcd */ |
| 1145 | the_controller = hcd_to_vhci(hcd); | 1145 | the_controller = hcd_to_vhci(hcd); |
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 7e41a95c5ceb..627f3a678759 100644 --- a/drivers/usb/host/ehci-omap.c +++ b/drivers/usb/host/ehci-omap.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/slab.h> | 40 | #include <linux/slab.h> |
| 41 | #include <linux/usb/ulpi.h> | 41 | #include <linux/usb/ulpi.h> |
| 42 | #include <plat/usb.h> | 42 | #include <plat/usb.h> |
| 43 | #include <linux/regulator/consumer.h> | ||
| 43 | 44 | ||
| 44 | /* EHCI Register Set */ | 45 | /* EHCI Register Set */ |
| 45 | #define EHCI_INSNREG04 (0xA0) | 46 | #define EHCI_INSNREG04 (0xA0) |
| @@ -118,6 +119,8 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
| 118 | struct ehci_hcd *omap_ehci; | 119 | struct ehci_hcd *omap_ehci; |
| 119 | int ret = -ENODEV; | 120 | int ret = -ENODEV; |
| 120 | int irq; | 121 | int irq; |
| 122 | int i; | ||
| 123 | char supply[7]; | ||
| 121 | 124 | ||
| 122 | if (usb_disabled()) | 125 | if (usb_disabled()) |
| 123 | return -ENODEV; | 126 | return -ENODEV; |
| @@ -158,6 +161,23 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev) | |||
| 158 | hcd->rsrc_len = resource_size(res); | 161 | hcd->rsrc_len = resource_size(res); |
| 159 | hcd->regs = regs; | 162 | hcd->regs = regs; |
| 160 | 163 | ||
| 164 | /* get ehci regulator and enable */ | ||
| 165 | for (i = 0 ; i < OMAP3_HS_USB_PORTS ; i++) { | ||
| 166 | if (pdata->port_mode[i] != OMAP_EHCI_PORT_MODE_PHY) { | ||
| 167 | pdata->regulator[i] = NULL; | ||
| 168 | continue; | ||
| 169 | } | ||
| 170 | snprintf(supply, sizeof(supply), "hsusb%d", i); | ||
| 171 | pdata->regulator[i] = regulator_get(dev, supply); | ||
| 172 | if (IS_ERR(pdata->regulator[i])) { | ||
| 173 | pdata->regulator[i] = NULL; | ||
| 174 | dev_dbg(dev, | ||
| 175 | "failed to get ehci port%d regulator\n", i); | ||
| 176 | } else { | ||
| 177 | regulator_enable(pdata->regulator[i]); | ||
| 178 | } | ||
| 179 | } | ||
| 180 | |||
| 161 | ret = omap_usbhs_enable(dev); | 181 | ret = omap_usbhs_enable(dev); |
| 162 | if (ret) { | 182 | if (ret) { |
| 163 | dev_err(dev, "failed to start usbhs with err %d\n", ret); | 183 | dev_err(dev, "failed to start usbhs with err %d\n", ret); |
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index 795345ad45e6..7b2e69aa2e98 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c | |||
| @@ -1633,6 +1633,7 @@ static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) | |||
| 1633 | ints[i].qh = NULL; | 1633 | ints[i].qh = NULL; |
| 1634 | ints[i].qtd = NULL; | 1634 | ints[i].qtd = NULL; |
| 1635 | 1635 | ||
| 1636 | urb->status = status; | ||
| 1636 | isp1760_urb_done(hcd, urb); | 1637 | isp1760_urb_done(hcd, urb); |
| 1637 | if (qtd) | 1638 | if (qtd) |
| 1638 | pe(hcd, qh, qtd); | 1639 | pe(hcd, qh, qtd); |
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c index a78f2ebd11b7..73f75d26436c 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
| @@ -777,7 +777,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd) | |||
| 777 | if (t1 != t2) | 777 | if (t1 != t2) |
| 778 | xhci_writel(xhci, t2, port_array[port_index]); | 778 | xhci_writel(xhci, t2, port_array[port_index]); |
| 779 | 779 | ||
| 780 | if (DEV_HIGHSPEED(t1)) { | 780 | if (hcd->speed != HCD_USB3) { |
| 781 | /* enable remote wake up for USB 2.0 */ | 781 | /* enable remote wake up for USB 2.0 */ |
| 782 | u32 __iomem *addr; | 782 | u32 __iomem *addr; |
| 783 | u32 tmp; | 783 | u32 tmp; |
| @@ -866,6 +866,21 @@ int xhci_bus_resume(struct usb_hcd *hcd) | |||
| 866 | temp |= PORT_LINK_STROBE | XDEV_U0; | 866 | temp |= PORT_LINK_STROBE | XDEV_U0; |
| 867 | xhci_writel(xhci, temp, port_array[port_index]); | 867 | xhci_writel(xhci, temp, port_array[port_index]); |
| 868 | } | 868 | } |
| 869 | /* wait for the port to enter U0 and report port link | ||
| 870 | * state change. | ||
| 871 | */ | ||
| 872 | spin_unlock_irqrestore(&xhci->lock, flags); | ||
| 873 | msleep(20); | ||
| 874 | spin_lock_irqsave(&xhci->lock, flags); | ||
| 875 | |||
| 876 | /* Clear PLC */ | ||
| 877 | temp = xhci_readl(xhci, port_array[port_index]); | ||
| 878 | if (temp & PORT_PLC) { | ||
| 879 | temp = xhci_port_state_to_neutral(temp); | ||
| 880 | temp |= PORT_PLC; | ||
| 881 | xhci_writel(xhci, temp, port_array[port_index]); | ||
| 882 | } | ||
| 883 | |||
| 869 | slot_id = xhci_find_slot_id_by_port(hcd, | 884 | slot_id = xhci_find_slot_id_by_port(hcd, |
| 870 | xhci, port_index + 1); | 885 | xhci, port_index + 1); |
| 871 | if (slot_id) | 886 | if (slot_id) |
| @@ -873,7 +888,7 @@ int xhci_bus_resume(struct usb_hcd *hcd) | |||
| 873 | } else | 888 | } else |
| 874 | xhci_writel(xhci, temp, port_array[port_index]); | 889 | xhci_writel(xhci, temp, port_array[port_index]); |
| 875 | 890 | ||
| 876 | if (DEV_HIGHSPEED(temp)) { | 891 | if (hcd->speed != HCD_USB3) { |
| 877 | /* disable remote wake up for USB 2.0 */ | 892 | /* disable remote wake up for USB 2.0 */ |
| 878 | u32 __iomem *addr; | 893 | u32 __iomem *addr; |
| 879 | u32 tmp; | 894 | u32 tmp; |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 6dfbf9ffd7a6..f47c20197c61 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
| @@ -1887,11 +1887,9 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver, | |||
| 1887 | otg_set_vbus(musb->xceiv, 1); | 1887 | otg_set_vbus(musb->xceiv, 1); |
| 1888 | 1888 | ||
| 1889 | hcd->self.uses_pio_for_control = 1; | 1889 | hcd->self.uses_pio_for_control = 1; |
| 1890 | |||
| 1891 | if (musb->xceiv->last_event == USB_EVENT_NONE) | ||
| 1892 | pm_runtime_put(musb->controller); | ||
| 1893 | |||
| 1894 | } | 1890 | } |
| 1891 | if (musb->xceiv->last_event == USB_EVENT_NONE) | ||
| 1892 | pm_runtime_put(musb->controller); | ||
| 1895 | 1893 | ||
| 1896 | return 0; | 1894 | return 0; |
| 1897 | 1895 | ||
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 57a27fa954b4..e9e60b6e0583 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
| @@ -270,7 +270,7 @@ static int musb_otg_notifications(struct notifier_block *nb, | |||
| 270 | DBG(4, "VBUS Disconnect\n"); | 270 | DBG(4, "VBUS Disconnect\n"); |
| 271 | 271 | ||
| 272 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | 272 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC |
| 273 | if (is_otg_enabled(musb)) | 273 | if (is_otg_enabled(musb) || is_peripheral_enabled(musb)) |
| 274 | if (musb->gadget_driver) | 274 | if (musb->gadget_driver) |
| 275 | #endif | 275 | #endif |
| 276 | { | 276 | { |
