diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-10 16:30:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-10 16:30:45 -0400 |
commit | 8a1629c771b1a60bc6d73394d869fe69b13200dc (patch) | |
tree | 12f68138d95b70d450ab418fdfb300ebdcd2f003 /drivers/usb | |
parent | 04aebcbb1b6dccadc8862b2765265f65a946db57 (diff) | |
parent | 693d92a1bbc9e42681c42ed190bd42b636ca876f (diff) |
Merge branch 2.6.39-rc7 into usb-linus
This was needed to resolve a conflict in:
drivers/usb/host/isp1760-hcd.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-omap.c | 20 | ||||
-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 |
4 files changed, 40 insertions, 7 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c index 3c482dc99ece..55a57c23dd0f 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/xhci-hub.c b/drivers/usb/host/xhci-hub.c index e3ddc6a95afe..a56963736018 100644 --- a/drivers/usb/host/xhci-hub.c +++ b/drivers/usb/host/xhci-hub.c | |||
@@ -844,7 +844,7 @@ int xhci_bus_suspend(struct usb_hcd *hcd) | |||
844 | if (t1 != t2) | 844 | if (t1 != t2) |
845 | xhci_writel(xhci, t2, port_array[port_index]); | 845 | xhci_writel(xhci, t2, port_array[port_index]); |
846 | 846 | ||
847 | if (DEV_HIGHSPEED(t1)) { | 847 | if (hcd->speed != HCD_USB3) { |
848 | /* enable remote wake up for USB 2.0 */ | 848 | /* enable remote wake up for USB 2.0 */ |
849 | __le32 __iomem *addr; | 849 | __le32 __iomem *addr; |
850 | u32 tmp; | 850 | u32 tmp; |
@@ -933,6 +933,21 @@ int xhci_bus_resume(struct usb_hcd *hcd) | |||
933 | temp |= PORT_LINK_STROBE | XDEV_U0; | 933 | temp |= PORT_LINK_STROBE | XDEV_U0; |
934 | xhci_writel(xhci, temp, port_array[port_index]); | 934 | xhci_writel(xhci, temp, port_array[port_index]); |
935 | } | 935 | } |
936 | /* wait for the port to enter U0 and report port link | ||
937 | * state change. | ||
938 | */ | ||
939 | spin_unlock_irqrestore(&xhci->lock, flags); | ||
940 | msleep(20); | ||
941 | spin_lock_irqsave(&xhci->lock, flags); | ||
942 | |||
943 | /* Clear PLC */ | ||
944 | temp = xhci_readl(xhci, port_array[port_index]); | ||
945 | if (temp & PORT_PLC) { | ||
946 | temp = xhci_port_state_to_neutral(temp); | ||
947 | temp |= PORT_PLC; | ||
948 | xhci_writel(xhci, temp, port_array[port_index]); | ||
949 | } | ||
950 | |||
936 | slot_id = xhci_find_slot_id_by_port(hcd, | 951 | slot_id = xhci_find_slot_id_by_port(hcd, |
937 | xhci, port_index + 1); | 952 | xhci, port_index + 1); |
938 | if (slot_id) | 953 | if (slot_id) |
@@ -940,7 +955,7 @@ int xhci_bus_resume(struct usb_hcd *hcd) | |||
940 | } else | 955 | } else |
941 | xhci_writel(xhci, temp, port_array[port_index]); | 956 | xhci_writel(xhci, temp, port_array[port_index]); |
942 | 957 | ||
943 | if (DEV_HIGHSPEED(temp)) { | 958 | if (hcd->speed != HCD_USB3) { |
944 | /* disable remote wake up for USB 2.0 */ | 959 | /* disable remote wake up for USB 2.0 */ |
945 | __le32 __iomem *addr; | 960 | __le32 __iomem *addr; |
946 | u32 tmp; | 961 | u32 tmp; |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 3d799195c8b4..cfbee4dcfc13 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1888,11 +1888,9 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver, | |||
1888 | otg_set_vbus(musb->xceiv, 1); | 1888 | otg_set_vbus(musb->xceiv, 1); |
1889 | 1889 | ||
1890 | hcd->self.uses_pio_for_control = 1; | 1890 | hcd->self.uses_pio_for_control = 1; |
1891 | |||
1892 | if (musb->xceiv->last_event == USB_EVENT_NONE) | ||
1893 | pm_runtime_put(musb->controller); | ||
1894 | |||
1895 | } | 1891 | } |
1892 | if (musb->xceiv->last_event == USB_EVENT_NONE) | ||
1893 | pm_runtime_put(musb->controller); | ||
1896 | 1894 | ||
1897 | return 0; | 1895 | return 0; |
1898 | 1896 | ||
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index d51b15adc0b0..b996fec84c29 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c | |||
@@ -271,7 +271,7 @@ static int musb_otg_notifications(struct notifier_block *nb, | |||
271 | DBG(4, "VBUS Disconnect\n"); | 271 | DBG(4, "VBUS Disconnect\n"); |
272 | 272 | ||
273 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | 273 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC |
274 | if (is_otg_enabled(musb)) | 274 | if (is_otg_enabled(musb) || is_peripheral_enabled(musb)) |
275 | if (musb->gadget_driver) | 275 | if (musb->gadget_driver) |
276 | #endif | 276 | #endif |
277 | { | 277 | { |