Commit 3c9740a117d40a74412775b5d3fe2b88a7635a0e
Committed by
Greg Kroah-Hartman
1 parent
c4962e03f4
Exists in
master
and in
16 other branches
usb: hcd: move controller wakeup setting initialization to individual driver
Individual controller driver has different requirement for wakeup setting, so move it from core to itself. In order to align with current etting the default wakeup setting is enabled (except for chipidea host). Pass compile test with below commands: make O=outout/all allmodconfig make -j$CPU_NUM O=outout/all drivers/usb Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 64 changed files with 92 additions and 16 deletions Side-by-side Diff
- drivers/staging/dwc2/hcd.c
- drivers/staging/octeon-usb/octeon-hcd.c
- drivers/staging/ozwpan/ozhcd.c
- drivers/usb/c67x00/c67x00-hcd.c
- drivers/usb/core/hcd-pci.c
- drivers/usb/core/hcd.c
- drivers/usb/host/ehci-atmel.c
- drivers/usb/host/ehci-exynos.c
- drivers/usb/host/ehci-fsl.c
- drivers/usb/host/ehci-grlib.c
- drivers/usb/host/ehci-mv.c
- drivers/usb/host/ehci-mxc.c
- drivers/usb/host/ehci-octeon.c
- drivers/usb/host/ehci-omap.c
- drivers/usb/host/ehci-orion.c
- drivers/usb/host/ehci-platform.c
- drivers/usb/host/ehci-pmcmsp.c
- drivers/usb/host/ehci-ppc-of.c
- drivers/usb/host/ehci-ps3.c
- drivers/usb/host/ehci-sead3.c
- drivers/usb/host/ehci-sh.c
- drivers/usb/host/ehci-spear.c
- drivers/usb/host/ehci-tegra.c
- drivers/usb/host/ehci-tilegx.c
- drivers/usb/host/ehci-w90x900.c
- drivers/usb/host/ehci-xilinx-of.c
- drivers/usb/host/fhci-hcd.c
- drivers/usb/host/fotg210-hcd.c
- drivers/usb/host/fusbh200-hcd.c
- drivers/usb/host/hwa-hc.c
- drivers/usb/host/imx21-hcd.c
- drivers/usb/host/isp116x-hcd.c
- drivers/usb/host/isp1362-hcd.c
- drivers/usb/host/isp1760-hcd.c
- drivers/usb/host/ohci-at91.c
- drivers/usb/host/ohci-da8xx.c
- drivers/usb/host/ohci-exynos.c
- drivers/usb/host/ohci-jz4740.c
- drivers/usb/host/ohci-nxp.c
- drivers/usb/host/ohci-octeon.c
- drivers/usb/host/ohci-omap.c
- drivers/usb/host/ohci-omap3.c
- drivers/usb/host/ohci-platform.c
- drivers/usb/host/ohci-ppc-of.c
- drivers/usb/host/ohci-ps3.c
- drivers/usb/host/ohci-pxa27x.c
- drivers/usb/host/ohci-s3c2410.c
- drivers/usb/host/ohci-sa1111.c
- drivers/usb/host/ohci-sm501.c
- drivers/usb/host/ohci-spear.c
- drivers/usb/host/ohci-tilegx.c
- drivers/usb/host/ohci-tmio.c
- drivers/usb/host/oxu210hp-hcd.c
- drivers/usb/host/r8a66597-hcd.c
- drivers/usb/host/sl811-hcd.c
- drivers/usb/host/u132-hcd.c
- drivers/usb/host/uhci-grlib.c
- drivers/usb/host/uhci-platform.c
- drivers/usb/host/whci/hcd.c
- drivers/usb/host/xhci-plat.c
- drivers/usb/musb/musb_host.c
- drivers/usb/phy/phy-msm-usb.c
- drivers/usb/phy/phy-mv-usb.c
- drivers/usb/renesas_usbhs/mod_host.c
drivers/staging/dwc2/hcd.c
drivers/staging/octeon-usb/octeon-hcd.c
drivers/staging/ozwpan/ozhcd.c
drivers/usb/c67x00/c67x00-hcd.c
drivers/usb/core/hcd-pci.c
drivers/usb/core/hcd.c
... | ... | @@ -2712,12 +2712,6 @@ |
2712 | 2712 | if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) |
2713 | 2713 | usb_hcd_poll_rh_status(hcd); |
2714 | 2714 | |
2715 | - /* | |
2716 | - * Host controllers don't generate their own wakeup requests; | |
2717 | - * they only forward requests from the root hub. Therefore | |
2718 | - * controllers should always be enabled for remote wakeup. | |
2719 | - */ | |
2720 | - device_wakeup_enable(hcd->self.controller); | |
2721 | 2715 | return retval; |
2722 | 2716 | |
2723 | 2717 | error_create_attr_group: |
drivers/usb/host/ehci-atmel.c
drivers/usb/host/ehci-exynos.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-grlib.c
drivers/usb/host/ehci-mv.c
drivers/usb/host/ehci-mxc.c
drivers/usb/host/ehci-octeon.c
drivers/usb/host/ehci-omap.c
drivers/usb/host/ehci-orion.c
drivers/usb/host/ehci-platform.c
drivers/usb/host/ehci-pmcmsp.c
drivers/usb/host/ehci-ppc-of.c
drivers/usb/host/ehci-ps3.c
drivers/usb/host/ehci-sead3.c
drivers/usb/host/ehci-sh.c
drivers/usb/host/ehci-spear.c
drivers/usb/host/ehci-tegra.c
drivers/usb/host/ehci-tilegx.c
drivers/usb/host/ehci-w90x900.c
drivers/usb/host/ehci-xilinx-of.c
drivers/usb/host/fhci-hcd.c
drivers/usb/host/fotg210-hcd.c
drivers/usb/host/fusbh200-hcd.c
drivers/usb/host/hwa-hc.c
... | ... | @@ -791,6 +791,7 @@ |
791 | 791 | dev_err(dev, "Cannot add HCD: %d\n", result); |
792 | 792 | goto error_add_hcd; |
793 | 793 | } |
794 | + device_wakeup_enable(usb_hcd->self.controller); | |
794 | 795 | result = wusbhc_b_create(&hwahc->wusbhc); |
795 | 796 | if (result < 0) { |
796 | 797 | dev_err(dev, "Cannot setup phase B of WUSBHC: %d\n", result); |
drivers/usb/host/imx21-hcd.c
drivers/usb/host/isp116x-hcd.c
drivers/usb/host/isp1362-hcd.c
... | ... | @@ -2746,6 +2746,8 @@ |
2746 | 2746 | retval = usb_add_hcd(hcd, irq, irq_flags | IRQF_SHARED); |
2747 | 2747 | if (retval != 0) |
2748 | 2748 | goto err6; |
2749 | + device_wakeup_enable(hcd->self.controller); | |
2750 | + | |
2749 | 2751 | pr_info("%s, irq %d\n", hcd->product_desc, irq); |
2750 | 2752 | |
2751 | 2753 | create_debug_file(isp1362_hcd); |
drivers/usb/host/isp1760-hcd.c
drivers/usb/host/ohci-at91.c
... | ... | @@ -200,8 +200,10 @@ |
200 | 200 | at91_start_hc(pdev); |
201 | 201 | |
202 | 202 | retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED); |
203 | - if (retval == 0) | |
203 | + if (retval == 0) { | |
204 | + device_wakeup_enable(hcd->self.controller); | |
204 | 205 | return retval; |
206 | + } | |
205 | 207 | |
206 | 208 | /* Error handling */ |
207 | 209 | at91_stop_hc(pdev); |
drivers/usb/host/ohci-da8xx.c
drivers/usb/host/ohci-exynos.c
drivers/usb/host/ohci-jz4740.c
drivers/usb/host/ohci-nxp.c
... | ... | @@ -274,8 +274,10 @@ |
274 | 274 | |
275 | 275 | dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq); |
276 | 276 | ret = usb_add_hcd(hcd, irq, 0); |
277 | - if (ret == 0) | |
277 | + if (ret == 0) { | |
278 | + device_wakeup_enable(hcd->self.controller); | |
278 | 279 | return ret; |
280 | + } | |
279 | 281 | |
280 | 282 | ohci_nxp_stop_hc(); |
281 | 283 | fail_resource: |
drivers/usb/host/ohci-octeon.c
drivers/usb/host/ohci-omap.c
drivers/usb/host/ohci-omap3.c
drivers/usb/host/ohci-platform.c
drivers/usb/host/ohci-ppc-of.c
... | ... | @@ -147,8 +147,10 @@ |
147 | 147 | ohci_hcd_init(ohci); |
148 | 148 | |
149 | 149 | rv = usb_add_hcd(hcd, irq, 0); |
150 | - if (rv == 0) | |
150 | + if (rv == 0) { | |
151 | + device_wakeup_enable(hcd->self.controller); | |
151 | 152 | return 0; |
153 | + } | |
152 | 154 | |
153 | 155 | /* by now, 440epx is known to show usb_23 erratum */ |
154 | 156 | np = of_find_compatible_node(NULL, NULL, "ibm,usb-ehci-440epx"); |
drivers/usb/host/ohci-ps3.c
drivers/usb/host/ohci-pxa27x.c
... | ... | @@ -442,8 +442,10 @@ |
442 | 442 | ohci->num_ports = 3; |
443 | 443 | |
444 | 444 | retval = usb_add_hcd(hcd, irq, 0); |
445 | - if (retval == 0) | |
445 | + if (retval == 0) { | |
446 | + device_wakeup_enable(hcd->self.controller); | |
446 | 447 | return retval; |
448 | + } | |
447 | 449 | |
448 | 450 | pxa27x_stop_hc(pxa_ohci, &pdev->dev); |
449 | 451 | err3: |
drivers/usb/host/ohci-s3c2410.c
drivers/usb/host/ohci-sa1111.c
drivers/usb/host/ohci-sm501.c
drivers/usb/host/ohci-spear.c
... | ... | @@ -103,8 +103,10 @@ |
103 | 103 | ohci = hcd_to_ohci(hcd); |
104 | 104 | |
105 | 105 | retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), 0); |
106 | - if (retval == 0) | |
106 | + if (retval == 0) { | |
107 | + device_wakeup_enable(hcd->self.controller); | |
107 | 108 | return retval; |
109 | + } | |
108 | 110 | |
109 | 111 | clk_disable_unprepare(sohci_p->clk); |
110 | 112 | err_put_hcd: |
drivers/usb/host/ohci-tilegx.c
drivers/usb/host/ohci-tmio.c
drivers/usb/host/oxu210hp-hcd.c
drivers/usb/host/r8a66597-hcd.c
drivers/usb/host/sl811-hcd.c
drivers/usb/host/u132-hcd.c
drivers/usb/host/uhci-grlib.c
drivers/usb/host/uhci-platform.c
drivers/usb/host/whci/hcd.c
drivers/usb/host/xhci-plat.c
drivers/usb/musb/musb_host.c
drivers/usb/phy/phy-msm-usb.c
drivers/usb/phy/phy-mv-usb.c
... | ... | @@ -213,10 +213,12 @@ |
213 | 213 | |
214 | 214 | hcd = bus_to_hcd(otg->host); |
215 | 215 | |
216 | - if (on) | |
216 | + if (on) { | |
217 | 217 | usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); |
218 | - else | |
218 | + device_wakeup_enable(hcd->self.controller); | |
219 | + } else { | |
219 | 220 | usb_remove_hcd(hcd); |
221 | + } | |
220 | 222 | #endif /* CONFIG_USB */ |
221 | 223 | } |
222 | 224 |
drivers/usb/renesas_usbhs/mod_host.c