/linux-4.4.14/drivers/usb/host/ |
H A D | Makefile | 8 fhci-y := fhci-hcd.o fhci-hub.o fhci-q.o 13 xhci-hcd-y := xhci.o xhci-mem.o 14 xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o 15 xhci-hcd-y += xhci-trace.o 17 xhci-plat-hcd-y := xhci-plat.o 19 xhci-plat-hcd-y += xhci-mvebu.o 22 xhci-plat-hcd-y += xhci-rcar.o 31 obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o 45 obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o 46 obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o 47 obj-$(CONFIG_USB_ISP1362_HCD) += isp1362-hcd.o 49 obj-$(CONFIG_USB_OHCI_HCD) += ohci-hcd.o 62 obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o 64 obj-$(CONFIG_USB_XHCI_HCD) += xhci-hcd.o 66 obj-$(CONFIG_USB_XHCI_PLATFORM) += xhci-plat-hcd.o 67 obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o 69 obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o 70 obj-$(CONFIG_USB_R8A66597_HCD) += r8a66597-hcd.o 72 obj-$(CONFIG_USB_IMX21_HCD) += imx21-hcd.o 75 obj-$(CONFIG_USB_HCD_BCMA) += bcma-hcd.o 76 obj-$(CONFIG_USB_HCD_SSB) += ssb-hcd.o 77 obj-$(CONFIG_USB_FOTG210_HCD) += fotg210-hcd.o 78 obj-$(CONFIG_USB_MAX3421_HCD) += max3421-hcd.o
|
H A D | ehci-sh.c | 18 struct usb_hcd *hcd; member in struct:ehci_sh_priv 21 static int ehci_sh_reset(struct usb_hcd *hcd) ehci_sh_reset() argument 23 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_sh_reset() 25 ehci->caps = hcd->regs; ehci_sh_reset() 27 return ehci_setup(hcd); ehci_sh_reset() 83 struct usb_hcd *hcd; ehci_hcd_sh_probe() local 100 /* initialize hcd */ ehci_hcd_sh_probe() 101 hcd = usb_create_hcd(&ehci_sh_hc_driver, &pdev->dev, ehci_hcd_sh_probe() 103 if (!hcd) { ehci_hcd_sh_probe() 109 hcd->regs = devm_ioremap_resource(&pdev->dev, res); ehci_hcd_sh_probe() 110 if (IS_ERR(hcd->regs)) { ehci_hcd_sh_probe() 111 ret = PTR_ERR(hcd->regs); ehci_hcd_sh_probe() 114 hcd->rsrc_start = res->start; ehci_hcd_sh_probe() 115 hcd->rsrc_len = resource_size(res); ehci_hcd_sh_probe() 139 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); ehci_hcd_sh_probe() 141 dev_err(&pdev->dev, "Failed to add hcd"); ehci_hcd_sh_probe() 144 device_wakeup_enable(hcd->self.controller); ehci_hcd_sh_probe() 146 priv->hcd = hcd; ehci_hcd_sh_probe() 156 usb_put_hcd(hcd); ehci_hcd_sh_probe() 166 struct usb_hcd *hcd = priv->hcd; ehci_hcd_sh_remove() local 168 usb_remove_hcd(hcd); ehci_hcd_sh_remove() 169 usb_put_hcd(hcd); ehci_hcd_sh_remove() 180 struct usb_hcd *hcd = priv->hcd; ehci_hcd_sh_shutdown() local 182 if (hcd->driver->shutdown) ehci_hcd_sh_shutdown() 183 hcd->driver->shutdown(hcd); ehci_hcd_sh_shutdown()
|
H A D | ohci-ps3.c | 24 static int ps3_ohci_hc_reset(struct usb_hcd *hcd) ps3_ohci_hc_reset() argument 26 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ps3_ohci_hc_reset() 33 static int ps3_ohci_hc_start(struct usb_hcd *hcd) ps3_ohci_hc_start() argument 36 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ps3_ohci_hc_start() 48 dev_err(hcd->self.controller, "can't start %s\n", ps3_ohci_hc_start() 49 hcd->self.bus_name); ps3_ohci_hc_start() 50 ohci_stop(hcd); ps3_ohci_hc_start() 82 struct usb_hcd *hcd; ps3_ohci_probe() local 132 hcd = usb_create_hcd(&ps3_ohci_hc_driver, &dev->core, dev_name(&dev->core)); ps3_ohci_probe() 134 if (!hcd) { ps3_ohci_probe() 141 hcd->rsrc_start = dev->m_region->lpar_addr; ps3_ohci_probe() 142 hcd->rsrc_len = dev->m_region->len; ps3_ohci_probe() 144 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) ps3_ohci_probe() 148 hcd->regs = ioremap(dev->m_region->lpar_addr, dev->m_region->len); ps3_ohci_probe() 150 if (!hcd->regs) { ps3_ohci_probe() 157 dev_dbg(&dev->core, "%s:%d: hcd->rsrc_start %lxh\n", __func__, __LINE__, ps3_ohci_probe() 158 (unsigned long)hcd->rsrc_start); ps3_ohci_probe() 159 dev_dbg(&dev->core, "%s:%d: hcd->rsrc_len %lxh\n", __func__, __LINE__, ps3_ohci_probe() 160 (unsigned long)hcd->rsrc_len); ps3_ohci_probe() 161 dev_dbg(&dev->core, "%s:%d: hcd->regs %lxh\n", __func__, __LINE__, ps3_ohci_probe() 162 (unsigned long)hcd->regs); ps3_ohci_probe() 166 ps3_system_bus_set_drvdata(dev, hcd); ps3_ohci_probe() 168 result = usb_add_hcd(hcd, virq, 0); ps3_ohci_probe() 176 device_wakeup_enable(hcd->self.controller); ps3_ohci_probe() 180 iounmap(hcd->regs); ps3_ohci_probe() 182 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ps3_ohci_probe() 183 usb_put_hcd(hcd); ps3_ohci_probe() 200 struct usb_hcd *hcd = ps3_system_bus_get_drvdata(dev); ps3_ohci_remove() local 202 BUG_ON(!hcd); ps3_ohci_remove() 204 dev_dbg(&dev->core, "%s:%d: regs %p\n", __func__, __LINE__, hcd->regs); ps3_ohci_remove() 205 dev_dbg(&dev->core, "%s:%d: irq %u\n", __func__, __LINE__, hcd->irq); ps3_ohci_remove() 207 tmp = hcd->irq; ps3_ohci_remove() 209 ohci_shutdown(hcd); ps3_ohci_remove() 210 usb_remove_hcd(hcd); ps3_ohci_remove() 214 BUG_ON(!hcd->regs); ps3_ohci_remove() 215 iounmap(hcd->regs); ps3_ohci_remove() 217 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ps3_ohci_remove() 218 usb_put_hcd(hcd); ps3_ohci_remove()
|
H A D | ehci-sead3.c | 25 static int ehci_sead3_setup(struct usb_hcd *hcd) ehci_sead3_setup() argument 28 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_sead3_setup() 30 ehci->caps = hcd->regs + 0x100; ehci_sead3_setup() 37 ret = ehci_setup(hcd); ehci_sead3_setup() 97 struct usb_hcd *hcd; ehci_hcd_sead3_drv_probe() local 108 hcd = usb_create_hcd(&ehci_sead3_hc_driver, &pdev->dev, "SEAD-3"); ehci_hcd_sead3_drv_probe() 109 if (!hcd) ehci_hcd_sead3_drv_probe() 113 hcd->regs = devm_ioremap_resource(&pdev->dev, res); ehci_hcd_sead3_drv_probe() 114 if (IS_ERR(hcd->regs)) { ehci_hcd_sead3_drv_probe() 115 ret = PTR_ERR(hcd->regs); ehci_hcd_sead3_drv_probe() 118 hcd->rsrc_start = res->start; ehci_hcd_sead3_drv_probe() 119 hcd->rsrc_len = resource_size(res); ehci_hcd_sead3_drv_probe() 122 hcd->has_tt = 1; ehci_hcd_sead3_drv_probe() 124 ret = usb_add_hcd(hcd, pdev->resource[1].start, ehci_hcd_sead3_drv_probe() 127 platform_set_drvdata(pdev, hcd); ehci_hcd_sead3_drv_probe() 128 device_wakeup_enable(hcd->self.controller); ehci_hcd_sead3_drv_probe() 133 usb_put_hcd(hcd); ehci_hcd_sead3_drv_probe() 139 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_hcd_sead3_drv_remove() local 141 usb_remove_hcd(hcd); ehci_hcd_sead3_drv_remove() 142 usb_put_hcd(hcd); ehci_hcd_sead3_drv_remove() 150 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_hcd_sead3_drv_suspend() local 153 return ehci_suspend(hcd, do_wakeup); ehci_hcd_sead3_drv_suspend() 158 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_hcd_sead3_drv_resume() local 160 ehci_resume(hcd, false); ehci_hcd_sead3_drv_resume()
|
H A D | xhci-rcar.h | 15 void xhci_rcar_start(struct usb_hcd *hcd); 16 int xhci_rcar_init_quirk(struct usb_hcd *hcd); 18 static inline void xhci_rcar_start(struct usb_hcd *hcd) xhci_rcar_start() argument 22 static inline int xhci_rcar_init_quirk(struct usb_hcd *hcd) xhci_rcar_init_quirk() argument
|
H A D | uhci-platform.c | 14 static int uhci_platform_init(struct usb_hcd *hcd) uhci_platform_init() argument 16 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_platform_init() 18 uhci->rh_numports = uhci_count_ports(hcd); uhci_platform_init() 66 struct usb_hcd *hcd; uhci_hcd_platform_probe() local 83 hcd = usb_create_hcd(&uhci_platform_hc_driver, &pdev->dev, uhci_hcd_platform_probe() 85 if (!hcd) uhci_hcd_platform_probe() 89 hcd->regs = devm_ioremap_resource(&pdev->dev, res); uhci_hcd_platform_probe() 90 if (IS_ERR(hcd->regs)) { uhci_hcd_platform_probe() 91 ret = PTR_ERR(hcd->regs); uhci_hcd_platform_probe() 94 hcd->rsrc_start = res->start; uhci_hcd_platform_probe() 95 hcd->rsrc_len = resource_size(res); uhci_hcd_platform_probe() 97 uhci = hcd_to_uhci(hcd); uhci_hcd_platform_probe() 99 uhci->regs = hcd->regs; uhci_hcd_platform_probe() 101 ret = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_SHARED); uhci_hcd_platform_probe() 105 device_wakeup_enable(hcd->self.controller); uhci_hcd_platform_probe() 109 usb_put_hcd(hcd); uhci_hcd_platform_probe() 116 struct usb_hcd *hcd = platform_get_drvdata(pdev); uhci_hcd_platform_remove() local 118 usb_remove_hcd(hcd); uhci_hcd_platform_remove() 119 usb_put_hcd(hcd); uhci_hcd_platform_remove() 133 struct usb_hcd *hcd = platform_get_drvdata(op); uhci_hcd_platform_shutdown() local 135 uhci_hc_died(hcd_to_uhci(hcd)); uhci_hcd_platform_shutdown()
|
H A D | ohci-jz4740.c | 27 static inline struct jz4740_ohci_hcd *hcd_to_jz4740_hcd(struct usb_hcd *hcd) hcd_to_jz4740_hcd() argument 29 return (struct jz4740_ohci_hcd *)(hcd->hcd_priv); hcd_to_jz4740_hcd() 37 static int ohci_jz4740_start(struct usb_hcd *hcd) ohci_jz4740_start() argument 39 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_jz4740_start() 50 dev_err(hcd->self.controller, "Can not start %s", ohci_jz4740_start() 51 hcd->self.bus_name); ohci_jz4740_start() 52 ohci_stop(hcd); ohci_jz4740_start() 81 static int ohci_jz4740_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ohci_jz4740_hub_control() argument 84 struct jz4740_ohci_hcd *jz4740_ohci = hcd_to_jz4740_hcd(hcd); ohci_jz4740_hub_control() 101 return ohci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength); ohci_jz4740_hub_control() 151 struct usb_hcd *hcd; jz4740_ohci_probe() local 162 hcd = usb_create_hcd(&ohci_jz4740_hc_driver, &pdev->dev, "jz4740"); jz4740_ohci_probe() 163 if (!hcd) { jz4740_ohci_probe() 164 dev_err(&pdev->dev, "Failed to create hcd.\n"); jz4740_ohci_probe() 168 jz4740_ohci = hcd_to_jz4740_hcd(hcd); jz4740_ohci_probe() 171 hcd->regs = devm_ioremap_resource(&pdev->dev, res); jz4740_ohci_probe() 172 if (IS_ERR(hcd->regs)) { jz4740_ohci_probe() 173 ret = PTR_ERR(hcd->regs); jz4740_ohci_probe() 176 hcd->rsrc_start = res->start; jz4740_ohci_probe() 177 hcd->rsrc_len = resource_size(res); jz4740_ohci_probe() 196 platform_set_drvdata(pdev, hcd); jz4740_ohci_probe() 198 ohci_hcd_init(hcd_to_ohci(hcd)); jz4740_ohci_probe() 200 ret = usb_add_hcd(hcd, irq, 0); jz4740_ohci_probe() 202 dev_err(&pdev->dev, "Failed to add hcd: %d\n", ret); jz4740_ohci_probe() 205 device_wakeup_enable(hcd->self.controller); jz4740_ohci_probe() 215 usb_put_hcd(hcd); jz4740_ohci_probe() 222 struct usb_hcd *hcd = platform_get_drvdata(pdev); jz4740_ohci_remove() local 223 struct jz4740_ohci_hcd *jz4740_ohci = hcd_to_jz4740_hcd(hcd); jz4740_ohci_remove() 225 usb_remove_hcd(hcd); jz4740_ohci_remove() 232 usb_put_hcd(hcd); jz4740_ohci_remove()
|
H A D | ohci-sa1111.c | 45 static void dump_hci_status(struct usb_hcd *hcd, const char *label) 47 unsigned long status = sa1111_readl(hcd->regs + USB_STATUS); 58 static int ohci_sa1111_reset(struct usb_hcd *hcd) ohci_sa1111_reset() argument 60 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_sa1111_reset() 66 static int ohci_sa1111_start(struct usb_hcd *hcd) ohci_sa1111_start() argument 68 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_sa1111_start() 74 ohci_stop(hcd); ohci_sa1111_start() 182 struct usb_hcd *hcd; ohci_hcd_sa1111_probe() local 194 hcd = usb_create_hcd(&ohci_sa1111_hc_driver, &dev->dev, "sa1111"); ohci_hcd_sa1111_probe() 195 if (!hcd) ohci_hcd_sa1111_probe() 198 hcd->rsrc_start = dev->res.start; ohci_hcd_sa1111_probe() 199 hcd->rsrc_len = resource_size(&dev->res); ohci_hcd_sa1111_probe() 201 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { ohci_hcd_sa1111_probe() 207 hcd->regs = dev->mapbase; ohci_hcd_sa1111_probe() 213 ret = usb_add_hcd(hcd, dev->irq[1], 0); ohci_hcd_sa1111_probe() 215 device_wakeup_enable(hcd->self.controller); ohci_hcd_sa1111_probe() 221 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ohci_hcd_sa1111_probe() 223 usb_put_hcd(hcd); ohci_hcd_sa1111_probe() 236 struct usb_hcd *hcd = sa1111_get_drvdata(dev); ohci_hcd_sa1111_remove() local 238 usb_remove_hcd(hcd); ohci_hcd_sa1111_remove() 240 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ohci_hcd_sa1111_remove() 241 usb_put_hcd(hcd); ohci_hcd_sa1111_remove() 248 struct usb_hcd *hcd = sa1111_get_drvdata(dev); ohci_hcd_sa1111_shutdown() local 250 if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { ohci_hcd_sa1111_shutdown() 251 hcd->driver->shutdown(hcd); ohci_hcd_sa1111_shutdown()
|
H A D | ehci-w90x900.c | 21 #include <linux/usb/hcd.h> 39 struct usb_hcd *hcd; usb_w90x900_probe() local 45 hcd = usb_create_hcd(driver, &pdev->dev, "w90x900 EHCI"); usb_w90x900_probe() 46 if (!hcd) { usb_w90x900_probe() 52 hcd->regs = devm_ioremap_resource(&pdev->dev, res); usb_w90x900_probe() 53 if (IS_ERR(hcd->regs)) { usb_w90x900_probe() 54 retval = PTR_ERR(hcd->regs); usb_w90x900_probe() 57 hcd->rsrc_start = res->start; usb_w90x900_probe() 58 hcd->rsrc_len = resource_size(res); usb_w90x900_probe() 60 ehci = hcd_to_ehci(hcd); usb_w90x900_probe() 61 ehci->caps = hcd->regs; usb_w90x900_probe() 62 ehci->regs = hcd->regs + usb_w90x900_probe() 83 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); usb_w90x900_probe() 87 device_wakeup_enable(hcd->self.controller); usb_w90x900_probe() 90 usb_put_hcd(hcd); usb_w90x900_probe() 95 static void usb_w90x900_remove(struct usb_hcd *hcd, usb_w90x900_remove() argument 98 usb_remove_hcd(hcd); usb_w90x900_remove() 99 usb_put_hcd(hcd); usb_w90x900_remove() 112 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_w90x900_remove() local 114 usb_w90x900_remove(hcd, pdev); ehci_w90x900_remove()
|
H A D | ohci-tmio.c | 72 #define hcd_to_tmio(hcd) ((struct tmio_hcd *)(hcd_to_ohci(hcd) + 1)) 78 struct usb_hcd *hcd = platform_get_drvdata(dev); tmio_write_pm() local 79 struct tmio_hcd *tmio = hcd_to_tmio(hcd); tmio_write_pm() 94 struct usb_hcd *hcd = platform_get_drvdata(dev); tmio_stop_hc() local 95 struct ohci_hcd *ohci = hcd_to_ohci(hcd); tmio_stop_hc() 96 struct tmio_hcd *tmio = hcd_to_tmio(hcd); tmio_stop_hc() 119 struct usb_hcd *hcd = platform_get_drvdata(dev); tmio_start_hc() local 120 struct tmio_hcd *tmio = hcd_to_tmio(hcd); tmio_start_hc() 121 unsigned long base = hcd->rsrc_start; tmio_start_hc() 131 (u64) hcd->rsrc_start, hcd->irq); tmio_start_hc() 134 static int ohci_tmio_start(struct usb_hcd *hcd) ohci_tmio_start() argument 136 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_tmio_start() 143 dev_err(hcd->self.controller, "can't start %s\n", ohci_tmio_start() 144 hcd->self.bus_name); ohci_tmio_start() 145 ohci_stop(hcd); ohci_tmio_start() 196 struct usb_hcd *hcd; ohci_hcd_tmio_drv_probe() local 205 hcd = usb_create_hcd(&ohci_tmio_hc_driver, &dev->dev, dev_name(&dev->dev)); ohci_hcd_tmio_drv_probe() 206 if (!hcd) { ohci_hcd_tmio_drv_probe() 211 hcd->rsrc_start = regs->start; ohci_hcd_tmio_drv_probe() 212 hcd->rsrc_len = resource_size(regs); ohci_hcd_tmio_drv_probe() 214 tmio = hcd_to_tmio(hcd); ohci_hcd_tmio_drv_probe() 224 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); ohci_hcd_tmio_drv_probe() 225 if (!hcd->regs) { ohci_hcd_tmio_drv_probe() 245 ohci = hcd_to_ohci(hcd); ohci_hcd_tmio_drv_probe() 248 ret = usb_add_hcd(hcd, irq, 0); ohci_hcd_tmio_drv_probe() 252 device_wakeup_enable(hcd->self.controller); ohci_hcd_tmio_drv_probe() 256 usb_remove_hcd(hcd); ohci_hcd_tmio_drv_probe() 265 iounmap(hcd->regs); ohci_hcd_tmio_drv_probe() 269 usb_put_hcd(hcd); ohci_hcd_tmio_drv_probe() 277 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_hcd_tmio_drv_remove() local 278 struct tmio_hcd *tmio = hcd_to_tmio(hcd); ohci_hcd_tmio_drv_remove() 281 usb_remove_hcd(hcd); ohci_hcd_tmio_drv_remove() 286 iounmap(hcd->regs); ohci_hcd_tmio_drv_remove() 288 usb_put_hcd(hcd); ohci_hcd_tmio_drv_remove() 297 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_hcd_tmio_drv_suspend() local 298 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_hcd_tmio_drv_suspend() 299 struct tmio_hcd *tmio = hcd_to_tmio(hcd); ohci_hcd_tmio_drv_suspend() 327 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_hcd_tmio_drv_resume() local 328 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_hcd_tmio_drv_resume() 329 struct tmio_hcd *tmio = hcd_to_tmio(hcd); ohci_hcd_tmio_drv_resume() 354 ohci_resume(hcd, false); ohci_hcd_tmio_drv_resume()
|
H A D | ehci-atmel.c | 23 #include <linux/usb/hcd.h> 71 struct usb_hcd *hcd = platform_get_drvdata(pdev); atmel_start_ehci() local 72 struct atmel_ehci_priv *atmel_ehci = hcd_to_atmel_ehci_priv(hcd); atmel_start_ehci() 80 struct usb_hcd *hcd = platform_get_drvdata(pdev); atmel_stop_ehci() local 81 struct atmel_ehci_priv *atmel_ehci = hcd_to_atmel_ehci_priv(hcd); atmel_stop_ehci() 91 struct usb_hcd *hcd; ehci_atmel_drv_probe() local 121 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); ehci_atmel_drv_probe() 122 if (!hcd) { ehci_atmel_drv_probe() 126 atmel_ehci = hcd_to_atmel_ehci_priv(hcd); ehci_atmel_drv_probe() 129 hcd->regs = devm_ioremap_resource(&pdev->dev, res); ehci_atmel_drv_probe() 130 if (IS_ERR(hcd->regs)) { ehci_atmel_drv_probe() 131 retval = PTR_ERR(hcd->regs); ehci_atmel_drv_probe() 135 hcd->rsrc_start = res->start; ehci_atmel_drv_probe() 136 hcd->rsrc_len = resource_size(res); ehci_atmel_drv_probe() 152 ehci = hcd_to_ehci(hcd); ehci_atmel_drv_probe() 154 ehci->caps = hcd->regs; ehci_atmel_drv_probe() 158 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); ehci_atmel_drv_probe() 161 device_wakeup_enable(hcd->self.controller); ehci_atmel_drv_probe() 168 usb_put_hcd(hcd); ehci_atmel_drv_probe() 178 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_atmel_drv_remove() local 180 usb_remove_hcd(hcd); ehci_atmel_drv_remove() 181 usb_put_hcd(hcd); ehci_atmel_drv_remove() 191 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_atmel_drv_suspend() local 192 struct atmel_ehci_priv *atmel_ehci = hcd_to_atmel_ehci_priv(hcd); ehci_atmel_drv_suspend() 195 ret = ehci_suspend(hcd, false); ehci_atmel_drv_suspend() 205 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_atmel_drv_resume() local 206 struct atmel_ehci_priv *atmel_ehci = hcd_to_atmel_ehci_priv(hcd); ehci_atmel_drv_resume() 209 return ehci_resume(hcd, false); ehci_atmel_drv_resume()
|
H A D | ohci-spear.c | 23 #include <linux/usb/hcd.h> 34 #define to_spear_ohci(hcd) (struct spear_ohci *)(hcd_to_ohci(hcd)->priv) 42 struct usb_hcd *hcd = NULL; spear_ohci_hcd_drv_probe() local 70 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); spear_ohci_hcd_drv_probe() 71 if (!hcd) { spear_ohci_hcd_drv_probe() 77 hcd->regs = devm_ioremap_resource(&pdev->dev, res); spear_ohci_hcd_drv_probe() 78 if (IS_ERR(hcd->regs)) { spear_ohci_hcd_drv_probe() 79 retval = PTR_ERR(hcd->regs); spear_ohci_hcd_drv_probe() 83 hcd->rsrc_start = pdev->resource[0].start; spear_ohci_hcd_drv_probe() 84 hcd->rsrc_len = resource_size(res); spear_ohci_hcd_drv_probe() 86 sohci_p = to_spear_ohci(hcd); spear_ohci_hcd_drv_probe() 91 ohci = hcd_to_ohci(hcd); spear_ohci_hcd_drv_probe() 93 retval = usb_add_hcd(hcd, platform_get_irq(pdev, 0), 0); spear_ohci_hcd_drv_probe() 95 device_wakeup_enable(hcd->self.controller); spear_ohci_hcd_drv_probe() 101 usb_put_hcd(hcd); spear_ohci_hcd_drv_probe() 110 struct usb_hcd *hcd = platform_get_drvdata(pdev); spear_ohci_hcd_drv_remove() local 111 struct spear_ohci *sohci_p = to_spear_ohci(hcd); spear_ohci_hcd_drv_remove() 113 usb_remove_hcd(hcd); spear_ohci_hcd_drv_remove() 117 usb_put_hcd(hcd); spear_ohci_hcd_drv_remove() 125 struct usb_hcd *hcd = platform_get_drvdata(pdev); spear_ohci_hcd_drv_suspend() local 126 struct ohci_hcd *ohci = hcd_to_ohci(hcd); spear_ohci_hcd_drv_suspend() 127 struct spear_ohci *sohci_p = to_spear_ohci(hcd); spear_ohci_hcd_drv_suspend() 135 ret = ohci_suspend(hcd, do_wakeup); spear_ohci_hcd_drv_suspend() 146 struct usb_hcd *hcd = platform_get_drvdata(dev); spear_ohci_hcd_drv_resume() local 147 struct ohci_hcd *ohci = hcd_to_ohci(hcd); spear_ohci_hcd_drv_resume() 148 struct spear_ohci *sohci_p = to_spear_ohci(hcd); spear_ohci_hcd_drv_resume() 155 ohci_resume(hcd, false); spear_ohci_hcd_drv_resume()
|
H A D | ehci-msm.c | 5 * Partly derived from ehci-fsl.c and ehci-hcd.c 35 #include <linux/usb/hcd.h> 39 #define MSM_USB_BASE (hcd->regs) 46 static int ehci_msm_reset(struct usb_hcd *hcd) ehci_msm_reset() argument 48 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_msm_reset() 52 hcd->has_tt = 1; ehci_msm_reset() 54 retval = ehci_setup(hcd); ehci_msm_reset() 70 struct usb_hcd *hcd; ehci_msm_probe() local 77 hcd = usb_create_hcd(&msm_hc_driver, &pdev->dev, dev_name(&pdev->dev)); ehci_msm_probe() 78 if (!hcd) { ehci_msm_probe() 88 hcd->irq = ret; ehci_msm_probe() 97 hcd->rsrc_start = res->start; ehci_msm_probe() 98 hcd->rsrc_len = resource_size(res); ehci_msm_probe() 99 hcd->regs = devm_ioremap(&pdev->dev, hcd->rsrc_start, hcd->rsrc_len); ehci_msm_probe() 100 if (!hcd->regs) { ehci_msm_probe() 122 ret = otg_set_host(phy->otg, &hcd->self); ehci_msm_probe() 128 hcd->usb_phy = phy; ehci_msm_probe() 142 usb_put_hcd(hcd); ehci_msm_probe() 149 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_msm_remove() local 155 otg_set_host(hcd->usb_phy->otg, NULL); ehci_msm_remove() 159 usb_put_hcd(hcd); ehci_msm_remove() 167 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_msm_pm_suspend() local 172 return ehci_suspend(hcd, do_wakeup); ehci_msm_pm_suspend() 177 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_msm_pm_resume() local 180 ehci_resume(hcd, false); ehci_msm_pm_resume()
|
H A D | xhci-plat.c | 30 static int xhci_plat_setup(struct usb_hcd *hcd); 31 static int xhci_plat_start(struct usb_hcd *hcd); 50 static int xhci_plat_setup(struct usb_hcd *hcd) xhci_plat_setup() argument 52 struct device_node *of_node = hcd->self.controller->of_node; xhci_plat_setup() 57 ret = xhci_rcar_init_quirk(hcd); xhci_plat_setup() 62 return xhci_gen_setup(hcd, xhci_plat_quirks); xhci_plat_setup() 65 static int xhci_plat_start(struct usb_hcd *hcd) xhci_plat_start() argument 67 struct device_node *of_node = hcd->self.controller->of_node; xhci_plat_start() 71 xhci_rcar_start(hcd); xhci_plat_start() 73 return xhci_run(hcd); xhci_plat_start() 83 struct usb_hcd *hcd; xhci_plat_probe() local 112 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); xhci_plat_probe() 113 if (!hcd) xhci_plat_probe() 117 hcd->regs = devm_ioremap_resource(&pdev->dev, res); xhci_plat_probe() 118 if (IS_ERR(hcd->regs)) { xhci_plat_probe() 119 ret = PTR_ERR(hcd->regs); xhci_plat_probe() 123 hcd->rsrc_start = res->start; xhci_plat_probe() 124 hcd->rsrc_len = resource_size(res); xhci_plat_probe() 146 device_wakeup_enable(hcd->self.controller); xhci_plat_probe() 148 xhci = hcd_to_xhci(hcd); xhci_plat_probe() 150 xhci->main_hcd = hcd; xhci_plat_probe() 152 dev_name(&pdev->dev), hcd); xhci_plat_probe() 165 hcd->usb_phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); xhci_plat_probe() 166 if (IS_ERR(hcd->usb_phy)) { xhci_plat_probe() 167 ret = PTR_ERR(hcd->usb_phy); xhci_plat_probe() 170 hcd->usb_phy = NULL; xhci_plat_probe() 172 ret = usb_phy_init(hcd->usb_phy); xhci_plat_probe() 177 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); xhci_plat_probe() 189 usb_remove_hcd(hcd); xhci_plat_probe() 192 usb_phy_shutdown(hcd->usb_phy); xhci_plat_probe() 202 usb_put_hcd(hcd); xhci_plat_probe() 209 struct usb_hcd *hcd = platform_get_drvdata(dev); xhci_plat_remove() local 210 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_plat_remove() 214 usb_phy_shutdown(hcd->usb_phy); xhci_plat_remove() 216 usb_remove_hcd(hcd); xhci_plat_remove() 221 usb_put_hcd(hcd); xhci_plat_remove() 229 struct usb_hcd *hcd = dev_get_drvdata(dev); xhci_plat_suspend() local 230 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_plat_suspend() 245 struct usb_hcd *hcd = dev_get_drvdata(dev); xhci_plat_resume() local 246 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_plat_resume() 283 .name = "xhci-hcd", 289 MODULE_ALIAS("platform:xhci-hcd");
|
H A D | ohci-omap.c | 29 #include <linux/usb/hcd.h> 178 struct usb_hcd *hcd = ohci_to_hcd(ohci); start_hnp() local 179 const unsigned port = hcd->self.otg_port - 1; start_hnp() 183 otg_start_hnp(hcd->usb_phy->otg); start_hnp() 186 hcd->usb_phy->otg->state = OTG_STATE_A_SUSPEND; start_hnp() 198 static int ohci_omap_reset(struct usb_hcd *hcd) ohci_omap_reset() argument 200 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_omap_reset() 201 struct omap_usb_config *config = dev_get_platdata(hcd->self.controller); ohci_omap_reset() 205 dev_dbg(hcd->self.controller, "starting USB Controller\n"); ohci_omap_reset() 208 hcd->self.otg_port = config->otg; ohci_omap_reset() 210 hcd->power_budget = 8; ohci_omap_reset() 223 hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2); ohci_omap_reset() 224 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { ohci_omap_reset() 225 int status = otg_set_host(hcd->usb_phy->otg, ohci_omap_reset() 227 dev_dbg(hcd->self.controller, "init %s phy, status %d\n", ohci_omap_reset() 228 hcd->usb_phy->label, status); ohci_omap_reset() 230 usb_put_phy(hcd->usb_phy); ohci_omap_reset() 234 dev_err(hcd->self.controller, "can't find phy\n"); ohci_omap_reset() 248 ret = ohci_setup(hcd); ohci_omap_reset() 311 struct usb_hcd *hcd = 0; usb_hcd_omap_probe() local 340 hcd = usb_create_hcd (driver, &pdev->dev, dev_name(&pdev->dev)); usb_hcd_omap_probe() 341 if (!hcd) { usb_hcd_omap_probe() 345 hcd->rsrc_start = pdev->resource[0].start; usb_hcd_omap_probe() 346 hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; usb_hcd_omap_probe() 348 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { usb_hcd_omap_probe() 354 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_omap_probe() 355 if (!hcd->regs) { usb_hcd_omap_probe() 366 retval = usb_add_hcd(hcd, irq, 0); usb_hcd_omap_probe() 370 device_wakeup_enable(hcd->self.controller); usb_hcd_omap_probe() 373 iounmap(hcd->regs); usb_hcd_omap_probe() 375 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_omap_probe() 377 usb_put_hcd(hcd); usb_hcd_omap_probe() 397 usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev) usb_hcd_omap_remove() argument 399 dev_dbg(hcd->self.controller, "stopping USB Controller\n"); usb_hcd_omap_remove() 400 usb_remove_hcd(hcd); usb_hcd_omap_remove() 402 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { usb_hcd_omap_remove() 403 (void) otg_set_host(hcd->usb_phy->otg, 0); usb_hcd_omap_remove() 404 usb_put_phy(hcd->usb_phy); usb_hcd_omap_remove() 408 iounmap(hcd->regs); usb_hcd_omap_remove() 409 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_omap_remove() 410 usb_put_hcd(hcd); usb_hcd_omap_remove() 424 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_hcd_omap_drv_remove() local 426 usb_hcd_omap_remove(hcd, dev); ohci_hcd_omap_drv_remove() 437 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_omap_suspend() local 438 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_omap_suspend() 446 ret = ohci_suspend(hcd, do_wakeup); ohci_omap_suspend() 456 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_omap_resume() local 457 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_omap_resume() 464 ohci_resume(hcd, false); ohci_omap_resume()
|
H A D | ehci-spear.c | 24 #include <linux/usb/hcd.h> 36 #define to_spear_ehci(hcd) (struct spear_ehci *)(hcd_to_ehci(hcd)->priv) 43 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_spear_drv_suspend() local 46 return ehci_suspend(hcd, do_wakeup); ehci_spear_drv_suspend() 51 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_spear_drv_resume() local 53 ehci_resume(hcd, false); ehci_spear_drv_resume() 63 struct usb_hcd *hcd ; spear_ehci_hcd_drv_probe() local 95 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); spear_ehci_hcd_drv_probe() 96 if (!hcd) { spear_ehci_hcd_drv_probe() 102 hcd->regs = devm_ioremap_resource(&pdev->dev, res); spear_ehci_hcd_drv_probe() 103 if (IS_ERR(hcd->regs)) { spear_ehci_hcd_drv_probe() 104 retval = PTR_ERR(hcd->regs); spear_ehci_hcd_drv_probe() 107 hcd->rsrc_start = res->start; spear_ehci_hcd_drv_probe() 108 hcd->rsrc_len = resource_size(res); spear_ehci_hcd_drv_probe() 110 sehci = to_spear_ehci(hcd); spear_ehci_hcd_drv_probe() 114 hcd_to_ehci(hcd)->caps = hcd->regs; spear_ehci_hcd_drv_probe() 117 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); spear_ehci_hcd_drv_probe() 121 device_wakeup_enable(hcd->self.controller); spear_ehci_hcd_drv_probe() 127 usb_put_hcd(hcd); spear_ehci_hcd_drv_probe() 136 struct usb_hcd *hcd = platform_get_drvdata(pdev); spear_ehci_hcd_drv_remove() local 137 struct spear_ehci *sehci = to_spear_ehci(hcd); spear_ehci_hcd_drv_remove() 139 usb_remove_hcd(hcd); spear_ehci_hcd_drv_remove() 143 usb_put_hcd(hcd); spear_ehci_hcd_drv_remove()
|
H A D | ohci-s3c2410.c | 29 #include <linux/usb/hcd.h> 36 /* clock device associated with the hcd */ 52 static struct s3c2410_hcd_info *to_s3c2410_info(struct usb_hcd *hcd) to_s3c2410_info() argument 54 return dev_get_platdata(hcd->self.controller); to_s3c2410_info() 57 static void s3c2410_start_hc(struct platform_device *dev, struct usb_hcd *hcd) s3c2410_start_hc() argument 69 info->hcd = hcd; s3c2410_start_hc() 85 info->hcd = NULL; s3c2410_stop_hc() 102 ohci_s3c2410_hub_status_data(struct usb_hcd *hcd, char *buf) ohci_s3c2410_hub_status_data() argument 104 struct s3c2410_hcd_info *info = to_s3c2410_info(hcd); ohci_s3c2410_hub_status_data() 109 orig = ohci_hub_status_data(hcd, buf); ohci_s3c2410_hub_status_data() 121 dev_dbg(hcd->self.controller, ohci_s3c2410_hub_status_data() 160 struct usb_hcd *hcd, ohci_s3c2410_hub_control() 167 struct s3c2410_hcd_info *info = to_s3c2410_info(hcd); ohci_s3c2410_hub_control() 172 dev_dbg(hcd->self.controller, ohci_s3c2410_hub_control() 174 hcd, typeReq, wValue, wIndex, buf, wLength); ohci_s3c2410_hub_control() 180 ret = ohci_hub_control(hcd, typeReq, wValue, ohci_s3c2410_hub_control() 190 dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n"); ohci_s3c2410_hub_control() 199 dev_dbg(hcd->self.controller, ohci_s3c2410_hub_control() 210 dev_dbg(hcd->self.controller, ohci_s3c2410_hub_control() 219 dev_dbg(hcd->self.controller, ohci_s3c2410_hub_control() 230 ret = ohci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength); ohci_s3c2410_hub_control() 244 dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n", ohci_s3c2410_hub_control() 262 dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n", ohci_s3c2410_hub_control() 270 dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex); ohci_s3c2410_hub_control() 293 struct usb_hcd *hcd; s3c2410_hcd_oc() local 301 hcd = info->hcd; s3c2410_hcd_oc() 335 usb_hcd_s3c2410_remove(struct usb_hcd *hcd, struct platform_device *dev) usb_hcd_s3c2410_remove() argument 337 usb_remove_hcd(hcd); usb_hcd_s3c2410_remove() 339 usb_put_hcd(hcd); usb_hcd_s3c2410_remove() 354 struct usb_hcd *hcd = NULL; usb_hcd_s3c2410_probe() local 361 hcd = usb_create_hcd(driver, &dev->dev, "s3c24xx"); usb_hcd_s3c2410_probe() 362 if (hcd == NULL) usb_hcd_s3c2410_probe() 365 hcd->rsrc_start = dev->resource[0].start; usb_hcd_s3c2410_probe() 366 hcd->rsrc_len = resource_size(&dev->resource[0]); usb_hcd_s3c2410_probe() 368 hcd->regs = devm_ioremap_resource(&dev->dev, &dev->resource[0]); usb_hcd_s3c2410_probe() 369 if (IS_ERR(hcd->regs)) { usb_hcd_s3c2410_probe() 370 retval = PTR_ERR(hcd->regs); usb_hcd_s3c2410_probe() 388 s3c2410_start_hc(dev, hcd); usb_hcd_s3c2410_probe() 390 retval = usb_add_hcd(hcd, dev->resource[1].start, 0); usb_hcd_s3c2410_probe() 394 device_wakeup_enable(hcd->self.controller); usb_hcd_s3c2410_probe() 401 usb_put_hcd(hcd); usb_hcd_s3c2410_probe() 416 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_hcd_s3c2410_drv_remove() local 418 usb_hcd_s3c2410_remove(hcd, pdev); ohci_hcd_s3c2410_drv_remove() 425 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_hcd_s3c2410_drv_suspend() local 430 rc = ohci_suspend(hcd, do_wakeup); ohci_hcd_s3c2410_drv_suspend() 441 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_hcd_s3c2410_drv_resume() local 444 s3c2410_start_hc(pdev, hcd); ohci_hcd_s3c2410_drv_resume() 446 ohci_resume(hcd, false); ohci_hcd_s3c2410_drv_resume() 159 ohci_s3c2410_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength) ohci_s3c2410_hub_control() argument
|
H A D | ehci-ps3.c | 52 static int ps3_ehci_hc_reset(struct usb_hcd *hcd) ps3_ehci_hc_reset() argument 55 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ps3_ehci_hc_reset() 58 ehci->caps = hcd->regs; ps3_ehci_hc_reset() 60 result = ehci_setup(hcd); ps3_ehci_hc_reset() 99 struct usb_hcd *hcd; ps3_ehci_probe() local 148 hcd = usb_create_hcd(&ps3_ehci_hc_driver, &dev->core, dev_name(&dev->core)); ps3_ehci_probe() 150 if (!hcd) { ps3_ehci_probe() 157 hcd->rsrc_start = dev->m_region->lpar_addr; ps3_ehci_probe() 158 hcd->rsrc_len = dev->m_region->len; ps3_ehci_probe() 160 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) ps3_ehci_probe() 164 hcd->regs = ioremap(dev->m_region->lpar_addr, dev->m_region->len); ps3_ehci_probe() 166 if (!hcd->regs) { ps3_ehci_probe() 173 dev_dbg(&dev->core, "%s:%d: hcd->rsrc_start %lxh\n", __func__, __LINE__, ps3_ehci_probe() 174 (unsigned long)hcd->rsrc_start); ps3_ehci_probe() 175 dev_dbg(&dev->core, "%s:%d: hcd->rsrc_len %lxh\n", __func__, __LINE__, ps3_ehci_probe() 176 (unsigned long)hcd->rsrc_len); ps3_ehci_probe() 177 dev_dbg(&dev->core, "%s:%d: hcd->regs %lxh\n", __func__, __LINE__, ps3_ehci_probe() 178 (unsigned long)hcd->regs); ps3_ehci_probe() 182 ps3_system_bus_set_drvdata(dev, hcd); ps3_ehci_probe() 184 result = usb_add_hcd(hcd, virq, 0); ps3_ehci_probe() 192 device_wakeup_enable(hcd->self.controller); ps3_ehci_probe() 196 iounmap(hcd->regs); ps3_ehci_probe() 198 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ps3_ehci_probe() 199 usb_put_hcd(hcd); ps3_ehci_probe() 216 struct usb_hcd *hcd = ps3_system_bus_get_drvdata(dev); ps3_ehci_remove() local 218 BUG_ON(!hcd); ps3_ehci_remove() 220 dev_dbg(&dev->core, "%s:%d: regs %p\n", __func__, __LINE__, hcd->regs); ps3_ehci_remove() 221 dev_dbg(&dev->core, "%s:%d: irq %u\n", __func__, __LINE__, hcd->irq); ps3_ehci_remove() 223 tmp = hcd->irq; ps3_ehci_remove() 225 usb_remove_hcd(hcd); ps3_ehci_remove() 229 BUG_ON(!hcd->regs); ps3_ehci_remove() 230 iounmap(hcd->regs); ps3_ehci_remove() 232 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ps3_ehci_remove() 233 usb_put_hcd(hcd); ps3_ehci_remove()
|
H A D | ohci-sm501.c | 21 static int ohci_sm501_init(struct usb_hcd *hcd) ohci_sm501_init() argument 23 return ohci_init(hcd_to_ohci(hcd)); ohci_sm501_init() 26 static int ohci_sm501_start(struct usb_hcd *hcd) ohci_sm501_start() argument 28 struct device *dev = hcd->self.controller; ohci_sm501_start() 31 ret = ohci_run(hcd_to_ohci(hcd)); ohci_sm501_start() 33 dev_err(dev, "can't start %s", hcd->self.bus_name); ohci_sm501_start() 34 ohci_stop(hcd); ohci_sm501_start() 93 struct usb_hcd *hcd = NULL; ohci_hcd_sm501_drv_probe() local 144 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); ohci_hcd_sm501_drv_probe() 145 if (!hcd) { ohci_hcd_sm501_drv_probe() 150 hcd->rsrc_start = res->start; ohci_hcd_sm501_drv_probe() 151 hcd->rsrc_len = resource_size(res); ohci_hcd_sm501_drv_probe() 153 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, pdev->name)) { ohci_hcd_sm501_drv_probe() 159 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); ohci_hcd_sm501_drv_probe() 160 if (hcd->regs == NULL) { ohci_hcd_sm501_drv_probe() 166 ohci_hcd_init(hcd_to_ohci(hcd)); ohci_hcd_sm501_drv_probe() 168 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); ohci_hcd_sm501_drv_probe() 171 device_wakeup_enable(hcd->self.controller); ohci_hcd_sm501_drv_probe() 180 iounmap(hcd->regs); ohci_hcd_sm501_drv_probe() 182 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ohci_hcd_sm501_drv_probe() 184 usb_put_hcd(hcd); ohci_hcd_sm501_drv_probe() 195 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_hcd_sm501_drv_remove() local 198 usb_remove_hcd(hcd); ohci_hcd_sm501_drv_remove() 199 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ohci_hcd_sm501_drv_remove() 200 usb_put_hcd(hcd); ohci_hcd_sm501_drv_remove() 220 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_sm501_suspend() local 221 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_sm501_suspend() 229 ret = ohci_suspend(hcd, do_wakeup); ohci_sm501_suspend() 240 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_sm501_resume() local 241 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_sm501_resume() 248 ohci_resume(hcd, false); ohci_sm501_resume()
|
H A D | max3421-hcd.c | 62 #include <linux/usb/hcd.h> 64 #include <linux/platform_data/max3421-hcd.h> 337 hcd_to_max3421(struct usb_hcd *hcd) hcd_to_max3421() argument 339 return (struct max3421_hcd *) hcd->hcd_priv; hcd_to_max3421() 349 spi_rd8(struct usb_hcd *hcd, unsigned int reg) spi_rd8() argument 351 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); spi_rd8() 352 struct spi_device *spi = to_spi_device(hcd->self.controller); spi_rd8() 375 spi_wr8(struct usb_hcd *hcd, unsigned int reg, u8 val) spi_wr8() argument 377 struct spi_device *spi = to_spi_device(hcd->self.controller); spi_wr8() 378 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); spi_wr8() 399 spi_rd_buf(struct usb_hcd *hcd, unsigned int reg, void *buf, size_t len) spi_rd_buf() argument 401 struct spi_device *spi = to_spi_device(hcd->self.controller); spi_rd_buf() 402 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); spi_rd_buf() 425 spi_wr_buf(struct usb_hcd *hcd, unsigned int reg, void *buf, size_t len) spi_wr_buf() argument 427 struct spi_device *spi = to_spi_device(hcd->self.controller); spi_wr_buf() 428 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); spi_wr_buf() 465 max3421_set_speed(struct usb_hcd *hcd, struct usb_device *dev) max3421_set_speed() argument 467 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_set_speed() 482 spi_wr8(hcd, MAX3421_REG_MODE, max3421_hcd->mode); max3421_set_speed() 491 max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, max3421_set_address() argument 494 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_set_address() 508 u8 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); max3421_set_address() 524 spi_wr8(hcd, MAX3421_REG_HCTL, hctl); max3421_set_address() 532 spi_wr8(hcd, MAX3421_REG_PERADDR, dev->devnum); max3421_set_address() 536 max3421_ctrl_setup(struct usb_hcd *hcd, struct urb *urb) max3421_ctrl_setup() argument 538 spi_wr_buf(hcd, MAX3421_REG_SUDFIFO, urb->setup_packet, 8); max3421_ctrl_setup() 543 max3421_transfer_in(struct usb_hcd *hcd, struct urb *urb) max3421_transfer_in() argument 545 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_transfer_in() 554 max3421_transfer_out(struct usb_hcd *hcd, struct urb *urb, int fast_retransmit) max3421_transfer_out() argument 556 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_transfer_out() 557 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_transfer_out() 567 spi_wr8(hcd, MAX3421_REG_SNDBC, 0); max3421_transfer_out() 568 spi_wr8(hcd, MAX3421_REG_SNDFIFO, ((u8 *) src)[0]); max3421_transfer_out() 569 spi_wr8(hcd, MAX3421_REG_SNDBC, max3421_hcd->curr_len); max3421_transfer_out() 590 spi_wr_buf(hcd, MAX3421_REG_SNDFIFO, src, max3421_hcd->curr_len); max3421_transfer_out() 591 spi_wr8(hcd, MAX3421_REG_SNDBC, max3421_hcd->curr_len); max3421_transfer_out() 600 max3421_next_transfer(struct usb_hcd *hcd, int fast_retransmit) max3421_next_transfer() argument 602 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_next_transfer() 614 cmd = max3421_ctrl_setup(hcd, urb); max3421_next_transfer() 619 cmd = max3421_transfer_in(hcd, urb); max3421_next_transfer() 621 cmd = max3421_transfer_out(hcd, urb, fast_retransmit); max3421_next_transfer() 641 spi_wr8(hcd, MAX3421_REG_HXFR, cmd); max3421_next_transfer() 660 max3421_select_and_start_urb(struct usb_hcd *hcd) max3421_select_and_start_urb() argument 662 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_select_and_start_urb() 663 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_select_and_start_urb() 784 max3421_set_address(hcd, urb->dev, epnum, force_toggles); max3421_select_and_start_urb() 785 max3421_set_speed(hcd, urb->dev); max3421_select_and_start_urb() 786 max3421_next_transfer(hcd, 0); max3421_select_and_start_urb() 796 max3421_check_unlink(struct usb_hcd *hcd) max3421_check_unlink() argument 798 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_check_unlink() 799 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_check_unlink() 817 usb_hcd_unlink_urb_from_ep(hcd, urb); max3421_check_unlink() 820 usb_hcd_giveback_urb(hcd, urb, 0); max3421_check_unlink() 833 max3421_slow_retransmit(struct usb_hcd *hcd) max3421_slow_retransmit() argument 835 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_slow_retransmit() 848 max3421_recv_data_available(struct usb_hcd *hcd) max3421_recv_data_available() argument 850 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_recv_data_available() 855 rcvbc = spi_rd8(hcd, MAX3421_REG_RCVBC); max3421_recv_data_available() 869 spi_rd_buf(hcd, MAX3421_REG_RCVFIFO, dst, transfer_size); max3421_recv_data_available() 875 spi_wr8(hcd, MAX3421_REG_HIRQ, BIT(MAX3421_HI_RCVDAV_BIT)); max3421_recv_data_available() 879 max3421_handle_error(struct usb_hcd *hcd, u8 hrsl) max3421_handle_error() argument 881 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_handle_error() 882 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_handle_error() 924 spi_wr8(hcd, MAX3421_REG_HCTL, max3421_handle_error() 936 max3421_slow_retransmit(hcd); max3421_handle_error() 957 max3421_next_transfer(hcd, 1); max3421_handle_error() 960 max3421_slow_retransmit(hcd); max3421_handle_error() 964 spi_wr8(hcd, MAX3421_REG_SNDBC, 0); max3421_handle_error() 971 max3421_transfer_in_done(struct usb_hcd *hcd, struct urb *urb) max3421_transfer_in_done() argument 973 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_transfer_in_done() 974 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_transfer_in_done() 1015 max3421_transfer_out_done(struct usb_hcd *hcd, struct urb *urb) max3421_transfer_out_done() argument 1017 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_transfer_out_done() 1042 max3421_host_transfer_done(struct usb_hcd *hcd) max3421_host_transfer_done() argument 1044 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_host_transfer_done() 1053 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); max3421_host_transfer_done() 1063 max3421_handle_error(hcd, hrsl); max3421_host_transfer_done() 1080 urb_done = max3421_transfer_in_done(hcd, urb); max3421_host_transfer_done() 1082 urb_done = max3421_transfer_out_done(hcd, urb); max3421_host_transfer_done() 1101 max3421_next_transfer(hcd, 0); max3421_host_transfer_done() 1108 max3421_detect_conn(struct usb_hcd *hcd) max3421_detect_conn() argument 1110 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_detect_conn() 1116 hrsl = spi_rd8(hcd, MAX3421_REG_HRSL); max3421_detect_conn() 1147 spi_wr8(hcd, MAX3421_REG_MODE, max3421_hcd->mode); max3421_detect_conn() 1167 struct usb_hcd *hcd = dev_id; max3421_irq_handler() local 1168 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_irq_handler() 1169 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_irq_handler() 1182 dump_eps(struct usb_hcd *hcd) dump_eps() argument 1184 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); dump_eps() 1226 max3421_handle_irqs(struct usb_hcd *hcd) max3421_handle_irqs() argument 1228 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_handle_irqs() 1238 hirq = spi_rd8(hcd, MAX3421_REG_HIRQ); max3421_handle_irqs() 1243 spi_wr8(hcd, MAX3421_REG_HIRQ, max3421_handle_irqs() 1254 max3421_recv_data_available(hcd); max3421_handle_irqs() 1257 max3421_host_transfer_done(hcd); max3421_handle_irqs() 1260 max3421_detect_conn(hcd); max3421_handle_irqs() 1311 dump_eps(hcd); max3421_handle_irqs() 1319 max3421_reset_hcd(struct usb_hcd *hcd) max3421_reset_hcd() argument 1321 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_reset_hcd() 1322 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_reset_hcd() 1326 spi_wr8(hcd, MAX3421_REG_USBCTL, BIT(MAX3421_USBCTL_CHIPRES_BIT)); max3421_reset_hcd() 1328 spi_wr8(hcd, MAX3421_REG_USBCTL, 0); max3421_reset_hcd() 1331 if (spi_rd8(hcd, MAX3421_REG_USBIRQ) max3421_reset_hcd() 1350 spi_wr8(hcd, MAX3421_REG_MODE, max3421_hcd->mode); max3421_reset_hcd() 1354 spi_wr8(hcd, MAX3421_REG_HCTL, BIT(MAX3421_HCTL_FRMRST_BIT)); max3421_reset_hcd() 1357 spi_wr8(hcd, MAX3421_REG_HCTL, BIT(MAX3421_HCTL_SAMPLEBUS_BIT)); max3421_reset_hcd() 1358 max3421_detect_conn(hcd); max3421_reset_hcd() 1364 spi_wr8(hcd, MAX3421_REG_HIEN, max3421_hcd->hien); max3421_reset_hcd() 1367 spi_wr8(hcd, MAX3421_REG_CPUCTL, BIT(MAX3421_CPUCTL_IE_BIT)); max3421_reset_hcd() 1372 max3421_urb_done(struct usb_hcd *hcd) max3421_urb_done() argument 1374 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_urb_done() 1387 usb_hcd_unlink_urb_from_ep(hcd, urb); max3421_urb_done() 1391 usb_hcd_giveback_urb(hcd, urb, status); max3421_urb_done() 1399 struct usb_hcd *hcd = dev_id; max3421_spi_thread() local 1400 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_spi_thread() 1401 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_spi_thread() 1405 spi_wr8(hcd, MAX3421_REG_PINCTL, max3421_spi_thread() 1410 max3421_hcd->rev = spi_rd8(hcd, MAX3421_REG_REVISION); max3421_spi_thread() 1427 spi_wr8(hcd, MAX3421_REG_HIEN, max3421_hcd->hien); max3421_spi_thread() 1439 i_worked |= max3421_urb_done(hcd); max3421_spi_thread() 1440 else if (max3421_handle_irqs(hcd)) max3421_spi_thread() 1443 i_worked |= max3421_select_and_start_urb(hcd); max3421_spi_thread() 1447 i_worked |= max3421_reset_hcd(hcd); max3421_spi_thread() 1450 spi_wr8(hcd, MAX3421_REG_HCTL, max3421_spi_thread() 1455 i_worked |= max3421_check_unlink(hcd); max3421_spi_thread() 1462 u8 val = spi_rd8(hcd, MAX3421_REG_IOPINS1); max3421_spi_thread() 1466 spi_wr8(hcd, MAX3421_REG_IOPINS1 + i, val); max3421_spi_thread() 1478 max3421_reset_port(struct usb_hcd *hcd) max3421_reset_port() argument 1480 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_reset_port() 1491 max3421_reset(struct usb_hcd *hcd) max3421_reset() argument 1493 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_reset() 1495 hcd->self.sg_tablesize = 0; max3421_reset() 1496 hcd->speed = HCD_USB2; max3421_reset() 1497 hcd->self.root_hub->speed = USB_SPEED_FULL; max3421_reset() 1504 max3421_start(struct usb_hcd *hcd) max3421_start() argument 1506 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_start() 1513 hcd->power_budget = POWER_BUDGET; max3421_start() 1514 hcd->state = HC_STATE_RUNNING; max3421_start() 1515 hcd->uses_new_polling = 1; max3421_start() 1520 max3421_stop(struct usb_hcd *hcd) max3421_stop() argument 1525 max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) max3421_urb_enqueue() argument 1527 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_urb_enqueue() 1528 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_urb_enqueue() 1563 retval = usb_hcd_link_urb_to_ep(hcd, urb); max3421_urb_enqueue() 1576 max3421_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) max3421_urb_dequeue() argument 1578 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_urb_dequeue() 1588 retval = usb_hcd_check_unlink_urb(hcd, urb, status); max3421_urb_dequeue() 1598 max3421_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *ep) max3421_endpoint_disable() argument 1600 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_endpoint_disable() 1619 max3421_get_frame_number(struct usb_hcd *hcd) max3421_get_frame_number() argument 1621 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_get_frame_number() 1630 max3421_hub_status_data(struct usb_hcd *hcd, char *buf) max3421_hub_status_data() argument 1632 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_hub_status_data() 1637 if (!HCD_HW_ACCESSIBLE(hcd)) max3421_hub_status_data() 1643 dev_dbg(hcd->self.controller, max3421_hub_status_data() 1648 usb_hcd_resume_root_hub(hcd); max3421_hub_status_data() 1675 max3421_gpout_set_value(struct usb_hcd *hcd, u8 pin_number, u8 value) max3421_gpout_set_value() argument 1677 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_gpout_set_value() 1696 max3421_hub_control(struct usb_hcd *hcd, u16 type_req, u16 value, u16 index, max3421_hub_control() argument 1699 struct spi_device *spi = to_spi_device(hcd->self.controller); max3421_hub_control() 1700 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); max3421_hub_control() 1717 dev_dbg(hcd->self.controller, "power-off\n"); max3421_hub_control() 1718 max3421_gpout_set_value(hcd, pdata->vbus_gpout, max3421_hub_control() 1766 dev_dbg(hcd->self.controller, "power-on\n"); max3421_hub_control() 1768 max3421_gpout_set_value(hcd, pdata->vbus_gpout, max3421_hub_control() 1772 max3421_reset_port(hcd); max3421_hub_control() 1782 dev_dbg(hcd->self.controller, max3421_hub_control() 1794 max3421_bus_suspend(struct usb_hcd *hcd) max3421_bus_suspend() argument 1800 max3421_bus_resume(struct usb_hcd *hcd) max3421_bus_resume() argument 1810 max3421_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) max3421_map_urb_for_dma() argument 1816 max3421_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) max3421_unmap_urb_for_dma() argument 1844 struct usb_hcd *hcd = NULL; max3421_probe() local 1852 hcd = usb_create_hcd(&max3421_hcd_desc, &spi->dev, max3421_probe() 1854 if (!hcd) { max3421_probe() 1858 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); max3421_probe() 1859 max3421_hcd = hcd_to_max3421(hcd); max3421_probe() 1875 max3421_hcd->spi_thread = kthread_run(max3421_spi_thread, hcd, max3421_probe() 1883 retval = usb_add_hcd(hcd, 0, 0); max3421_probe() 1890 IRQF_TRIGGER_LOW, "max3421", hcd); max3421_probe() 1898 if (hcd) { max3421_probe() 1903 usb_put_hcd(hcd); max3421_probe() 1912 struct usb_hcd *hcd = NULL; max3421_remove() local 1917 hcd = max3421_to_hcd(max3421_hcd); max3421_remove() 1918 if (hcd->self.controller == &spi->dev) max3421_remove() 1927 usb_remove_hcd(hcd); max3421_remove() 1936 free_irq(spi->irq, hcd); max3421_remove() 1938 usb_put_hcd(hcd); max3421_remove() 1946 .name = "max3421-hcd",
|
H A D | ehci-mv.c | 23 struct usb_hcd *hcd; member in struct:ehci_hcd_mv 70 static int mv_ehci_reset(struct usb_hcd *hcd) mv_ehci_reset() argument 72 struct device *dev = hcd->self.controller; mv_ehci_reset() 81 hcd->has_tt = 1; mv_ehci_reset() 83 retval = ehci_setup(hcd); mv_ehci_reset() 135 struct usb_hcd *hcd; mv_ehci_probe() local 150 hcd = usb_create_hcd(&mv_ehci_hc_driver, &pdev->dev, "mv ehci"); mv_ehci_probe() 151 if (!hcd) mv_ehci_probe() 162 ehci_mv->hcd = hcd; mv_ehci_probe() 195 hcd->rsrc_start = r->start; mv_ehci_probe() 196 hcd->rsrc_len = resource_size(r); mv_ehci_probe() 197 hcd->regs = ehci_mv->op_regs; mv_ehci_probe() 199 hcd->irq = platform_get_irq(pdev, 0); mv_ehci_probe() 200 if (!hcd->irq) { mv_ehci_probe() 206 ehci = hcd_to_ehci(hcd); mv_ehci_probe() 224 retval = otg_set_host(ehci_mv->otg->otg, &hcd->self); mv_ehci_probe() 237 retval = usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); mv_ehci_probe() 240 "failed to add hcd with err %d\n", retval); mv_ehci_probe() 243 device_wakeup_enable(hcd->self.controller); mv_ehci_probe() 251 " working in %s mode\n", hcd->regs, hcd->irq, mv_ehci_probe() 262 usb_put_hcd(hcd); mv_ehci_probe() 270 struct usb_hcd *hcd = ehci_mv->hcd; mv_ehci_remove() local 272 if (hcd->rh_registered) mv_ehci_remove() 273 usb_remove_hcd(hcd); mv_ehci_remove() 285 usb_put_hcd(hcd); mv_ehci_remove() 303 struct usb_hcd *hcd = ehci_mv->hcd; mv_ehci_shutdown() local 305 if (!hcd->rh_registered) mv_ehci_shutdown() 308 if (hcd->driver->shutdown) mv_ehci_shutdown() 309 hcd->driver->shutdown(hcd); mv_ehci_shutdown()
|
H A D | ehci-mxc.c | 30 #include <linux/usb/hcd.h> 53 struct usb_hcd *hcd; ehci_mxc_drv_probe() local 67 hcd = usb_create_hcd(&ehci_mxc_hc_driver, dev, dev_name(dev)); ehci_mxc_drv_probe() 68 if (!hcd) ehci_mxc_drv_probe() 72 hcd->regs = devm_ioremap_resource(&pdev->dev, res); ehci_mxc_drv_probe() 73 if (IS_ERR(hcd->regs)) { ehci_mxc_drv_probe() 74 ret = PTR_ERR(hcd->regs); ehci_mxc_drv_probe() 77 hcd->rsrc_start = res->start; ehci_mxc_drv_probe() 78 hcd->rsrc_len = resource_size(res); ehci_mxc_drv_probe() 80 hcd->has_tt = 1; ehci_mxc_drv_probe() 81 ehci = hcd_to_ehci(hcd); ehci_mxc_drv_probe() 119 ehci->caps = hcd->regs + 0x100; ehci_mxc_drv_probe() 120 ehci->regs = hcd->regs + 0x100 + ehci_mxc_drv_probe() 131 pdata->otg->io_priv = hcd->regs + ULPI_VIEWPORT_OFFSET; ehci_mxc_drv_probe() 145 platform_set_drvdata(pdev, hcd); ehci_mxc_drv_probe() 147 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); ehci_mxc_drv_probe() 151 device_wakeup_enable(hcd->self.controller); ehci_mxc_drv_probe() 165 usb_put_hcd(hcd); ehci_mxc_drv_probe() 172 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_mxc_drv_remove() local 173 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_mxc_drv_remove() 176 usb_remove_hcd(hcd); ehci_mxc_drv_remove() 190 usb_put_hcd(hcd); ehci_mxc_drv_remove()
|
H A D | uhci-grlib.c | 25 static int uhci_grlib_init(struct usb_hcd *hcd) uhci_grlib_init() argument 27 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_grlib_init() 43 uhci->rh_numports = uhci_count_ports(hcd); uhci_grlib_init() 92 struct usb_hcd *hcd; uhci_hcd_grlib_probe() local 109 hcd = usb_create_hcd(&uhci_grlib_hc_driver, &op->dev, uhci_hcd_grlib_probe() 111 if (!hcd) uhci_hcd_grlib_probe() 114 hcd->rsrc_start = res.start; uhci_hcd_grlib_probe() 115 hcd->rsrc_len = resource_size(&res); uhci_hcd_grlib_probe() 124 hcd->regs = devm_ioremap_resource(&op->dev, &res); uhci_hcd_grlib_probe() 125 if (IS_ERR(hcd->regs)) { uhci_hcd_grlib_probe() 126 rv = PTR_ERR(hcd->regs); uhci_hcd_grlib_probe() 130 uhci = hcd_to_uhci(hcd); uhci_hcd_grlib_probe() 132 uhci->regs = hcd->regs; uhci_hcd_grlib_probe() 134 rv = usb_add_hcd(hcd, irq, 0); uhci_hcd_grlib_probe() 138 device_wakeup_enable(hcd->self.controller); uhci_hcd_grlib_probe() 144 usb_put_hcd(hcd); uhci_hcd_grlib_probe() 151 struct usb_hcd *hcd = platform_get_drvdata(op); uhci_hcd_grlib_remove() local 155 usb_remove_hcd(hcd); uhci_hcd_grlib_remove() 157 irq_dispose_mapping(hcd->irq); uhci_hcd_grlib_remove() 158 usb_put_hcd(hcd); uhci_hcd_grlib_remove() 172 struct usb_hcd *hcd = platform_get_drvdata(op); uhci_hcd_grlib_shutdown() local 174 uhci_hc_died(hcd_to_uhci(hcd)); uhci_hcd_grlib_shutdown()
|
H A D | ehci-exynos.c | 25 #include <linux/usb/hcd.h> 50 #define to_exynos_ehci(hcd) (struct exynos_ehci_hcd *)(hcd_to_ehci(hcd)->priv) 94 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ehci_phy_enable() local 95 struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); exynos_ehci_phy_enable() 112 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ehci_phy_disable() local 113 struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); exynos_ehci_phy_disable() 142 struct usb_hcd *hcd; exynos_ehci_probe() local 159 hcd = usb_create_hcd(&exynos_ehci_hc_driver, exynos_ehci_probe() 161 if (!hcd) { exynos_ehci_probe() 165 exynos_ehci = to_exynos_ehci(hcd); exynos_ehci_probe() 190 hcd->regs = devm_ioremap_resource(&pdev->dev, res); exynos_ehci_probe() 191 if (IS_ERR(hcd->regs)) { exynos_ehci_probe() 192 err = PTR_ERR(hcd->regs); exynos_ehci_probe() 196 hcd->rsrc_start = res->start; exynos_ehci_probe() 197 hcd->rsrc_len = resource_size(res); exynos_ehci_probe() 212 ehci = hcd_to_ehci(hcd); exynos_ehci_probe() 213 ehci->caps = hcd->regs; exynos_ehci_probe() 216 writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); exynos_ehci_probe() 218 err = usb_add_hcd(hcd, irq, IRQF_SHARED); exynos_ehci_probe() 223 device_wakeup_enable(hcd->self.controller); exynos_ehci_probe() 225 platform_set_drvdata(pdev, hcd); exynos_ehci_probe() 234 usb_put_hcd(hcd); exynos_ehci_probe() 240 struct usb_hcd *hcd = platform_get_drvdata(pdev); exynos_ehci_remove() local 241 struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); exynos_ehci_remove() 243 usb_remove_hcd(hcd); exynos_ehci_remove() 249 usb_put_hcd(hcd); exynos_ehci_remove() 257 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ehci_suspend() local 258 struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); exynos_ehci_suspend() 263 rc = ehci_suspend(hcd, do_wakeup); exynos_ehci_suspend() 276 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ehci_resume() local 277 struct exynos_ehci_hcd *exynos_ehci = to_exynos_ehci(hcd); exynos_ehci_resume() 290 writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs)); exynos_ehci_resume() 292 ehci_resume(hcd, false); exynos_ehci_resume()
|
H A D | ehci-st.c | 27 #include <linux/usb/hcd.h> 52 static int st_ehci_platform_reset(struct usb_hcd *hcd) st_ehci_platform_reset() argument 54 struct platform_device *pdev = to_platform_device(hcd->self.controller); st_ehci_platform_reset() 56 struct ehci_hcd *ehci = hcd_to_ehci(hcd); st_ehci_platform_reset() 61 writel(threshold, hcd->regs + AHB2STBUS_INSREG01); st_ehci_platform_reset() 63 ehci->caps = hcd->regs + pdata->caps_offset; st_ehci_platform_reset() 64 return ehci_setup(hcd); st_ehci_platform_reset() 69 struct usb_hcd *hcd = platform_get_drvdata(dev); st_ehci_platform_power_on() local 70 struct st_ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); st_ehci_platform_power_on() 120 struct usb_hcd *hcd = platform_get_drvdata(dev); st_ehci_platform_power_off() local 121 struct st_ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); st_ehci_platform_power_off() 153 struct usb_hcd *hcd; st_ehci_platform_probe() local 174 hcd = usb_create_hcd(&ehci_platform_hc_driver, &dev->dev, st_ehci_platform_probe() 176 if (!hcd) st_ehci_platform_probe() 179 platform_set_drvdata(dev, hcd); st_ehci_platform_probe() 181 priv = hcd_to_ehci_priv(hcd); st_ehci_platform_probe() 182 ehci = hcd_to_ehci(hcd); st_ehci_platform_probe() 231 hcd->rsrc_start = res_mem->start; st_ehci_platform_probe() 232 hcd->rsrc_len = resource_size(res_mem); st_ehci_platform_probe() 234 hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); st_ehci_platform_probe() 235 if (IS_ERR(hcd->regs)) { st_ehci_platform_probe() 236 err = PTR_ERR(hcd->regs); st_ehci_platform_probe() 240 err = usb_add_hcd(hcd, irq, IRQF_SHARED); st_ehci_platform_probe() 244 device_wakeup_enable(hcd->self.controller); st_ehci_platform_probe() 245 platform_set_drvdata(dev, hcd); st_ehci_platform_probe() 256 usb_put_hcd(hcd); st_ehci_platform_probe() 263 struct usb_hcd *hcd = platform_get_drvdata(dev); st_ehci_platform_remove() local 265 struct st_ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); st_ehci_platform_remove() 268 usb_remove_hcd(hcd); st_ehci_platform_remove() 276 usb_put_hcd(hcd); st_ehci_platform_remove() 288 struct usb_hcd *hcd = dev_get_drvdata(dev); st_ehci_suspend() local 295 ret = ehci_suspend(hcd, do_wakeup); st_ehci_suspend() 309 struct usb_hcd *hcd = dev_get_drvdata(dev); st_ehci_resume() local 323 ehci_resume(hcd, false); st_ehci_resume()
|
H A D | ohci-exynos.c | 23 #include <linux/usb/hcd.h> 32 #define to_exynos_ohci(hcd) (struct exynos_ohci_hcd *)(hcd_to_ohci(hcd)->priv) 83 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ohci_phy_enable() local 84 struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); exynos_ohci_phy_enable() 101 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ohci_phy_disable() local 102 struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); exynos_ohci_phy_disable() 113 struct usb_hcd *hcd; exynos_ohci_probe() local 127 hcd = usb_create_hcd(&exynos_ohci_hc_driver, exynos_ohci_probe() 129 if (!hcd) { exynos_ohci_probe() 134 exynos_ohci = to_exynos_ohci(hcd); exynos_ohci_probe() 158 hcd->regs = devm_ioremap_resource(&pdev->dev, res); exynos_ohci_probe() 159 if (IS_ERR(hcd->regs)) { exynos_ohci_probe() 160 err = PTR_ERR(hcd->regs); exynos_ohci_probe() 163 hcd->rsrc_start = res->start; exynos_ohci_probe() 164 hcd->rsrc_len = resource_size(res); exynos_ohci_probe() 173 platform_set_drvdata(pdev, hcd); exynos_ohci_probe() 181 err = usb_add_hcd(hcd, irq, IRQF_SHARED); exynos_ohci_probe() 186 device_wakeup_enable(hcd->self.controller); exynos_ohci_probe() 194 usb_put_hcd(hcd); exynos_ohci_probe() 200 struct usb_hcd *hcd = platform_get_drvdata(pdev); exynos_ohci_remove() local 201 struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); exynos_ohci_remove() 203 usb_remove_hcd(hcd); exynos_ohci_remove() 209 usb_put_hcd(hcd); exynos_ohci_remove() 216 struct usb_hcd *hcd = platform_get_drvdata(pdev); exynos_ohci_shutdown() local 218 if (hcd->driver->shutdown) exynos_ohci_shutdown() 219 hcd->driver->shutdown(hcd); exynos_ohci_shutdown() 225 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ohci_suspend() local 226 struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); exynos_ohci_suspend() 228 int rc = ohci_suspend(hcd, do_wakeup); exynos_ohci_suspend() 242 struct usb_hcd *hcd = dev_get_drvdata(dev); exynos_ohci_resume() local 243 struct exynos_ohci_hcd *exynos_ohci = to_exynos_ohci(hcd); exynos_ohci_resume() 255 ohci_resume(hcd, false); exynos_ohci_resume()
|
H A D | xhci-rcar.c | 59 void xhci_rcar_start(struct usb_hcd *hcd) xhci_rcar_start() argument 63 if (hcd->regs != NULL) { xhci_rcar_start() 65 temp = readl(hcd->regs + RCAR_USB3_INT_ENA); xhci_rcar_start() 67 writel(temp, hcd->regs + RCAR_USB3_INT_ENA); xhci_rcar_start() 69 writel(RCAR_USB3_LCLK_ENA_VAL, hcd->regs + RCAR_USB3_LCLK); xhci_rcar_start() 71 writel(RCAR_USB3_CONF1_VAL, hcd->regs + RCAR_USB3_CONF1); xhci_rcar_start() 72 writel(RCAR_USB3_CONF2_VAL, hcd->regs + RCAR_USB3_CONF2); xhci_rcar_start() 73 writel(RCAR_USB3_CONF3_VAL, hcd->regs + RCAR_USB3_CONF3); xhci_rcar_start() 75 writel(RCAR_USB3_RX_POL_VAL, hcd->regs + RCAR_USB3_RX_POL); xhci_rcar_start() 76 writel(RCAR_USB3_TX_POL_VAL, hcd->regs + RCAR_USB3_TX_POL); xhci_rcar_start() 141 int xhci_rcar_init_quirk(struct usb_hcd *hcd) xhci_rcar_init_quirk() argument 143 /* If hcd->regs is NULL, we don't just call the following function */ xhci_rcar_init_quirk() 144 if (!hcd->regs) xhci_rcar_init_quirk() 147 return xhci_rcar_download_firmware(hcd->self.controller, hcd->regs); xhci_rcar_init_quirk()
|
H A D | ohci-ppc-of.c | 25 ohci_ppc_of_start(struct usb_hcd *hcd) ohci_ppc_of_start() argument 27 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_ppc_of_start() 34 dev_err(hcd->self.controller, "can't start %s\n", ohci_ppc_of_start() 35 hcd->self.bus_name); ohci_ppc_of_start() 36 ohci_stop(hcd); ohci_ppc_of_start() 89 struct usb_hcd *hcd; ohci_hcd_ppc_of_probe() local 111 hcd = usb_create_hcd(&ohci_ppc_of_hc_driver, &op->dev, "PPC-OF USB"); ohci_hcd_ppc_of_probe() 112 if (!hcd) ohci_hcd_ppc_of_probe() 115 hcd->rsrc_start = res.start; ohci_hcd_ppc_of_probe() 116 hcd->rsrc_len = resource_size(&res); ohci_hcd_ppc_of_probe() 118 hcd->regs = devm_ioremap_resource(&op->dev, &res); ohci_hcd_ppc_of_probe() 119 if (IS_ERR(hcd->regs)) { ohci_hcd_ppc_of_probe() 120 rv = PTR_ERR(hcd->regs); ohci_hcd_ppc_of_probe() 132 ohci = hcd_to_ohci(hcd); ohci_hcd_ppc_of_probe() 143 rv = usb_add_hcd(hcd, irq, 0); ohci_hcd_ppc_of_probe() 145 device_wakeup_enable(hcd->self.controller); ohci_hcd_ppc_of_probe() 175 usb_put_hcd(hcd); ohci_hcd_ppc_of_probe() 182 struct usb_hcd *hcd = platform_get_drvdata(op); ohci_hcd_ppc_of_remove() local 186 usb_remove_hcd(hcd); ohci_hcd_ppc_of_remove() 188 irq_dispose_mapping(hcd->irq); ohci_hcd_ppc_of_remove() 190 usb_put_hcd(hcd); ohci_hcd_ppc_of_remove()
|
H A D | ehci-pmcmsp.c | 74 static int ehci_msp_setup(struct usb_hcd *hcd) ehci_msp_setup() argument 76 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_msp_setup() 82 ehci->caps = hcd->regs; ehci_msp_setup() 83 hcd->has_tt = 1; ehci_msp_setup() 85 retval = ehci_setup(hcd); ehci_msp_setup() 165 struct usb_hcd *hcd; usb_hcd_msp_probe() local 169 hcd = usb_create_hcd(driver, &dev->dev, "pmcmsp"); usb_hcd_msp_probe() 170 if (!hcd) usb_hcd_msp_probe() 179 hcd->rsrc_start = res->start; usb_hcd_msp_probe() 180 hcd->rsrc_len = resource_size(res); usb_hcd_msp_probe() 181 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, dev->name)) { usb_hcd_msp_probe() 185 hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_msp_probe() 186 if (!hcd->regs) { usb_hcd_msp_probe() 204 ehci = hcd_to_ehci(hcd); usb_hcd_msp_probe() 209 retval = usb_add_hcd(hcd, res->start, IRQF_SHARED); usb_hcd_msp_probe() 211 device_wakeup_enable(hcd->self.controller); usb_hcd_msp_probe() 215 usb_remove_hcd(hcd); usb_hcd_msp_probe() 217 iounmap(hcd->regs); usb_hcd_msp_probe() 219 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_msp_probe() 221 usb_put_hcd(hcd); usb_hcd_msp_probe() 240 void usb_hcd_msp_remove(struct usb_hcd *hcd, struct platform_device *dev) usb_hcd_msp_remove() argument 242 usb_remove_hcd(hcd); usb_hcd_msp_remove() 243 iounmap(hcd->regs); usb_hcd_msp_remove() 244 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_msp_remove() 245 usb_put_hcd(hcd); usb_hcd_msp_remove() 311 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_hcd_msp_drv_remove() local 313 usb_hcd_msp_remove(hcd, pdev); ehci_hcd_msp_drv_remove()
|
H A D | ehci-fsl.c | 34 #include <linux/usb/hcd.h> 61 struct usb_hcd *hcd; fsl_ehci_drv_probe() local 98 hcd = usb_create_hcd(&fsl_ehci_hc_driver, &pdev->dev, fsl_ehci_drv_probe() 100 if (!hcd) { fsl_ehci_drv_probe() 106 hcd->regs = devm_ioremap_resource(&pdev->dev, res); fsl_ehci_drv_probe() 107 if (IS_ERR(hcd->regs)) { fsl_ehci_drv_probe() 108 retval = PTR_ERR(hcd->regs); fsl_ehci_drv_probe() 112 hcd->rsrc_start = res->start; fsl_ehci_drv_probe() 113 hcd->rsrc_len = resource_size(res); fsl_ehci_drv_probe() 115 pdata->regs = hcd->regs; fsl_ehci_drv_probe() 118 hcd->power_budget = pdata->power_budget; fsl_ehci_drv_probe() 130 clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL, fsl_ehci_drv_probe() 138 clrsetbits_be32(hcd->regs + FSL_SOC_USB_CTRL, fsl_ehci_drv_probe() 140 writel(PORT_PTS_UTMI, hcd->regs + FSL_SOC_USB_PORTSC1); fsl_ehci_drv_probe() 145 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); fsl_ehci_drv_probe() 148 device_wakeup_enable(hcd->self.controller); fsl_ehci_drv_probe() 152 struct ehci_hcd *ehci = hcd_to_ehci(hcd); fsl_ehci_drv_probe() 154 hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2); fsl_ehci_drv_probe() 155 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", fsl_ehci_drv_probe() 156 hcd, ehci, hcd->usb_phy); fsl_ehci_drv_probe() 158 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { fsl_ehci_drv_probe() 159 retval = otg_set_host(hcd->usb_phy->otg, fsl_ehci_drv_probe() 162 usb_put_phy(hcd->usb_phy); fsl_ehci_drv_probe() 175 usb_put_hcd(hcd); fsl_ehci_drv_probe() 183 static int ehci_fsl_setup_phy(struct usb_hcd *hcd, ehci_fsl_setup_phy() argument 188 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_fsl_setup_phy() 189 void __iomem *non_ehci = hcd->regs; ehci_fsl_setup_phy() 190 struct device *dev = hcd->self.controller; ehci_fsl_setup_phy() 194 dev_warn(hcd->self.controller, "Could not get controller version\n"); ehci_fsl_setup_phy() 245 dev_warn(hcd->self.controller, ehci_fsl_setup_phy() 262 struct usb_hcd *hcd = ehci_to_hcd(ehci); ehci_fsl_usb_setup() local 264 void __iomem *non_ehci = hcd->regs; ehci_fsl_usb_setup() 266 pdata = dev_get_platdata(hcd->self.controller); ehci_fsl_usb_setup() 287 if (ehci_fsl_setup_phy(hcd, pdata->phy_mode, 0)) ehci_fsl_usb_setup() 302 if (ehci_fsl_setup_phy(hcd, pdata->phy_mode, 0)) ehci_fsl_usb_setup() 306 if (ehci_fsl_setup_phy(hcd, pdata->phy_mode, 1)) ehci_fsl_usb_setup() 334 static int ehci_fsl_setup(struct usb_hcd *hcd) ehci_fsl_setup() argument 336 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_fsl_setup() 341 dev = hcd->self.controller; ehci_fsl_setup() 342 pdata = dev_get_platdata(hcd->self.controller); ehci_fsl_setup() 347 ehci->caps = hcd->regs + 0x100; ehci_fsl_setup() 358 hcd->has_tt = 1; ehci_fsl_setup() 360 retval = ehci_setup(hcd); ehci_fsl_setup() 371 hcd->regs + FSL_SOC_USB_SBUSCFG); ehci_fsl_setup() 392 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_fsl_mpc512x_drv_suspend() local 393 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_fsl_mpc512x_drv_suspend() 398 u32 mode = ehci_readl(ehci, hcd->regs + FSL_SOC_USB_USBMODE); ehci_fsl_mpc512x_drv_suspend() 400 tmp = ehci_readl(ehci, hcd->regs + 0x140); /* usbcmd */ ehci_fsl_mpc512x_drv_suspend() 424 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ehci_fsl_mpc512x_drv_suspend() 444 hcd->regs + FSL_SOC_USB_USBGENCTRL); ehci_fsl_mpc512x_drv_suspend() 461 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_fsl_mpc512x_drv_resume() local 462 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_fsl_mpc512x_drv_resume() 490 ehci_writel(ehci, tmp, hcd->regs + FSL_SOC_USB_USBMODE); ehci_fsl_mpc512x_drv_resume() 493 hcd->regs + FSL_SOC_USB_USBGENCTRL); ehci_fsl_mpc512x_drv_resume() 495 hcd->regs + FSL_SOC_USB_ISIPHYCTRL); ehci_fsl_mpc512x_drv_resume() 497 ehci_writel(ehci, SBUSCFG_INCR8, hcd->regs + FSL_SOC_USB_SBUSCFG); ehci_fsl_mpc512x_drv_resume() 510 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ehci_fsl_mpc512x_drv_resume() 518 usb_hcd_resume_root_hub(hcd); ehci_fsl_mpc512x_drv_resume() 534 static struct ehci_fsl *hcd_to_ehci_fsl(struct usb_hcd *hcd) hcd_to_ehci_fsl() argument 536 struct ehci_hcd *ehci = hcd_to_ehci(hcd); hcd_to_ehci_fsl() 543 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_fsl_drv_suspend() local 544 struct ehci_fsl *ehci_fsl = hcd_to_ehci_fsl(hcd); ehci_fsl_drv_suspend() 545 void __iomem *non_ehci = hcd->regs; ehci_fsl_drv_suspend() 552 ehci_prepare_ports_for_controller_suspend(hcd_to_ehci(hcd), ehci_fsl_drv_suspend() 563 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_fsl_drv_resume() local 564 struct ehci_fsl *ehci_fsl = hcd_to_ehci_fsl(hcd); ehci_fsl_drv_resume() 565 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_fsl_drv_resume() 566 void __iomem *non_ehci = hcd->regs; ehci_fsl_drv_resume() 577 usb_root_hub_lost_power(hcd->self.root_hub); ehci_fsl_drv_resume() 590 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_fsl_drv_restore() local 592 usb_root_hub_lost_power(hcd->self.root_hub); ehci_fsl_drv_restore() 608 static int ehci_start_port_reset(struct usb_hcd *hcd, unsigned port) ehci_start_port_reset() argument 610 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_start_port_reset() 655 struct usb_hcd *hcd = platform_get_drvdata(pdev); fsl_ehci_drv_remove() local 657 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { fsl_ehci_drv_remove() 658 otg_set_host(hcd->usb_phy->otg, NULL); fsl_ehci_drv_remove() 659 usb_put_phy(hcd->usb_phy); fsl_ehci_drv_remove() 662 usb_remove_hcd(hcd); fsl_ehci_drv_remove() 670 usb_put_hcd(hcd); fsl_ehci_drv_remove()
|
H A D | ohci-da8xx.c | 85 static int ohci_da8xx_init(struct usb_hcd *hcd) ohci_da8xx_init() argument 87 struct device *dev = hcd->self.controller; ohci_da8xx_init() 89 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_da8xx_init() 129 static void ohci_da8xx_stop(struct usb_hcd *hcd) ohci_da8xx_stop() argument 131 ohci_stop(hcd); ohci_da8xx_stop() 135 static int ohci_da8xx_start(struct usb_hcd *hcd) ohci_da8xx_start() argument 137 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_da8xx_start() 142 ohci_da8xx_stop(hcd); ohci_da8xx_start() 150 static int ohci_da8xx_hub_status_data(struct usb_hcd *hcd, char *buf) ohci_da8xx_hub_status_data() argument 152 int length = ohci_hub_status_data(hcd, buf); ohci_da8xx_hub_status_data() 156 dev_dbg(hcd->self.controller, "over-current indicator change " ohci_da8xx_hub_status_data() 170 static int ohci_da8xx_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ohci_da8xx_hub_control() argument 173 struct device *dev = hcd->self.controller; ohci_da8xx_hub_control() 185 temp = roothub_portstatus(hcd_to_ohci(hcd), wIndex - 1); ohci_da8xx_hub_control() 234 return ohci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength); ohci_da8xx_hub_control() 296 struct usb_hcd *hcd; usb_hcd_da8xx_probe() local 311 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); usb_hcd_da8xx_probe() 312 if (!hcd) usb_hcd_da8xx_probe() 316 hcd->regs = devm_ioremap_resource(&pdev->dev, mem); usb_hcd_da8xx_probe() 317 if (IS_ERR(hcd->regs)) { usb_hcd_da8xx_probe() 318 error = PTR_ERR(hcd->regs); usb_hcd_da8xx_probe() 321 hcd->rsrc_start = mem->start; usb_hcd_da8xx_probe() 322 hcd->rsrc_len = resource_size(mem); usb_hcd_da8xx_probe() 324 ohci_hcd_init(hcd_to_ohci(hcd)); usb_hcd_da8xx_probe() 331 error = usb_add_hcd(hcd, irq, 0); usb_hcd_da8xx_probe() 335 device_wakeup_enable(hcd->self.controller); usb_hcd_da8xx_probe() 343 usb_remove_hcd(hcd); usb_hcd_da8xx_probe() 345 usb_put_hcd(hcd); usb_hcd_da8xx_probe() 359 usb_hcd_da8xx_remove(struct usb_hcd *hcd, struct platform_device *pdev) usb_hcd_da8xx_remove() argument 364 usb_remove_hcd(hcd); usb_hcd_da8xx_remove() 365 usb_put_hcd(hcd); usb_hcd_da8xx_remove() 375 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_hcd_da8xx_drv_remove() local 377 usb_hcd_da8xx_remove(hcd, dev); ohci_hcd_da8xx_drv_remove() 386 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_da8xx_suspend() local 387 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_da8xx_suspend() 396 ret = ohci_suspend(hcd, do_wakeup); ohci_da8xx_suspend() 401 hcd->state = HC_STATE_SUSPENDED; ohci_da8xx_suspend() 408 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_da8xx_resume() local 409 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_da8xx_resume() 417 usb_hcd_resume_root_hub(hcd); ohci_da8xx_resume()
|
H A D | ehci-xilinx-of.c | 38 * @hcd: Pointer to the usb_hcd device to which the host controller bound 50 static int ehci_xilinx_port_handed_over(struct usb_hcd *hcd, int portnum) ehci_xilinx_port_handed_over() argument 52 dev_warn(hcd->self.controller, "port %d cannot be enabled\n", portnum); ehci_xilinx_port_handed_over() 53 if (hcd->has_tt) { ehci_xilinx_port_handed_over() 54 dev_warn(hcd->self.controller, ehci_xilinx_port_handed_over() 57 dev_warn(hcd->self.controller, ehci_xilinx_port_handed_over() 60 dev_warn(hcd->self.controller, ehci_xilinx_port_handed_over() 62 dev_warn(hcd->self.controller, ehci_xilinx_port_handed_over() 65 dev_warn(hcd->self.controller, ehci_xilinx_port_handed_over() 128 * entry, and sets an appropriate value for hcd->has_tt. 133 struct usb_hcd *hcd; ehci_hcd_xilinx_of_probe() local 149 hcd = usb_create_hcd(&ehci_xilinx_of_hc_driver, &op->dev, ehci_hcd_xilinx_of_probe() 151 if (!hcd) ehci_hcd_xilinx_of_probe() 154 hcd->rsrc_start = res.start; ehci_hcd_xilinx_of_probe() 155 hcd->rsrc_len = resource_size(&res); ehci_hcd_xilinx_of_probe() 165 hcd->regs = devm_ioremap_resource(&op->dev, &res); ehci_hcd_xilinx_of_probe() 166 if (IS_ERR(hcd->regs)) { ehci_hcd_xilinx_of_probe() 167 rv = PTR_ERR(hcd->regs); ehci_hcd_xilinx_of_probe() 171 ehci = hcd_to_ehci(hcd); ehci_hcd_xilinx_of_probe() 184 hcd->has_tt = 1; ehci_hcd_xilinx_of_probe() 188 hcd->has_tt = 0; ehci_hcd_xilinx_of_probe() 193 ehci->caps = hcd->regs + 0x100; ehci_hcd_xilinx_of_probe() 195 rv = usb_add_hcd(hcd, irq, 0); ehci_hcd_xilinx_of_probe() 197 device_wakeup_enable(hcd->self.controller); ehci_hcd_xilinx_of_probe() 202 usb_put_hcd(hcd); ehci_hcd_xilinx_of_probe() 208 * ehci_hcd_xilinx_of_remove - shutdown hcd and release resources 211 * Remove the hcd structure, and release resources that has been requested 216 struct usb_hcd *hcd = platform_get_drvdata(op); ehci_hcd_xilinx_of_remove() local 220 usb_remove_hcd(hcd); ehci_hcd_xilinx_of_remove() 222 usb_put_hcd(hcd); ehci_hcd_xilinx_of_remove()
|
H A D | ehci-tilegx.c | 37 static int tilegx_ehci_setup(struct usb_hcd *hcd) tilegx_ehci_setup() argument 39 int ret = ehci_init(hcd); tilegx_ehci_setup() 44 * struct ehci_hcd *ehci = hcd_to_ehci(hcd); tilegx_ehci_setup() 102 struct usb_hcd *hcd; ehci_hcd_tilegx_drv_probe() local 119 hcd = usb_create_hcd(&ehci_tilegx_hc_driver, &pdev->dev, ehci_hcd_tilegx_drv_probe() 121 if (!hcd) { ehci_hcd_tilegx_drv_probe() 130 hcd->rsrc_start = ehci_hcd_tilegx_drv_probe() 132 hcd->rsrc_len = gxio_usb_host_get_reg_len(&pdata->usb_ctx); ehci_hcd_tilegx_drv_probe() 133 hcd->regs = gxio_usb_host_get_reg_start(&pdata->usb_ctx); ehci_hcd_tilegx_drv_probe() 137 ehci = hcd_to_ehci(hcd); ehci_hcd_tilegx_drv_probe() 138 ehci->caps = hcd->regs; ehci_hcd_tilegx_drv_probe() 140 hcd->regs + HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); ehci_hcd_tilegx_drv_probe() 170 ret = usb_add_hcd(hcd, pdata->irq, IRQF_SHARED); ehci_hcd_tilegx_drv_probe() 172 platform_set_drvdata(pdev, hcd); ehci_hcd_tilegx_drv_probe() 173 device_wakeup_enable(hcd->self.controller); ehci_hcd_tilegx_drv_probe() 181 usb_put_hcd(hcd); ehci_hcd_tilegx_drv_probe() 189 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_hcd_tilegx_drv_remove() local 192 usb_remove_hcd(hcd); ehci_hcd_tilegx_drv_remove() 193 usb_put_hcd(hcd); ehci_hcd_tilegx_drv_remove()
|
H A D | ohci-tilegx.c | 37 static int tilegx_ohci_start(struct usb_hcd *hcd) tilegx_ohci_start() argument 39 struct ohci_hcd *ohci = hcd_to_ohci(hcd); tilegx_ohci_start() 48 dev_err(hcd->self.controller, "can't start %s\n", tilegx_ohci_start() 49 hcd->self.bus_name); tilegx_ohci_start() 50 ohci_stop(hcd); tilegx_ohci_start() 97 struct usb_hcd *hcd; ohci_hcd_tilegx_drv_probe() local 113 hcd = usb_create_hcd(&ohci_tilegx_hc_driver, &pdev->dev, ohci_hcd_tilegx_drv_probe() 115 if (!hcd) { ohci_hcd_tilegx_drv_probe() 124 hcd->rsrc_start = ohci_hcd_tilegx_drv_probe() 126 hcd->rsrc_len = gxio_usb_host_get_reg_len(&pdata->usb_ctx); ohci_hcd_tilegx_drv_probe() 127 hcd->regs = gxio_usb_host_get_reg_start(&pdata->usb_ctx); ohci_hcd_tilegx_drv_probe() 157 ohci_hcd_init(hcd_to_ohci(hcd)); ohci_hcd_tilegx_drv_probe() 159 ret = usb_add_hcd(hcd, pdata->irq, IRQF_SHARED); ohci_hcd_tilegx_drv_probe() 161 platform_set_drvdata(pdev, hcd); ohci_hcd_tilegx_drv_probe() 162 device_wakeup_enable(hcd->self.controller); ohci_hcd_tilegx_drv_probe() 170 usb_put_hcd(hcd); ohci_hcd_tilegx_drv_probe() 178 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_hcd_tilegx_drv_remove() local 181 usb_remove_hcd(hcd); ohci_hcd_tilegx_drv_remove() 182 usb_put_hcd(hcd); ohci_hcd_tilegx_drv_remove()
|
H A D | ehci-platform.c | 35 #include <linux/usb/hcd.h> 54 static int ehci_platform_reset(struct usb_hcd *hcd) ehci_platform_reset() argument 56 struct platform_device *pdev = to_platform_device(hcd->self.controller); ehci_platform_reset() 58 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_platform_reset() 64 retval = pdata->pre_setup(hcd); ehci_platform_reset() 69 ehci->caps = hcd->regs + pdata->caps_offset; ehci_platform_reset() 70 retval = ehci_setup(hcd); ehci_platform_reset() 81 struct usb_hcd *hcd = platform_get_drvdata(dev); ehci_platform_power_on() local 82 struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); ehci_platform_power_on() 118 struct usb_hcd *hcd = platform_get_drvdata(dev); ehci_platform_power_off() local 119 struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); ehci_platform_power_off() 147 struct usb_hcd *hcd; ehci_platform_probe() local 177 hcd = usb_create_hcd(&ehci_platform_hc_driver, &dev->dev, ehci_platform_probe() 179 if (!hcd) ehci_platform_probe() 182 platform_set_drvdata(dev, hcd); ehci_platform_probe() 184 priv = hcd_to_ehci_priv(hcd); ehci_platform_probe() 185 ehci = hcd_to_ehci(hcd); ehci_platform_probe() 203 hcd->has_tt = 1; ehci_platform_probe() 254 hcd->has_tt = 1; ehci_platform_probe() 282 hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); ehci_platform_probe() 283 if (IS_ERR(hcd->regs)) { ehci_platform_probe() 284 err = PTR_ERR(hcd->regs); ehci_platform_probe() 287 hcd->rsrc_start = res_mem->start; ehci_platform_probe() 288 hcd->rsrc_len = resource_size(res_mem); ehci_platform_probe() 290 err = usb_add_hcd(hcd, irq, IRQF_SHARED); ehci_platform_probe() 294 device_wakeup_enable(hcd->self.controller); ehci_platform_probe() 295 platform_set_drvdata(dev, hcd); ehci_platform_probe() 312 usb_put_hcd(hcd); ehci_platform_probe() 319 struct usb_hcd *hcd = platform_get_drvdata(dev); ehci_platform_remove() local 321 struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); ehci_platform_remove() 324 usb_remove_hcd(hcd); ehci_platform_remove() 335 usb_put_hcd(hcd); ehci_platform_remove() 346 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_platform_suspend() local 353 ret = ehci_suspend(hcd, do_wakeup); ehci_platform_suspend() 365 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_platform_resume() local 369 struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd); ehci_platform_resume() 377 ehci_resume(hcd, priv->reset_on_resume); ehci_platform_resume()
|
H A D | ohci-at91.c | 25 #include <linux/usb/hcd.h> 98 struct usb_hcd *hcd = platform_get_drvdata(pdev); at91_start_hc() local 99 struct ohci_regs __iomem *regs = hcd->regs; at91_start_hc() 100 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); at91_start_hc() 117 struct usb_hcd *hcd = platform_get_drvdata(pdev); at91_stop_hc() local 118 struct ohci_regs __iomem *regs = hcd->regs; at91_stop_hc() 119 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); at91_stop_hc() 157 struct usb_hcd *hcd; usb_hcd_at91_probe() local 165 dev_dbg(dev, "hcd probe: missing irq resource\n"); usb_hcd_at91_probe() 169 hcd = usb_create_hcd(driver, dev, "at91"); usb_hcd_at91_probe() 170 if (!hcd) usb_hcd_at91_probe() 172 ohci_at91 = hcd_to_ohci_at91_priv(hcd); usb_hcd_at91_probe() 175 hcd->regs = devm_ioremap_resource(dev, res); usb_hcd_at91_probe() 176 if (IS_ERR(hcd->regs)) { usb_hcd_at91_probe() 177 retval = PTR_ERR(hcd->regs); usb_hcd_at91_probe() 180 hcd->rsrc_start = res->start; usb_hcd_at91_probe() 181 hcd->rsrc_len = resource_size(res); usb_hcd_at91_probe() 202 board = hcd->self.controller->platform_data; usb_hcd_at91_probe() 203 ohci = hcd_to_ohci(hcd); usb_hcd_at91_probe() 207 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); usb_hcd_at91_probe() 209 device_wakeup_enable(hcd->self.controller); usb_hcd_at91_probe() 217 usb_put_hcd(hcd); usb_hcd_at91_probe() 234 static void usb_hcd_at91_remove(struct usb_hcd *hcd, usb_hcd_at91_remove() argument 237 usb_remove_hcd(hcd); usb_hcd_at91_remove() 239 usb_put_hcd(hcd); usb_hcd_at91_remove() 270 static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf) ohci_at91_hub_status_data() argument 272 struct at91_usbh_data *pdata = hcd->self.controller->platform_data; ohci_at91_hub_status_data() 273 int length = ohci_hub_status_data(hcd, buf); ohci_at91_hub_status_data() 290 static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, ohci_at91_hub_control() argument 293 struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller); ohci_at91_hub_control() 298 dev_dbg(hcd->self.controller, ohci_at91_hub_control() 300 hcd, typeReq, wValue, wIndex, buf, wLength); ohci_at91_hub_control() 307 dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n"); ohci_at91_hub_control() 320 dev_dbg(hcd->self.controller, ohci_at91_hub_control() 331 dev_dbg(hcd->self.controller, ohci_at91_hub_control() 340 dev_dbg(hcd->self.controller, ohci_at91_hub_control() 351 ret = ohci_hub_control(hcd, typeReq, wValue, wIndex + 1, buf, wLength); ohci_at91_hub_control() 362 dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n", ohci_at91_hub_control() 379 dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n", ohci_at91_hub_control() 387 dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex); ohci_at91_hub_control() 591 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_hcd_at91_drv_suspend() local 592 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_hcd_at91_drv_suspend() 593 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); ohci_hcd_at91_drv_suspend() 604 enable_irq_wake(hcd->irq); ohci_hcd_at91_drv_suspend() 606 ret = ohci_suspend(hcd, ohci_at91->wakeup); ohci_hcd_at91_drv_suspend() 609 disable_irq_wake(hcd->irq); ohci_hcd_at91_drv_suspend() 635 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_hcd_at91_drv_resume() local 636 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); ohci_hcd_at91_drv_resume() 639 disable_irq_wake(hcd->irq); ohci_hcd_at91_drv_resume() 643 ohci_resume(hcd, false); ohci_hcd_at91_drv_resume()
|
H A D | ehci-ppc-of.c | 96 struct usb_hcd *hcd; ehci_hcd_ppc_of_probe() local 113 hcd = usb_create_hcd(&ehci_ppc_of_hc_driver, &op->dev, "PPC-OF USB"); ehci_hcd_ppc_of_probe() 114 if (!hcd) ehci_hcd_ppc_of_probe() 117 hcd->rsrc_start = res.start; ehci_hcd_ppc_of_probe() 118 hcd->rsrc_len = resource_size(&res); ehci_hcd_ppc_of_probe() 128 hcd->regs = devm_ioremap_resource(&op->dev, &res); ehci_hcd_ppc_of_probe() 129 if (IS_ERR(hcd->regs)) { ehci_hcd_ppc_of_probe() 130 rv = PTR_ERR(hcd->regs); ehci_hcd_ppc_of_probe() 134 ehci = hcd_to_ehci(hcd); ehci_hcd_ppc_of_probe() 161 ehci->caps = hcd->regs; ehci_hcd_ppc_of_probe() 169 rv = usb_add_hcd(hcd, irq, 0); ehci_hcd_ppc_of_probe() 173 device_wakeup_enable(hcd->self.controller); ehci_hcd_ppc_of_probe() 179 usb_put_hcd(hcd); ehci_hcd_ppc_of_probe() 187 struct usb_hcd *hcd = platform_get_drvdata(op); ehci_hcd_ppc_of_remove() local 188 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_hcd_ppc_of_remove() 195 usb_remove_hcd(hcd); ehci_hcd_ppc_of_remove() 197 irq_dispose_mapping(hcd->irq); ehci_hcd_ppc_of_remove() 216 usb_put_hcd(hcd); ehci_hcd_ppc_of_remove()
|
H A D | ohci-platform.c | 30 #include <linux/usb/hcd.h> 49 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_platform_power_on() local 50 struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd); ohci_platform_power_on() 86 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_platform_power_off() local 87 struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd); ohci_platform_power_off() 115 struct usb_hcd *hcd; ohci_platform_probe() local 142 hcd = usb_create_hcd(&ohci_platform_hc_driver, &dev->dev, ohci_platform_probe() 144 if (!hcd) ohci_platform_probe() 147 platform_set_drvdata(dev, hcd); ohci_platform_probe() 149 priv = hcd_to_ohci_priv(hcd); ohci_platform_probe() 150 ohci = hcd_to_ohci(hcd); ohci_platform_probe() 246 hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); ohci_platform_probe() 247 if (IS_ERR(hcd->regs)) { ohci_platform_probe() 248 err = PTR_ERR(hcd->regs); ohci_platform_probe() 251 hcd->rsrc_start = res_mem->start; ohci_platform_probe() 252 hcd->rsrc_len = resource_size(res_mem); ohci_platform_probe() 254 err = usb_add_hcd(hcd, irq, IRQF_SHARED); ohci_platform_probe() 258 device_wakeup_enable(hcd->self.controller); ohci_platform_probe() 260 platform_set_drvdata(dev, hcd); ohci_platform_probe() 277 usb_put_hcd(hcd); ohci_platform_probe() 284 struct usb_hcd *hcd = platform_get_drvdata(dev); ohci_platform_remove() local 286 struct ohci_platform_priv *priv = hcd_to_ohci_priv(hcd); ohci_platform_remove() 289 usb_remove_hcd(hcd); ohci_platform_remove() 300 usb_put_hcd(hcd); ohci_platform_remove() 311 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_platform_suspend() local 318 ret = ohci_suspend(hcd, do_wakeup); ohci_platform_suspend() 330 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_platform_resume() local 341 ohci_resume(hcd, false); ohci_platform_resume()
|
H A D | ohci-st.c | 27 #include <linux/usb/hcd.h> 50 struct usb_hcd *hcd = platform_get_drvdata(dev); st_ohci_platform_power_on() local 51 struct st_ohci_platform_priv *priv = hcd_to_ohci_priv(hcd); st_ohci_platform_power_on() 101 struct usb_hcd *hcd = platform_get_drvdata(dev); st_ohci_platform_power_off() local 102 struct st_ohci_platform_priv *priv = hcd_to_ohci_priv(hcd); st_ohci_platform_power_off() 134 struct usb_hcd *hcd; st_ohci_platform_probe() local 156 hcd = usb_create_hcd(&ohci_platform_hc_driver, &dev->dev, st_ohci_platform_probe() 158 if (!hcd) st_ohci_platform_probe() 161 platform_set_drvdata(dev, hcd); st_ohci_platform_probe() 163 priv = hcd_to_ohci_priv(hcd); st_ohci_platform_probe() 164 ohci = hcd_to_ohci(hcd); st_ohci_platform_probe() 209 hcd->rsrc_start = res_mem->start; st_ohci_platform_probe() 210 hcd->rsrc_len = resource_size(res_mem); st_ohci_platform_probe() 212 hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); st_ohci_platform_probe() 213 if (IS_ERR(hcd->regs)) { st_ohci_platform_probe() 214 err = PTR_ERR(hcd->regs); st_ohci_platform_probe() 217 err = usb_add_hcd(hcd, irq, IRQF_SHARED); st_ohci_platform_probe() 221 device_wakeup_enable(hcd->self.controller); st_ohci_platform_probe() 223 platform_set_drvdata(dev, hcd); st_ohci_platform_probe() 238 usb_put_hcd(hcd); st_ohci_platform_probe() 245 struct usb_hcd *hcd = platform_get_drvdata(dev); st_ohci_platform_remove() local 247 struct st_ohci_platform_priv *priv = hcd_to_ohci_priv(hcd); st_ohci_platform_remove() 250 usb_remove_hcd(hcd); st_ohci_platform_remove() 259 usb_put_hcd(hcd); st_ohci_platform_remove() 271 struct usb_hcd *hcd = dev_get_drvdata(dev); st_ohci_suspend() local 278 ret = ohci_suspend(hcd, do_wakeup); st_ohci_suspend() 290 struct usb_hcd *hcd = dev_get_drvdata(dev); st_ohci_resume() local 302 ohci_resume(hcd, false); st_ohci_resume()
|
H A D | ehci-grlib.c | 88 struct usb_hcd *hcd; ehci_hcd_grlib_probe() local 106 hcd = usb_create_hcd(&ehci_grlib_hc_driver, &op->dev, ehci_hcd_grlib_probe() 108 if (!hcd) ehci_hcd_grlib_probe() 111 hcd->rsrc_start = res.start; ehci_hcd_grlib_probe() 112 hcd->rsrc_len = resource_size(&res); ehci_hcd_grlib_probe() 122 hcd->regs = devm_ioremap_resource(&op->dev, &res); ehci_hcd_grlib_probe() 123 if (IS_ERR(hcd->regs)) { ehci_hcd_grlib_probe() 124 rv = PTR_ERR(hcd->regs); ehci_hcd_grlib_probe() 128 ehci = hcd_to_ehci(hcd); ehci_hcd_grlib_probe() 130 ehci->caps = hcd->regs; ehci_hcd_grlib_probe() 140 rv = usb_add_hcd(hcd, irq, 0); ehci_hcd_grlib_probe() 144 device_wakeup_enable(hcd->self.controller); ehci_hcd_grlib_probe() 150 usb_put_hcd(hcd); ehci_hcd_grlib_probe() 158 struct usb_hcd *hcd = platform_get_drvdata(op); ehci_hcd_grlib_remove() local 162 usb_remove_hcd(hcd); ehci_hcd_grlib_remove() 164 irq_dispose_mapping(hcd->irq); ehci_hcd_grlib_remove() 166 usb_put_hcd(hcd); ehci_hcd_grlib_remove()
|
H A D | ehci-tegra.c | 36 #include <linux/usb/hcd.h> 81 struct usb_hcd *hcd = platform_get_drvdata(pdev); tegra_reset_usb_controller() local 83 (struct tegra_ehci_hcd *)hcd_to_ehci(hcd)->priv; tegra_reset_usb_controller() 185 struct usb_hcd *hcd, tegra_ehci_hub_control() 193 struct ehci_hcd *ehci = hcd_to_ehci(hcd); tegra_ehci_hub_control() 209 tegra_usb_phy_postresume(hcd->usb_phy); tegra_ehci_hub_control() 262 tegra_usb_phy_preresume(hcd->usb_phy); tegra_ehci_hub_control() 291 return ehci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength); tegra_ehci_hub_control() 361 static int tegra_ehci_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, tegra_ehci_map_urb_for_dma() argument 370 ret = usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); tegra_ehci_map_urb_for_dma() 377 static void tegra_ehci_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) tegra_ehci_unmap_urb_for_dma() argument 379 usb_hcd_unmap_urb_for_dma(hcd, urb); tegra_ehci_unmap_urb_for_dma() 402 struct usb_hcd *hcd; tegra_ehci_probe() local 424 hcd = usb_create_hcd(&tegra_ehci_hc_driver, &pdev->dev, tegra_ehci_probe() 426 if (!hcd) { tegra_ehci_probe() 430 platform_set_drvdata(pdev, hcd); tegra_ehci_probe() 431 ehci = hcd_to_ehci(hcd); tegra_ehci_probe() 434 hcd->has_tt = 1; tegra_ehci_probe() 463 hcd->usb_phy = u_phy; tegra_ehci_probe() 469 hcd->regs = devm_ioremap_resource(&pdev->dev, res); tegra_ehci_probe() 470 if (IS_ERR(hcd->regs)) { tegra_ehci_probe() 471 err = PTR_ERR(hcd->regs); tegra_ehci_probe() 474 hcd->rsrc_start = res->start; tegra_ehci_probe() 475 hcd->rsrc_len = resource_size(res); tegra_ehci_probe() 477 ehci->caps = hcd->regs + 0x100; tegra_ehci_probe() 480 err = usb_phy_init(hcd->usb_phy); tegra_ehci_probe() 492 u_phy->otg->host = hcd_to_bus(hcd); tegra_ehci_probe() 494 err = usb_phy_set_suspend(hcd->usb_phy, 0); tegra_ehci_probe() 507 otg_set_host(u_phy->otg, &hcd->self); tegra_ehci_probe() 509 err = usb_add_hcd(hcd, irq, IRQF_SHARED); tegra_ehci_probe() 514 device_wakeup_enable(hcd->self.controller); tegra_ehci_probe() 521 usb_phy_shutdown(hcd->usb_phy); tegra_ehci_probe() 525 usb_put_hcd(hcd); tegra_ehci_probe() 531 struct usb_hcd *hcd = platform_get_drvdata(pdev); tegra_ehci_remove() local 533 (struct tegra_ehci_hcd *)hcd_to_ehci(hcd)->priv; tegra_ehci_remove() 535 otg_set_host(hcd->usb_phy->otg, NULL); tegra_ehci_remove() 537 usb_phy_shutdown(hcd->usb_phy); tegra_ehci_remove() 538 usb_remove_hcd(hcd); tegra_ehci_remove() 542 usb_put_hcd(hcd); tegra_ehci_remove() 549 struct usb_hcd *hcd = platform_get_drvdata(pdev); tegra_ehci_hcd_shutdown() local 551 if (hcd->driver->shutdown) tegra_ehci_hcd_shutdown() 552 hcd->driver->shutdown(hcd); tegra_ehci_hcd_shutdown() 565 static int tegra_ehci_reset(struct usb_hcd *hcd) tegra_ehci_reset() argument 567 struct ehci_hcd *ehci = hcd_to_ehci(hcd); tegra_ehci_reset() 571 retval = ehci_setup(hcd); tegra_ehci_reset() 184 tegra_ehci_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength ) tegra_ehci_hub_control() argument
|
H A D | ohci-omap3.c | 40 #include <linux/usb/hcd.h> 65 struct usb_hcd *hcd = NULL; ohci_hcd_omap3_probe() local 107 hcd = usb_create_hcd(&ohci_omap3_hc_driver, dev, ohci_hcd_omap3_probe() 109 if (!hcd) { ohci_hcd_omap3_probe() 114 hcd->rsrc_start = res->start; ohci_hcd_omap3_probe() 115 hcd->rsrc_len = resource_size(res); ohci_hcd_omap3_probe() 116 hcd->regs = regs; ohci_hcd_omap3_probe() 121 ohci = hcd_to_ohci(hcd); ohci_hcd_omap3_probe() 128 ret = usb_add_hcd(hcd, irq, 0); ohci_hcd_omap3_probe() 130 dev_dbg(dev, "failed to add hcd with err %d\n", ret); ohci_hcd_omap3_probe() 133 device_wakeup_enable(hcd->self.controller); ohci_hcd_omap3_probe() 139 usb_put_hcd(hcd); ohci_hcd_omap3_probe() 163 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_hcd_omap3_remove() local 165 iounmap(hcd->regs); ohci_hcd_omap3_remove() 166 usb_remove_hcd(hcd); ohci_hcd_omap3_remove() 169 usb_put_hcd(hcd); ohci_hcd_omap3_remove()
|
H A D | ohci-pci.c | 22 #include <linux/usb/hcd.h> 34 static int broken_suspend(struct usb_hcd *hcd) broken_suspend() argument 36 device_init_wakeup(&hcd->self.root_hub->dev, 0); broken_suspend() 43 static int ohci_quirk_amd756(struct usb_hcd *hcd) ohci_quirk_amd756() argument 45 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_quirk_amd756() 51 return broken_suspend(hcd); ohci_quirk_amd756() 58 static int ohci_quirk_opti(struct usb_hcd *hcd) ohci_quirk_opti() argument 60 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_quirk_opti() 71 static int ohci_quirk_ns(struct usb_hcd *hcd) ohci_quirk_ns() argument 73 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); ohci_quirk_ns() 79 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_quirk_ns() 93 static int ohci_quirk_zfmicro(struct usb_hcd *hcd) ohci_quirk_zfmicro() argument 95 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_quirk_zfmicro() 106 static int ohci_quirk_toshiba_scc(struct usb_hcd *hcd) ohci_quirk_toshiba_scc() argument 108 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_quirk_toshiba_scc() 139 static int ohci_quirk_nec(struct usb_hcd *hcd) ohci_quirk_nec() argument 141 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_quirk_nec() 150 static int ohci_quirk_amd700(struct usb_hcd *hcd) ohci_quirk_amd700() argument 152 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_quirk_amd700() 225 static int ohci_pci_reset (struct usb_hcd *hcd) ohci_pci_reset() argument 227 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_pci_reset() 228 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); ohci_pci_reset() 231 if (hcd->self.controller) { ohci_pci_reset() 238 ret = quirk(hcd); ohci_pci_reset() 243 ret = ohci_setup(hcd); ohci_pci_reset()
|
H A D | ehci-orion.c | 22 #include <linux/usb/hcd.h> 28 #define rdl(off) readl_relaxed(hcd->regs + (off)) 29 #define wrl(off, val) writel_relaxed((val), hcd->regs + (off)) 66 static void orion_usb_phy_v1_setup(struct usb_hcd *hcd) orion_usb_phy_v1_setup() argument 134 ehci_orion_conf_mbus_windows(struct usb_hcd *hcd, ehci_orion_conf_mbus_windows() argument 163 struct usb_hcd *hcd; ehci_orion_drv_probe() local 200 hcd = usb_create_hcd(&ehci_orion_hc_driver, ehci_orion_drv_probe() 202 if (!hcd) { ehci_orion_drv_probe() 207 hcd->rsrc_start = res->start; ehci_orion_drv_probe() 208 hcd->rsrc_len = resource_size(res); ehci_orion_drv_probe() 209 hcd->regs = regs; ehci_orion_drv_probe() 211 ehci = hcd_to_ehci(hcd); ehci_orion_drv_probe() 212 ehci->caps = hcd->regs + 0x100; ehci_orion_drv_probe() 213 hcd->has_tt = 1; ehci_orion_drv_probe() 215 priv = hcd_to_orion_priv(hcd); ehci_orion_drv_probe() 244 ehci_orion_conf_mbus_windows(hcd, dram); ehci_orion_drv_probe() 258 orion_usb_phy_v1_setup(hcd); ehci_orion_drv_probe() 266 err = usb_add_hcd(hcd, irq, IRQF_SHARED); ehci_orion_drv_probe() 270 device_wakeup_enable(hcd->self.controller); ehci_orion_drv_probe() 283 usb_put_hcd(hcd); ehci_orion_drv_probe() 293 struct usb_hcd *hcd = platform_get_drvdata(pdev); ehci_orion_drv_remove() local 294 struct orion_ehci_hcd *priv = hcd_to_orion_priv(hcd); ehci_orion_drv_remove() 296 usb_remove_hcd(hcd); ehci_orion_drv_remove() 306 usb_put_hcd(hcd); ehci_orion_drv_remove()
|
H A D | uhci-pci.c | 4 * Extracted from uhci-hcd.c: 45 * This function is called at the end of configure_hc in uhci-hcd.c. 113 static int uhci_pci_init(struct usb_hcd *hcd) uhci_pci_init() argument 115 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_pci_init() 117 uhci->io_addr = (unsigned long) hcd->rsrc_start; uhci_pci_init() 119 uhci->rh_numports = uhci_count_ports(hcd); uhci_pci_init() 158 struct usb_hcd *hcd = pci_get_drvdata(pdev); uhci_shutdown() local 160 uhci_hc_died(hcd_to_uhci(hcd)); uhci_shutdown() 165 static int uhci_pci_resume(struct usb_hcd *hcd, bool hibernated); 167 static int uhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) uhci_pci_suspend() argument 169 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_pci_suspend() 176 if (!HCD_HW_ACCESSIBLE(hcd) || uhci->dead) uhci_pci_suspend() 183 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); uhci_pci_suspend() 193 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); uhci_pci_suspend() 196 synchronize_irq(hcd->irq); uhci_pci_suspend() 199 if (do_wakeup && HCD_WAKEUP_PENDING(hcd)) { uhci_pci_suspend() 200 uhci_pci_resume(hcd, false); uhci_pci_suspend() 206 static int uhci_pci_resume(struct usb_hcd *hcd, bool hibernated) uhci_pci_resume() argument 208 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_pci_resume() 215 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); uhci_pci_resume() 235 usb_root_hub_lost_power(hcd->self.root_hub); uhci_pci_resume() 242 if (!uhci->RD_enable && hcd->self.root_hub->do_remote_wakeup) uhci_pci_resume() 243 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); uhci_pci_resume() 246 usb_hcd_poll_rh_status(hcd); uhci_pci_resume()
|
H A D | ohci-pxa27x.c | 36 #include <linux/usb/hcd.h> 128 #define to_pxa27x_ohci(hcd) (struct pxa27x_ohci *)(hcd_to_ohci(hcd)->priv) 194 static int pxa27x_ohci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, pxa27x_ohci_hub_control() argument 197 struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); pxa27x_ohci_hub_control() 216 return ohci_hub_control(hcd, typeReq, wValue, wIndex, buf, wLength); pxa27x_ohci_hub_control() 280 struct usb_hcd *hcd = dev_get_drvdata(dev); pxa27x_start_hc() local 303 pxa3xx_u2d_start_hc(&hcd->self); pxa27x_start_hc() 317 struct usb_hcd *hcd = dev_get_drvdata(dev); pxa27x_stop_hc() local 323 pxa3xx_u2d_stop_hc(&hcd->self); pxa27x_stop_hc() 418 struct usb_hcd *hcd; usb_hcd_pxa27x_probe() local 445 hcd = usb_create_hcd (driver, &pdev->dev, "pxa27x"); usb_hcd_pxa27x_probe() 446 if (!hcd) usb_hcd_pxa27x_probe() 450 hcd->regs = devm_ioremap_resource(&pdev->dev, r); usb_hcd_pxa27x_probe() 451 if (IS_ERR(hcd->regs)) { usb_hcd_pxa27x_probe() 452 retval = PTR_ERR(hcd->regs); usb_hcd_pxa27x_probe() 455 hcd->rsrc_start = r->start; usb_hcd_pxa27x_probe() 456 hcd->rsrc_len = resource_size(r); usb_hcd_pxa27x_probe() 459 pxa_ohci = to_pxa27x_ohci(hcd); usb_hcd_pxa27x_probe() 461 pxa_ohci->mmio_base = (void __iomem *)hcd->regs; usb_hcd_pxa27x_probe() 483 hcd->power_budget = inf->power_budget; usb_hcd_pxa27x_probe() 486 ohci = hcd_to_ohci(hcd); usb_hcd_pxa27x_probe() 489 retval = usb_add_hcd(hcd, irq, 0); usb_hcd_pxa27x_probe() 491 device_wakeup_enable(hcd->self.controller); usb_hcd_pxa27x_probe() 497 usb_put_hcd(hcd); usb_hcd_pxa27x_probe() 515 void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *pdev) usb_hcd_pxa27x_remove() argument 517 struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); usb_hcd_pxa27x_remove() 520 usb_remove_hcd(hcd); usb_hcd_pxa27x_remove() 526 usb_put_hcd(hcd); usb_hcd_pxa27x_remove() 543 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_hcd_pxa27x_drv_remove() local 545 usb_hcd_pxa27x_remove(hcd, pdev); ohci_hcd_pxa27x_drv_remove() 552 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_hcd_pxa27x_drv_suspend() local 553 struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); ohci_hcd_pxa27x_drv_suspend() 554 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_hcd_pxa27x_drv_suspend() 563 ret = ohci_suspend(hcd, do_wakeup); ohci_hcd_pxa27x_drv_suspend() 573 struct usb_hcd *hcd = dev_get_drvdata(dev); ohci_hcd_pxa27x_drv_resume() local 574 struct pxa27x_ohci *pxa_ohci = to_pxa27x_ohci(hcd); ohci_hcd_pxa27x_drv_resume() 576 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_hcd_pxa27x_drv_resume() 590 ohci_resume(hcd, false); ohci_hcd_pxa27x_drv_resume()
|
H A D | ehci-omap.c | 44 #include <linux/usb/hcd.h> 105 struct usb_hcd *hcd; ehci_hcd_omap_probe() local 152 hcd = usb_create_hcd(&ehci_omap_hc_driver, dev, ehci_hcd_omap_probe() 154 if (!hcd) { ehci_hcd_omap_probe() 159 hcd->rsrc_start = res->start; ehci_hcd_omap_probe() 160 hcd->rsrc_len = resource_size(res); ehci_hcd_omap_probe() 161 hcd->regs = regs; ehci_hcd_omap_probe() 162 hcd_to_ehci(hcd)->caps = regs; ehci_hcd_omap_probe() 164 omap = (struct omap_hcd *)hcd_to_ehci(hcd)->priv; ehci_hcd_omap_probe() 167 platform_set_drvdata(pdev, hcd); ehci_hcd_omap_probe() 213 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); ehci_hcd_omap_probe() 215 dev_err(dev, "failed to add hcd with err %d\n", ret); ehci_hcd_omap_probe() 218 device_wakeup_enable(hcd->self.controller); ehci_hcd_omap_probe() 247 usb_put_hcd(hcd); ehci_hcd_omap_probe() 264 struct usb_hcd *hcd = dev_get_drvdata(dev); ehci_hcd_omap_remove() local 265 struct omap_hcd *omap = (struct omap_hcd *)hcd_to_ehci(hcd)->priv; ehci_hcd_omap_remove() 268 usb_remove_hcd(hcd); ehci_hcd_omap_remove() 275 usb_put_hcd(hcd); ehci_hcd_omap_remove()
|
H A D | ohci-nxp.c | 31 #include <linux/usb/hcd.h> 166 struct usb_hcd *hcd = 0; ohci_hcd_nxp_probe() local 250 hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev)); ohci_hcd_nxp_probe() 251 if (!hcd) { ohci_hcd_nxp_probe() 258 hcd->regs = devm_ioremap_resource(&pdev->dev, res); ohci_hcd_nxp_probe() 259 if (IS_ERR(hcd->regs)) { ohci_hcd_nxp_probe() 260 ret = PTR_ERR(hcd->regs); ohci_hcd_nxp_probe() 263 hcd->rsrc_start = res->start; ohci_hcd_nxp_probe() 264 hcd->rsrc_len = resource_size(res); ohci_hcd_nxp_probe() 273 platform_set_drvdata(pdev, hcd); ohci_hcd_nxp_probe() 275 dev_info(&pdev->dev, "at 0x%p, irq %d\n", hcd->regs, hcd->irq); ohci_hcd_nxp_probe() 276 ret = usb_add_hcd(hcd, irq, 0); ohci_hcd_nxp_probe() 278 device_wakeup_enable(hcd->self.controller); ohci_hcd_nxp_probe() 284 usb_put_hcd(hcd); ohci_hcd_nxp_probe() 298 struct usb_hcd *hcd = platform_get_drvdata(pdev); ohci_hcd_nxp_remove() local 300 usb_remove_hcd(hcd); ohci_hcd_nxp_remove() 302 usb_put_hcd(hcd); ohci_hcd_nxp_remove()
|
H A D | fhci-hcd.c | 28 #include <linux/usb/hcd.h> 327 static int fhci_start(struct usb_hcd *hcd) fhci_start() argument 330 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_start() 360 hcd->state = HC_STATE_RUNNING; fhci_start() 378 static void fhci_stop(struct usb_hcd *hcd) fhci_stop() argument 380 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_stop() 390 static int fhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, fhci_urb_enqueue() argument 393 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_urb_enqueue() 447 ret = usb_hcd_link_urb_to_ep(hcd, urb); fhci_urb_enqueue() 470 static int fhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) fhci_urb_dequeue() argument 472 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_urb_dequeue() 482 ret = usb_hcd_check_unlink_urb(hcd, urb, status); fhci_urb_dequeue() 512 static void fhci_endpoint_disable(struct usb_hcd *hcd, fhci_endpoint_disable() argument 519 fhci = hcd_to_fhci(hcd); fhci_endpoint_disable() 533 static int fhci_get_frame_number(struct usb_hcd *hcd) fhci_get_frame_number() argument 535 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_get_frame_number() 570 struct usb_hcd *hcd; of_fhci_probe() local 589 hcd = usb_create_hcd(&fhci_driver, dev, dev_name(dev)); of_fhci_probe() 590 if (!hcd) { of_fhci_probe() 591 dev_err(dev, "could not create hcd\n"); of_fhci_probe() 595 fhci = hcd_to_fhci(hcd); of_fhci_probe() 596 hcd->self.controller = dev; of_fhci_probe() 597 dev_set_drvdata(dev, hcd); of_fhci_probe() 601 hcd->power_budget = *iprop; of_fhci_probe() 610 hcd->regs = ioremap(usb_regs.start, resource_size(&usb_regs)); of_fhci_probe() 611 if (!hcd->regs) { of_fhci_probe() 616 fhci->regs = hcd->regs; of_fhci_probe() 694 0, "qe timer (usb)", hcd); of_fhci_probe() 736 dev_info(dev, "at 0x%p, irq %d\n", hcd->regs, usb_irq); of_fhci_probe() 753 ret = usb_add_hcd(hcd, usb_irq, 0); of_fhci_probe() 757 device_wakeup_enable(hcd->self.controller); of_fhci_probe() 767 free_irq(fhci->timer->irq, hcd); of_fhci_probe() 781 iounmap(hcd->regs); of_fhci_probe() 783 usb_put_hcd(hcd); of_fhci_probe() 789 struct usb_hcd *hcd = dev_get_drvdata(dev); fhci_remove() local 790 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_remove() 794 usb_remove_hcd(hcd); fhci_remove() 795 free_irq(fhci->timer->irq, hcd); fhci_remove() 806 usb_put_hcd(hcd); fhci_remove()
|
H A D | imx21-hcd.c | 59 #include <linux/usb/hcd.h> 63 #include "imx21-hcd.h" 76 static const char hcd_name[] = "imx21-hcd"; 78 static inline struct imx21 *hcd_to_imx21(struct usb_hcd *hcd) hcd_to_imx21() argument 80 return (struct imx21 *)hcd->hcd_priv; hcd_to_imx21() 138 static int imx21_hc_get_frame(struct usb_hcd *hcd) imx21_hc_get_frame() argument 140 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_get_frame() 520 static void urb_done(struct usb_hcd *hcd, struct urb *urb, int status) 524 struct imx21 *imx21 = hcd_to_imx21(hcd); 534 usb_hcd_unlink_urb_from_ep(hcd, urb); 536 usb_hcd_giveback_urb(hcd, urb, status); 547 urb_done(imx21->hcd, etd->urb, status); nonisoc_urb_completed_for_etd() 564 static void schedule_isoc_etds(struct usb_hcd *hcd, schedule_isoc_etds() argument 567 struct imx21 *imx21 = hcd_to_imx21(hcd); schedule_isoc_etds() 594 cur_frame = imx21_hc_get_frame(hcd); schedule_isoc_etds() 603 urb_done(hcd, td->urb, urb_priv->isoc_status); schedule_isoc_etds() 631 static void isoc_etd_done(struct usb_hcd *hcd, int etd_num) isoc_etd_done() argument 633 struct imx21 *imx21 = hcd_to_imx21(hcd); isoc_etd_done() 661 imx21_hc_get_frame(hcd), td, cc, bytes_xfrd); isoc_etd_done() 667 cc, imx21_hc_get_frame(hcd), td->frame, isoc_etd_done() 688 urb_done(hcd, urb, urb_priv->isoc_status); isoc_etd_done() 690 schedule_isoc_etds(hcd, ep); isoc_etd_done() 739 static int imx21_hc_urb_enqueue_isoc(struct usb_hcd *hcd, imx21_hc_urb_enqueue_isoc() argument 743 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_urb_enqueue_isoc() 780 ret = usb_hcd_link_urb_to_ep(hcd, urb); imx21_hc_urb_enqueue_isoc() 815 cur_frame = imx21_hc_get_frame(hcd); imx21_hc_urb_enqueue_isoc() 861 schedule_isoc_etds(hcd, ep); imx21_hc_urb_enqueue_isoc() 867 usb_hcd_unlink_urb_from_ep(hcd, urb); imx21_hc_urb_enqueue_isoc() 944 usb_hcd_unmap_urb_setup_for_dma(imx21->hcd, schedule_nonisoc_etd() 961 usb_hcd_unmap_urb_for_dma(imx21->hcd, urb); schedule_nonisoc_etd() 1043 static void nonisoc_etd_done(struct usb_hcd *hcd, int etd_num) nonisoc_etd_done() argument 1045 struct imx21 *imx21 = hcd_to_imx21(hcd); nonisoc_etd_done() 1164 static int imx21_hc_urb_enqueue(struct usb_hcd *hcd, imx21_hc_urb_enqueue() argument 1167 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_urb_enqueue() 1184 return imx21_hc_urb_enqueue_isoc(hcd, ep, urb, mem_flags); imx21_hc_urb_enqueue() 1203 ret = usb_hcd_link_urb_to_ep(hcd, urb); imx21_hc_urb_enqueue() 1260 static int imx21_hc_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, imx21_hc_urb_dequeue() argument 1263 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_urb_dequeue() 1275 ret = usb_hcd_check_unlink_urb(hcd, urb, status); imx21_hc_urb_dequeue() 1285 schedule_isoc_etds(hcd, ep); imx21_hc_urb_dequeue() 1299 urb_done(hcd, urb, status); imx21_hc_urb_dequeue() 1313 static void process_etds(struct usb_hcd *hcd, struct imx21 *imx21, int sof) process_etds() argument 1395 isoc_etd_done(hcd, etd_num); process_etds() 1397 nonisoc_etd_done(hcd, etd_num); process_etds() 1410 static irqreturn_t imx21_irq(struct usb_hcd *hcd) imx21_irq() argument 1412 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_irq() 1422 process_etds(hcd, imx21, ints & USBH_SYSISR_SOFINT); imx21_irq() 1428 static void imx21_hc_endpoint_disable(struct usb_hcd *hcd, imx21_hc_endpoint_disable() argument 1431 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_endpoint_disable() 1473 static int get_hub_descriptor(struct usb_hcd *hcd, get_hub_descriptor() argument 1476 struct imx21 *imx21 = hcd_to_imx21(hcd); get_hub_descriptor() 1493 static int imx21_hc_hub_status_data(struct usb_hcd *hcd, char *buf) imx21_hc_hub_status_data() argument 1495 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_hub_status_data() 1527 static int imx21_hc_hub_control(struct usb_hcd *hcd, imx21_hc_hub_control() argument 1531 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_hub_control() 1597 rc = get_hub_descriptor(hcd, (void *)buf); imx21_hc_hub_control() 1667 static int imx21_hc_reset(struct usb_hcd *hcd) imx21_hc_reset() argument 1669 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_reset() 1696 static int imx21_hc_start(struct usb_hcd *hcd) imx21_hc_start() argument 1698 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_start() 1751 hcd->state = HC_STATE_RUNNING; imx21_hc_start() 1764 static void imx21_hc_stop(struct usb_hcd *hcd) imx21_hc_stop() argument 1766 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_hc_stop() 1819 struct usb_hcd *hcd = platform_get_drvdata(pdev); imx21_remove() local 1820 struct imx21 *imx21 = hcd_to_imx21(hcd); imx21_remove() 1824 usb_remove_hcd(hcd); imx21_remove() 1833 kfree(hcd); imx21_remove() 1840 struct usb_hcd *hcd; imx21_probe() local 1855 hcd = usb_create_hcd(&imx21_hc_driver, imx21_probe() 1857 if (hcd == NULL) { imx21_probe() 1858 dev_err(&pdev->dev, "Cannot create hcd (%s)\n", imx21_probe() 1863 imx21 = hcd_to_imx21(hcd); imx21_probe() 1864 imx21->hcd = hcd; imx21_probe() 1907 ret = usb_add_hcd(hcd, irq, 0); imx21_probe() 1912 device_wakeup_enable(hcd->self.controller); imx21_probe() 1927 usb_put_hcd(hcd); imx21_probe() 1946 MODULE_ALIAS("platform:imx21-hcd");
|
H A D | sl811-hcd.c | 47 #include <linux/usb/hcd.h> 63 MODULE_ALIAS("platform:sl811-hcd"); 73 static const char hcd_name[] = "sl811-hcd"; 79 struct usb_hcd *hcd = sl811_to_hcd(sl811); port_power() local 91 hcd->state = HC_STATE_HALT; port_power() 99 dev_dbg(hcd->self.controller, "power %s\n", port_power() 101 sl811->board->port_power(hcd->self.controller, is_on); port_power() 106 sl811->board->reset(hcd->self.controller); port_power() 619 static irqreturn_t sl811h_irq(struct usb_hcd *hcd) sl811h_irq() argument 621 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_irq() 670 // dev_err(hcd->self.controller, "overrun to slot %d\n", index); sl811h_irq() 728 dev_dbg(hcd->self.controller, "wakeup\n"); sl811h_irq() 790 struct usb_hcd *hcd, sl811h_urb_enqueue() 794 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_urb_enqueue() 822 || !HC_IS_RUNNING(hcd->state)) { sl811h_urb_enqueue() 827 retval = usb_hcd_link_urb_to_ep(hcd, urb); sl811h_urb_enqueue() 857 dev_dbg(hcd->self.controller, sl811h_urb_enqueue() 923 dev_dbg(hcd->self.controller, "schedule qh%d/%p branch %d\n", sl811h_urb_enqueue() 942 hcd->self.bandwidth_allocated += ep->load / ep->period; sl811h_urb_enqueue() 951 usb_hcd_unlink_urb_from_ep(hcd, urb); sl811h_urb_enqueue() 957 static int sl811h_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) sl811h_urb_dequeue() argument 959 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_urb_dequeue() 966 retval = usb_hcd_check_unlink_urb(hcd, urb, status); sl811h_urb_dequeue() 983 dev_dbg(hcd->self.controller, sl811h_urb_dequeue() 998 dev_dbg(hcd->self.controller, sl811h_urb_dequeue() 1028 sl811h_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep) sl811h_endpoint_disable() argument 1039 dev_warn(hcd->self.controller, "ep %p not empty?\n", ep); sl811h_endpoint_disable() 1046 sl811h_get_frame(struct usb_hcd *hcd) sl811h_get_frame() argument 1048 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_get_frame() 1062 sl811h_hub_status_data(struct usb_hcd *hcd, char *buf) sl811h_hub_status_data() argument 1064 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_hub_status_data() 1073 if (sl811h_irq( /* ~0, */ hcd) != IRQ_NONE) sl811h_hub_status_data() 1212 struct usb_hcd *hcd, sl811h_hub_control() 1219 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_hub_control() 1254 dev_dbg(hcd->self.controller, "start resume...\n"); sl811h_hub_control() 1292 dev_dbg(hcd->self.controller, "GetPortStatus %08x\n", sl811h_hub_control() 1305 dev_dbg(hcd->self.controller,"suspend...\n"); sl811h_hub_control() 1347 sl811h_bus_suspend(struct usb_hcd *hcd) sl811h_bus_suspend() argument 1350 dev_dbg(hcd->self.controller, "%s\n", __func__); sl811h_bus_suspend() 1355 sl811h_bus_resume(struct usb_hcd *hcd) sl811h_bus_resume() argument 1358 dev_dbg(hcd->self.controller, "%s\n", __func__); sl811h_bus_resume() 1522 sl811h_stop(struct usb_hcd *hcd) sl811h_stop() argument 1524 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_stop() 1527 del_timer_sync(&hcd->rh_timer); sl811h_stop() 1535 sl811h_start(struct usb_hcd *hcd) sl811h_start() argument 1537 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_start() 1540 hcd->state = HC_STATE_RUNNING; sl811h_start() 1543 if (!device_can_wakeup(hcd->self.controller)) sl811h_start() 1544 device_init_wakeup(hcd->self.controller, sl811h_start() 1546 hcd->power_budget = sl811->board->power * 2; sl811h_start() 1597 struct usb_hcd *hcd = platform_get_drvdata(dev); sl811h_remove() local 1598 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_remove() 1602 usb_remove_hcd(hcd); sl811h_remove() 1613 usb_put_hcd(hcd); sl811h_remove() 1620 struct usb_hcd *hcd; sl811h_probe() local 1682 /* allocate and initialize hcd */ sl811h_probe() 1683 hcd = usb_create_hcd(&sl811h_hc_driver, &dev->dev, dev_name(&dev->dev)); sl811h_probe() 1684 if (!hcd) { sl811h_probe() 1688 hcd->rsrc_start = addr->start; sl811h_probe() 1689 sl811 = hcd_to_sl811(hcd); sl811h_probe() 1706 hcd->product_desc = "SL811HS v1.2"; sl811h_probe() 1709 hcd->product_desc = "SL811HS v1.5"; sl811h_probe() 1728 retval = usb_add_hcd(hcd, irq, irqflags); sl811h_probe() 1732 device_wakeup_enable(hcd->self.controller); sl811h_probe() 1738 usb_put_hcd(hcd); sl811h_probe() 1759 struct usb_hcd *hcd = platform_get_drvdata(dev); sl811h_suspend() local 1760 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_suspend() 1765 retval = sl811h_bus_suspend(hcd); sl811h_suspend() 1779 struct usb_hcd *hcd = platform_get_drvdata(dev); sl811h_resume() local 1780 struct sl811 *sl811 = hcd_to_sl811(hcd); sl811h_resume() 1785 if (!sl811->port1 || !device_can_wakeup(&hcd->self.root_hub->dev)) { sl811h_resume() 1788 usb_root_hub_lost_power(hcd->self.root_hub); sl811h_resume() 1792 return sl811h_bus_resume(hcd); sl811h_resume() 789 sl811h_urb_enqueue( struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags ) sl811h_urb_enqueue() argument 1211 sl811h_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength ) sl811h_hub_control() argument
|
H A D | ohci-hcd.c | 37 #include <linux/usb/hcd.h> 81 static void ohci_stop(struct usb_hcd *hcd); 145 struct usb_hcd *hcd, ohci_urb_enqueue() 149 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_urb_enqueue() 212 if (!HCD_HW_ACCESSIBLE(hcd)) { ohci_urb_enqueue() 220 retval = usb_hcd_link_urb_to_ep(hcd, urb); ohci_urb_enqueue() 228 usb_hcd_unlink_urb_from_ep(hcd, urb); ohci_urb_enqueue() 311 static int ohci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ohci_urb_dequeue() argument 313 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_urb_dequeue() 319 rc = usb_hcd_check_unlink_urb(hcd, urb, status); ohci_urb_dequeue() 346 ohci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep) ohci_endpoint_disable() argument 348 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_endpoint_disable() 399 static int ohci_get_frame (struct usb_hcd *hcd) ohci_get_frame() argument 401 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_get_frame() 419 ohci_shutdown (struct usb_hcd *hcd) ohci_shutdown() argument 423 ohci = hcd_to_ohci (hcd); ohci_shutdown() 444 struct usb_hcd *hcd = ohci_to_hcd(ohci); ohci_init() local 447 hcd->self.sg_tablesize = ~0; ohci_init() 453 ohci->regs = hcd->regs; ohci_init() 505 ohci->hcca = dma_alloc_coherent (hcd->self.controller, ohci_init() 511 ohci_stop (hcd); ohci_init() 529 struct usb_hcd *hcd = ohci_to_hcd(ohci); ohci_run() local 552 device_set_wakeup_capable(hcd->self.controller, 1); ohci_run() 637 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); ohci_run() 638 hcd->uses_new_polling = 1; ohci_run() 689 int ohci_setup(struct usb_hcd *hcd) ohci_setup() argument 691 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_setup() 700 static int ohci_start(struct usb_hcd *hcd) ohci_start() argument 702 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_start() 708 ohci_stop(hcd); ohci_start() 853 static irqreturn_t ohci_irq (struct usb_hcd *hcd) ohci_irq() argument 855 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_irq() 871 usb_hc_died(hcd); ohci_irq() 896 usb_hc_died(hcd); ohci_irq() 918 usb_hcd_poll_rh_status(hcd); ohci_irq() 928 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); ohci_irq() 934 usb_hcd_resume_root_hub(hcd); ohci_irq() 967 static void ohci_stop (struct usb_hcd *hcd) ohci_stop() argument 969 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_stop() 979 free_irq(hcd->irq, hcd); ohci_stop() 980 hcd->irq = 0; ohci_stop() 988 dma_free_coherent (hcd->self.controller, ohci_stop() 1067 int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup) ohci_suspend() argument 1069 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_suspend() 1081 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_suspend() 1084 synchronize_irq(hcd->irq); ohci_suspend() 1086 if (do_wakeup && HCD_WAKEUP_PENDING(hcd)) { ohci_suspend() 1087 ohci_resume(hcd, false); ohci_suspend() 1095 int ohci_resume(struct usb_hcd *hcd, bool hibernated) ohci_resume() argument 1097 struct ohci_hcd *ohci = hcd_to_ohci(hcd); ohci_resume() 1101 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_resume() 1139 usb_hcd_resume_root_hub(hcd); ohci_resume() 144 ohci_urb_enqueue( struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags ) ohci_urb_enqueue() argument
|
H A D | isp116x-hcd.c | 67 #include <linux/usb/hcd.h> 82 static const char hcd_name[] = "isp116x-hcd"; 590 static irqreturn_t isp116x_irq(struct usb_hcd *hcd) isp116x_irq() argument 592 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_irq() 613 hcd->state = HC_STATE_HALT; isp116x_irq() 614 usb_hc_died(hcd); isp116x_irq() 622 mod_timer(&hcd->rh_timer, jiffies isp116x_irq() 626 usb_hcd_resume_root_hub(hcd); isp116x_irq() 680 static int isp116x_urb_enqueue(struct usb_hcd *hcd, isp116x_urb_enqueue() argument 684 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_urb_enqueue() 711 if (!HC_IS_RUNNING(hcd->state)) { isp116x_urb_enqueue() 716 ret = usb_hcd_link_urb_to_ep(hcd, urb); isp116x_urb_enqueue() 811 hcd->self.bandwidth_allocated += ep->load / ep->period; isp116x_urb_enqueue() 827 usb_hcd_unlink_urb_from_ep(hcd, urb); isp116x_urb_enqueue() 836 static int isp116x_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, isp116x_urb_dequeue() argument 839 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_urb_dequeue() 846 rc = usb_hcd_check_unlink_urb(hcd, urb, status); isp116x_urb_dequeue() 873 static void isp116x_endpoint_disable(struct usb_hcd *hcd, isp116x_endpoint_disable() argument 892 static int isp116x_get_frame(struct usb_hcd *hcd) isp116x_get_frame() argument 894 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_get_frame() 907 static int isp116x_hub_status_data(struct usb_hcd *hcd, char *buf) isp116x_hub_status_data() argument 909 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_hub_status_data() 913 if (!HC_IS_RUNNING(hcd->state)) isp116x_hub_status_data() 918 if (timer_pending(&hcd->rh_timer)) isp116x_hub_status_data() 1002 static int isp116x_hub_control(struct usb_hcd *hcd, isp116x_hub_control() argument 1006 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_hub_control() 1260 static int isp116x_reset(struct usb_hcd *hcd) isp116x_reset() argument 1262 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_reset() 1290 static void isp116x_stop(struct usb_hcd *hcd) isp116x_stop() argument 1292 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_stop() 1313 static int isp116x_start(struct usb_hcd *hcd) isp116x_start() argument 1315 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_start() 1334 hcd->uses_new_polling = 1; isp116x_start() 1371 if (!device_can_wakeup(hcd->self.controller)) isp116x_start() 1372 device_init_wakeup(hcd->self.controller, 1); isp116x_start() 1380 hcd->state = HC_STATE_RUNNING; isp116x_start() 1407 static int isp116x_bus_suspend(struct usb_hcd *hcd) isp116x_bus_suspend() argument 1409 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_bus_suspend() 1422 if (hcd->self.root_hub->do_remote_wakeup) isp116x_bus_suspend() 1446 static int isp116x_bus_resume(struct usb_hcd *hcd) isp116x_bus_resume() argument 1448 struct isp116x *isp116x = hcd_to_isp116x(hcd); isp116x_bus_resume() 1470 isp116x_reset(hcd); isp116x_bus_resume() 1471 isp116x_start(hcd); isp116x_bus_resume() 1472 isp116x_hub_control(hcd, SetPortFeature, isp116x_bus_resume() 1475 isp116x_hub_control(hcd, SetPortFeature, isp116x_bus_resume() 1493 hcd->state = HC_STATE_RESUMING; isp116x_bus_resume() 1502 hcd->state = HC_STATE_RUNNING; isp116x_bus_resume() 1542 struct usb_hcd *hcd = platform_get_drvdata(pdev); isp116x_remove() local 1546 if (!hcd) isp116x_remove() 1548 isp116x = hcd_to_isp116x(hcd); isp116x_remove() 1550 usb_remove_hcd(hcd); isp116x_remove() 1559 usb_put_hcd(hcd); isp116x_remove() 1565 struct usb_hcd *hcd; isp116x_probe() local 1619 /* allocate and initialize hcd */ isp116x_probe() 1620 hcd = usb_create_hcd(&isp116x_hc_driver, &pdev->dev, dev_name(&pdev->dev)); isp116x_probe() 1621 if (!hcd) { isp116x_probe() 1626 hcd->rsrc_start = addr->start; isp116x_probe() 1627 isp116x = hcd_to_isp116x(hcd); isp116x_probe() 1642 ERR("See comments in drivers/usb/host/isp116x-hcd.c\n"); isp116x_probe() 1647 ret = usb_add_hcd(hcd, irq, irqflags); isp116x_probe() 1651 device_wakeup_enable(hcd->self.controller); isp116x_probe() 1662 usb_remove_hcd(hcd); isp116x_probe() 1664 usb_put_hcd(hcd); isp116x_probe() 1705 MODULE_ALIAS("platform:isp116x-hcd");
|
H A D | xhci-pci.c | 57 static int xhci_pci_setup(struct usb_hcd *hcd); 208 static int xhci_pci_setup(struct usb_hcd *hcd) xhci_pci_setup() argument 211 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); xhci_pci_setup() 214 xhci = hcd_to_xhci(hcd); xhci_pci_setup() 218 retval = xhci_gen_setup(hcd, xhci_pci_quirks); xhci_pci_setup() 222 if (!usb_hcd_is_primary_hcd(hcd)) xhci_pci_setup() 244 struct usb_hcd *hcd; xhci_pci_probe() local 263 hcd = dev_get_drvdata(&dev->dev); xhci_pci_probe() 264 xhci = hcd_to_xhci(hcd); xhci_pci_probe() 266 pci_name(dev), hcd); xhci_pci_probe() 326 static void xhci_pme_quirk(struct usb_hcd *hcd, bool suspend) xhci_pme_quirk() argument 328 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_pme_quirk() 329 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); xhci_pme_quirk() 370 static int xhci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) xhci_pci_suspend() argument 372 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_pci_suspend() 373 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); xhci_pci_suspend() 383 xhci_pme_quirk(hcd, true); xhci_pci_suspend() 388 static int xhci_pci_resume(struct usb_hcd *hcd, bool hibernated) xhci_pci_resume() argument 390 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_pci_resume() 391 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); xhci_pci_resume() 416 xhci_pme_quirk(hcd, false); xhci_pci_resume()
|
H A D | xhci-hub.c | 178 static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, xhci_usb2_hub_descriptor() argument 231 static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, xhci_usb3_hub_descriptor() argument 261 static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, xhci_hub_descriptor() argument 265 if (hcd->speed >= HCD_USB3) xhci_hub_descriptor() 266 xhci_usb3_hub_descriptor(hcd, xhci, desc); xhci_hub_descriptor() 268 xhci_usb2_hub_descriptor(hcd, xhci, desc); xhci_hub_descriptor() 342 int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, xhci_find_slot_id_by_port() argument 354 if (((speed >= USB_SPEED_SUPER) == (hcd->speed >= HCD_USB3)) xhci_find_slot_id_by_port() 439 static void xhci_disable_port(struct usb_hcd *hcd, struct xhci_hcd *xhci, xhci_disable_port() argument 443 if (hcd->speed >= HCD_USB3) { xhci_disable_port() 506 static int xhci_get_ports(struct usb_hcd *hcd, __le32 __iomem ***port_array) xhci_get_ports() argument 509 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_get_ports() 511 if (hcd->speed >= HCD_USB3) { xhci_get_ports() 688 static u32 xhci_get_port_status(struct usb_hcd *hcd, 696 struct xhci_hcd *xhci = hcd_to_xhci(hcd); 710 if (hcd->speed >= HCD_USB3) { 726 if (hcd->speed < HCD_USB3) { 755 mod_timer(&hcd->rh_timer, timeout); 779 slot_id = xhci_find_slot_id_by_port(hcd, 824 if (hcd->speed < HCD_USB3) 841 if (hcd->speed >= HCD_USB3) 847 if (hcd->speed >= HCD_USB3) { 863 int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, xhci_hub_control() argument 866 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_hub_control() 878 max_ports = xhci_get_ports(hcd, &port_array); xhci_hub_control() 879 bus_state = &xhci->bus_state[hcd_index(hcd)]; xhci_hub_control() 892 if (hcd->speed >= HCD_USB3 && xhci_hub_control() 899 xhci_hub_descriptor(hcd, xhci, xhci_hub_control() 906 if (hcd->speed < HCD_USB3) xhci_hub_control() 921 status = xhci_get_port_status(hcd, bus_state, port_array, xhci_hub_control() 935 if (hcd->speed < HCD_USB31 || wLength != 8) { xhci_hub_control() 986 slot_id = xhci_find_slot_id_by_port(hcd, xhci, xhci_hub_control() 1045 slot_id = xhci_find_slot_id_by_port(hcd, xhci, xhci_hub_control() 1081 temp = usb_acpi_power_manageable(hcd->self.root_hub, xhci_hub_control() 1084 usb_acpi_set_power_state(hcd->self.root_hub, xhci_hub_control() 1110 if (hcd->speed < HCD_USB3) xhci_hub_control() 1118 if (hcd->speed < HCD_USB3) xhci_hub_control() 1165 slot_id = xhci_find_slot_id_by_port(hcd, xhci, xhci_hub_control() 1186 xhci_disable_port(hcd, xhci, wIndex, xhci_hub_control() 1193 temp = usb_acpi_power_manageable(hcd->self.root_hub, xhci_hub_control() 1196 usb_acpi_set_power_state(hcd->self.root_hub, xhci_hub_control() 1221 int xhci_hub_status_data(struct usb_hcd *hcd, char *buf) xhci_hub_status_data() argument 1227 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_hub_status_data() 1233 max_ports = xhci_get_ports(hcd, &port_array); xhci_hub_status_data() 1234 bus_state = &xhci->bus_state[hcd_index(hcd)]; xhci_hub_status_data() 1268 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); xhci_hub_status_data() 1276 int xhci_bus_suspend(struct usb_hcd *hcd) xhci_bus_suspend() argument 1278 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_bus_suspend() 1284 max_ports = xhci_get_ports(hcd, &port_array); xhci_bus_suspend() 1285 bus_state = &xhci->bus_state[hcd_index(hcd)]; xhci_bus_suspend() 1289 if (hcd->self.root_hub->do_remote_wakeup) { xhci_bus_suspend() 1310 slot_id = xhci_find_slot_id_by_port(hcd, xhci, xhci_bus_suspend() 1325 if (hcd->self.root_hub->do_remote_wakeup) { xhci_bus_suspend() 1340 hcd->state = HC_STATE_SUSPENDED; xhci_bus_suspend() 1346 int xhci_bus_resume(struct usb_hcd *hcd) xhci_bus_resume() argument 1348 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_bus_resume() 1359 max_ports = xhci_get_ports(hcd, &port_array); xhci_bus_resume() 1360 bus_state = &xhci->bus_state[hcd_index(hcd)]; xhci_bus_resume() 1366 if (!HCD_HW_ACCESSIBLE(hcd)) { xhci_bus_resume() 1425 slot_id = xhci_find_slot_id_by_port(hcd, xhci, port_index + 1); xhci_bus_resume()
|
H A D | ehci-hub.c | 19 /* this file is part of ehci-hcd.c */ 51 struct usb_hcd *hcd = ehci_to_hcd(ehci); ehci_handover_companion_ports() local 94 ehci_hub_control(hcd, SetPortFeature, ehci_handover_companion_ports() 112 ehci_hub_control(hcd, GetPortStatus, ehci_handover_companion_ports() 225 static int ehci_bus_suspend (struct usb_hcd *hcd) ehci_bus_suspend() argument 227 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_bus_suspend() 250 if (hcd->self.root_hub->do_remote_wakeup) { ehci_bus_suspend() 282 if (hcd->self.root_hub->do_remote_wakeup) { ehci_bus_suspend() 358 if (!hcd->self.root_hub->do_remote_wakeup) ehci_bus_suspend() 375 static int ehci_bus_resume (struct usb_hcd *hcd) ehci_bus_resume() argument 377 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_bus_resume() 386 if (!HCD_HW_ACCESSIBLE(hcd) || ehci->shutdown) ehci_bus_resume() 390 if (!dbgp_reset_prep(hcd)) ehci_bus_resume() 393 dbgp_external_startup(hcd); ehci_bus_resume() 609 ehci_hub_status_data (struct usb_hcd *hcd, char *buf) ehci_hub_status_data() argument 611 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_hub_status_data() 679 mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(25)); ehci_hub_status_data() 732 struct usb_hcd *hcd, 750 struct usb_hcd *hcd = bus_to_hcd(udev->bus); request_single_step_set_feature_urb() local 778 hcd->self.controller, request_single_step_set_feature_urb() 783 hcd->self.controller, request_single_step_set_feature_urb() 791 static int ehset_single_step_set_feature(struct usb_hcd *hcd, int port) ehset_single_step_set_feature() argument 797 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehset_single_step_set_feature() 802 udev = usb_hub_find_child(hcd->self.root_hub, port); ehset_single_step_set_feature() 828 retval = submit_single_step_set_feature(hcd, urb, 1); ehset_single_step_set_feature() 844 retval = submit_single_step_set_feature(hcd, urb, 0); ehset_single_step_set_feature() 862 struct usb_hcd *hcd, ehci_hub_control() 869 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_hub_control() 925 if ((hcd->self.otg_port == (wIndex + 1)) ehci_hub_control() 926 && hcd->self.b_hnp_enable) { ehci_hub_control() 927 otg_start_hnp(hcd->usb_phy->otg); ehci_hub_control() 951 usb_hcd_start_port_resume(&hcd->self, wIndex); ehci_hub_control() 1026 usb_hcd_start_port_resume(&hcd->self, wIndex); ehci_hub_control() 1042 usb_hcd_end_port_resume(&hcd->self, wIndex); ehci_hub_control() 1118 usb_hcd_end_port_resume(&hcd->self, wIndex); ehci_hub_control() 1245 retval = ehset_single_step_set_feature(hcd, ehci_hub_control() 1294 static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum) ehci_relinquish_port() argument 1296 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_relinquish_port() 1303 static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum) ehci_port_handed_over() argument 1305 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_port_handed_over() 1316 struct usb_hcd *hcd = ehci_to_hcd(ehci); ehci_port_power() local 1325 if (hcd->driver->port_power) ehci_port_power() 1326 hcd->driver->port_power(hcd, portnum, enable); ehci_port_power() 861 ehci_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength ) ehci_hub_control() argument
|
H A D | ehci-hcd.c | 37 #include <linux/usb/hcd.h> 367 static void ehci_shutdown(struct usb_hcd *hcd) ehci_shutdown() argument 369 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_shutdown() 422 static void ehci_stop (struct usb_hcd *hcd) ehci_stop() argument 424 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_stop() 456 static int ehci_init(struct usb_hcd *hcd) ehci_init() argument 458 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_init() 566 if (!(hcd->driver->flags & HCD_LOCAL_MEM)) ehci_init() 567 hcd->self.sg_tablesize = ~0; ehci_init() 572 static int ehci_run (struct usb_hcd *hcd) ehci_run() argument 574 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_run() 578 hcd->uses_new_polling = 1; ehci_run() 602 if (!dma_set_mask(hcd->self.controller, DMA_BIT_MASK(64))) ehci_run() 657 int ehci_setup(struct usb_hcd *hcd) ehci_setup() argument 659 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_setup() 673 retval = ehci_init(hcd); ehci_setup() 689 static irqreturn_t ehci_irq (struct usb_hcd *hcd) ehci_irq() argument 691 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_irq() 772 usb_hcd_resume_root_hub(hcd); ehci_irq() 804 usb_hcd_start_port_resume(&hcd->self, i); ehci_irq() 805 mod_timer(&hcd->rh_timer, ehci->reset_done[i]); ehci_irq() 815 usb_hc_died(hcd); ehci_irq() 833 usb_hcd_poll_rh_status(hcd); ehci_irq() 843 * urb + dev is in hcd.self.controller.urb_list 846 * hcd-specific init for hcpriv hasn't been done yet 852 struct usb_hcd *hcd, ehci_urb_enqueue() 856 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_urb_enqueue() 892 static int ehci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) ehci_urb_dequeue() argument 894 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_urb_dequeue() 900 rc = usb_hcd_check_unlink_urb(hcd, urb, status); ehci_urb_dequeue() 943 ehci_endpoint_disable (struct usb_hcd *hcd, struct usb_host_endpoint *ep) ehci_endpoint_disable() argument 945 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_endpoint_disable() 1014 ehci_endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep) ehci_endpoint_reset() argument 1016 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_endpoint_reset() 1053 static int ehci_get_frame (struct usb_hcd *hcd) ehci_get_frame() argument 1055 struct ehci_hcd *ehci = hcd_to_ehci (hcd); ehci_get_frame() 1063 static void ehci_remove_device(struct usb_hcd *hcd, struct usb_device *udev) ehci_remove_device() argument 1065 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_remove_device() 1080 int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup) ehci_suspend() argument 1082 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_suspend() 1098 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ehci_suspend() 1101 synchronize_irq(hcd->irq); ehci_suspend() 1104 if (do_wakeup && HCD_WAKEUP_PENDING(hcd)) { ehci_suspend() 1105 ehci_resume(hcd, false); ehci_suspend() 1114 int ehci_resume(struct usb_hcd *hcd, bool force_reset) ehci_resume() argument 1116 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_resume() 1122 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ehci_resume() 1142 if (!hcd->self.root_hub->do_remote_wakeup) ehci_resume() 1155 usb_root_hub_lost_power(hcd->self.root_hub); ehci_resume() 851 ehci_urb_enqueue( struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags ) ehci_urb_enqueue() argument
|
H A D | ohci-hub.c | 152 struct usb_hcd *hcd = ohci_to_hcd (ohci); variable in typeref:struct:usb_hcd 199 usb_root_hub_lost_power(hcd->self.root_hub); 285 if (hcd->self.bandwidth_isoc_reqs || hcd->self.bandwidth_int_reqs) 300 static int ohci_bus_suspend (struct usb_hcd *hcd) ohci_bus_suspend() argument 302 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_bus_suspend() 307 if (unlikely(!HCD_HW_ACCESSIBLE(hcd))) ohci_bus_suspend() 318 static int ohci_bus_resume (struct usb_hcd *hcd) ohci_bus_resume() argument 320 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_bus_resume() 328 if (unlikely(!HCD_HW_ACCESSIBLE(hcd))) ohci_bus_resume() 336 usb_hcd_poll_rh_status(hcd); ohci_bus_resume() 462 int ohci_hub_status_data(struct usb_hcd *hcd, char *buf) ohci_hub_status_data() argument 464 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_hub_status_data() 471 if (!HCD_HW_ACCESSIBLE(hcd)) ohci_hub_status_data() 517 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); ohci_hub_status_data() 519 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); ohci_hub_status_data() 574 static int ohci_start_port_reset (struct usb_hcd *hcd, unsigned port) ohci_start_port_reset() argument 576 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_start_port_reset() 671 struct usb_hcd *hcd, ohci_hub_control() 678 struct ohci_hcd *ohci = hcd_to_ohci (hcd); ohci_hub_control() 683 if (unlikely(!HCD_HW_ACCESSIBLE(hcd))) ohci_hub_control() 769 if (hcd->self.otg_port == (wIndex + 1) ohci_hub_control() 770 && hcd->self.b_hnp_enable) ohci_hub_control() 670 ohci_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength ) ohci_hub_control() argument
|
H A D | u132-hcd.c | 52 #include <linux/usb/hcd.h> 230 static inline struct u132 *hcd_to_u132(struct usb_hcd *hcd) hcd_to_u132() argument 232 return (struct u132 *)(hcd->hcd_priv); hcd_to_u132() 258 struct usb_hcd *hcd = u132_to_hcd(u132); u132_hcd_delete() local 264 dev_warn(&u132->platform_dev->dev, "FREEING the hcd=%p and thus the u13" u132_hcd_delete() 265 "2=%p going=%d pdev=%p\n", hcd, u132, u132->going, pdev); u132_hcd_delete() 266 usb_put_hcd(hcd); u132_hcd_delete() 495 struct usb_hcd *hcd = u132_to_hcd(u132); u132_hcd_monitor_work() local 499 usb_hc_died(hcd); u132_hcd_monitor_work() 516 struct usb_hcd *hcd = u132_to_hcd(u132); u132_hcd_giveback_urb() local 519 usb_hcd_unlink_urb_from_ep(hcd, urb); u132_hcd_giveback_urb() 542 usb_hcd_giveback_urb(hcd, urb, status); u132_hcd_giveback_urb() 555 struct usb_hcd *hcd = u132_to_hcd(u132); u132_hcd_abandon_urb() local 558 usb_hcd_unlink_urb_from_ep(hcd, urb); u132_hcd_abandon_urb() 574 usb_hcd_giveback_urb(hcd, urb, status); u132_hcd_abandon_urb() 1519 struct usb_hcd *hcd = u132_to_hcd(u132) u132_power() local 1527 hcd->state = HC_STATE_HALT; u132_power() 1777 static void u132_hcd_stop(struct usb_hcd *hcd) u132_hcd_stop() argument 1779 struct u132 *u132 = hcd_to_u132(hcd); u132_hcd_stop() 1781 dev_err(&u132->platform_dev->dev, "u132 device %p(hcd=%p) has b" u132_hcd_stop() 1782 "een removed %d\n", u132, hcd, u132->going); u132_hcd_stop() 1784 dev_err(&u132->platform_dev->dev, "device hcd=%p is being remov" u132_hcd_stop() 1785 "ed\n", hcd); u132_hcd_stop() 1794 static int u132_hcd_start(struct usb_hcd *hcd) u132_hcd_start() argument 1796 struct u132 *u132 = hcd_to_u132(hcd); u132_hcd_start() 1804 } else if (hcd->self.controller) { u132_hcd_start() 1807 to_platform_device(hcd->self.controller); u132_hcd_start() 1835 static int u132_hcd_reset(struct usb_hcd *hcd) u132_hcd_reset() argument 1837 struct u132 *u132 = hcd_to_u132(hcd); u132_hcd_reset() 2242 static int u132_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, u132_urb_enqueue() argument 2245 struct u132 *u132 = hcd_to_u132(hcd); u132_urb_enqueue() 2274 retval = usb_hcd_link_urb_to_ep(hcd, urb); u132_urb_enqueue() 2283 hcd, urb); u132_urb_enqueue() 2316 retval = usb_hcd_link_urb_to_ep(hcd, urb); u132_urb_enqueue() 2325 hcd, urb); u132_urb_enqueue() 2365 retval = usb_hcd_link_urb_to_ep(hcd, urb); u132_urb_enqueue() 2373 hcd, urb); u132_urb_enqueue() 2402 struct usb_hcd *hcd = u132_to_hcd(u132); list_for_each() local 2406 usb_hcd_giveback_urb(hcd, urb, 0); list_for_each() 2474 struct usb_hcd *hcd = u132_to_hcd(u132); u132_endp_urb_dequeue() local 2476 usb_hcd_unlink_urb_from_ep(hcd, urb); u132_endp_urb_dequeue() 2491 usb_hcd_giveback_urb(hcd, urb, status); u132_endp_urb_dequeue() 2516 static int u132_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) u132_urb_dequeue() argument 2518 struct u132 *u132 = hcd_to_u132(hcd); u132_urb_dequeue() 2540 static void u132_endpoint_disable(struct usb_hcd *hcd, u132_endpoint_disable() argument 2543 struct u132 *u132 = hcd_to_u132(hcd); u132_endpoint_disable() 2545 dev_err(&u132->platform_dev->dev, "u132 device %p(hcd=%p hep=%p" u132_endpoint_disable() 2546 ") has been removed %d\n", u132, hcd, hep, u132_endpoint_disable() 2555 static int u132_get_frame(struct usb_hcd *hcd) u132_get_frame() argument 2557 struct u132 *u132 = hcd_to_u132(hcd); u132_get_frame() 2768 static int u132_hub_status_data(struct usb_hcd *hcd, char *buf) u132_hub_status_data() argument 2770 struct u132 *u132 = hcd_to_u132(hcd); u132_hub_status_data() 2772 dev_err(&u132->platform_dev->dev, "device hcd=%p has been remov" u132_hub_status_data() 2773 "ed %d\n", hcd, u132->going); u132_hub_status_data() 2776 dev_err(&u132->platform_dev->dev, "device hcd=%p is being remov" u132_hub_status_data() 2777 "ed\n", hcd); u132_hub_status_data() 2819 static int u132_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u132_hub_control() argument 2822 struct u132 *u132 = hcd_to_u132(hcd); u132_hub_control() 2902 static int u132_start_port_reset(struct usb_hcd *hcd, unsigned port_num) u132_start_port_reset() argument 2904 struct u132 *u132 = hcd_to_u132(hcd); u132_start_port_reset() 2918 static int u132_bus_suspend(struct usb_hcd *hcd) u132_bus_suspend() argument 2920 struct u132 *u132 = hcd_to_u132(hcd); u132_bus_suspend() 2932 static int u132_bus_resume(struct usb_hcd *hcd) u132_bus_resume() argument 2934 struct u132 *u132 = hcd_to_u132(hcd); u132_bus_resume() 2977 struct usb_hcd *hcd = platform_get_drvdata(pdev); u132_remove() local 2978 if (hcd) { u132_remove() 2979 struct u132 *u132 = hcd_to_u132(hcd); u132_remove() 3004 usb_remove_hcd(hcd); u132_remove() 3071 struct usb_hcd *hcd; u132_probe() local 3094 hcd = usb_create_hcd(&u132_hc_driver, &pdev->dev, dev_name(&pdev->dev)); u132_probe() 3095 if (!hcd) { u132_probe() 3096 printk(KERN_ERR "failed to create the usb hcd struct for U132\n" u132_probe() 3101 struct u132 *u132 = hcd_to_u132(hcd); u132_probe() 3103 hcd->rsrc_start = 0; u132_probe() 3110 hcd->product_desc = "ELAN U132 Host Controller"; u132_probe() 3111 retval = usb_add_hcd(hcd, 0, 0); u132_probe() 3118 device_wakeup_enable(hcd->self.controller); u132_probe() 3133 struct usb_hcd *hcd = platform_get_drvdata(pdev); u132_suspend() local 3134 struct u132 *u132 = hcd_to_u132(hcd); u132_suspend() 3147 retval = u132_bus_suspend(hcd); u132_suspend() 3163 struct usb_hcd *hcd = platform_get_drvdata(pdev); u132_resume() local 3164 struct u132 *u132 = hcd_to_u132(hcd); u132_resume() 3181 retval = u132_bus_resume(hcd); u132_resume() 3233 printk(KERN_INFO "u132-hcd driver deregistered\n"); u132_hcd_exit()
|
H A D | uhci-hcd.c | 41 #include <linux/usb/hcd.h> 49 #include "uhci-hcd.h" 438 static irqreturn_t uhci_irq(struct usb_hcd *hcd) uhci_irq() argument 440 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_irq() 475 usb_hc_died(hcd); uhci_irq() 479 mod_timer(&hcd->rh_timer, jiffies); uhci_irq() 486 usb_hcd_poll_rh_status(hcd); uhci_irq() 563 static int uhci_start(struct usb_hcd *hcd) uhci_start() argument 565 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_start() 570 hcd->uses_new_polling = 1; uhci_start() 572 if (!(hcd->driver->flags & HCD_LOCAL_MEM)) uhci_start() 573 hcd->self.sg_tablesize = ~0; uhci_start() 582 dentry = debugfs_create_file(hcd->self.bus_name, uhci_start() 707 static void uhci_stop(struct usb_hcd *hcd) uhci_stop() argument 709 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_stop() 712 if (HCD_HW_ACCESSIBLE(hcd) && !uhci->dead) uhci_stop() 716 synchronize_irq(hcd->irq); uhci_stop() 723 static int uhci_rh_suspend(struct usb_hcd *hcd) uhci_rh_suspend() argument 725 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_rh_suspend() 729 if (!HCD_HW_ACCESSIBLE(hcd)) uhci_rh_suspend() 739 else if (hcd->self.root_hub->do_remote_wakeup && uhci_rh_suspend() 750 static int uhci_rh_resume(struct usb_hcd *hcd) uhci_rh_resume() argument 752 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_rh_resume() 756 if (!HCD_HW_ACCESSIBLE(hcd)) uhci_rh_resume() 767 static void uhci_hcd_endpoint_disable(struct usb_hcd *hcd, uhci_hcd_endpoint_disable() argument 770 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_hcd_endpoint_disable() 792 static int uhci_hcd_get_frame_number(struct usb_hcd *hcd) uhci_hcd_get_frame_number() argument 794 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_hcd_get_frame_number() 807 static int uhci_count_ports(struct usb_hcd *hcd) uhci_count_ports() argument 809 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_count_ports() 810 unsigned io_size = (unsigned) hcd->rsrc_len; uhci_count_ports() 859 #error "missing bus glue for uhci-hcd"
|
H A D | isp1362-hcd.c | 74 #include <linux/usb/hcd.h> 104 static const char hcd_name[] = "isp1362-hcd"; 106 static void isp1362_hc_stop(struct usb_hcd *hcd); 107 static int isp1362_hc_start(struct usb_hcd *hcd); 1005 static irqreturn_t isp1362_irq(struct usb_hcd *hcd) isp1362_irq() argument 1008 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_irq() 1146 usb_hcd_resume_root_hub(hcd); isp1362_irq() 1214 static int isp1362_urb_enqueue(struct usb_hcd *hcd, isp1362_urb_enqueue() argument 1218 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_urb_enqueue() 1259 !HC_IS_RUNNING(hcd->state)) { isp1362_urb_enqueue() 1265 retval = usb_hcd_link_urb_to_ep(hcd, urb); isp1362_urb_enqueue() 1385 usb_hcd_unlink_urb_from_ep(hcd, urb); isp1362_urb_enqueue() 1395 static int isp1362_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) isp1362_urb_dequeue() argument 1397 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_urb_dequeue() 1406 retval = usb_hcd_check_unlink_urb(hcd, urb, status); isp1362_urb_dequeue() 1447 static void isp1362_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep) isp1362_endpoint_disable() argument 1450 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_endpoint_disable() 1477 static int isp1362_get_frame(struct usb_hcd *hcd) isp1362_get_frame() argument 1479 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_get_frame() 1493 static int isp1362_hub_status_data(struct usb_hcd *hcd, char *buf) isp1362_hub_status_data() argument 1495 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_hub_status_data() 1499 if (!HC_IS_RUNNING(hcd->state)) isp1362_hub_status_data() 1504 if (timer_pending(&hcd->rh_timer)) isp1362_hub_status_data() 1561 static int isp1362_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, isp1362_hub_control() argument 1564 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_hub_control() 1730 static int isp1362_bus_suspend(struct usb_hcd *hcd) isp1362_bus_suspend() argument 1733 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_bus_suspend() 1760 hcd->state = HC_STATE_QUIESCING; isp1362_bus_suspend() 1820 hcd->state = HC_STATE_SUSPENDED; isp1362_bus_suspend() 1828 static int isp1362_bus_resume(struct usb_hcd *hcd) isp1362_bus_resume() argument 1830 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_bus_resume() 1841 if (hcd->state == HC_STATE_RESUMING) { isp1362_bus_resume() 1859 hcd->self.root_hub->dev.power.power_state = PMSG_ON; isp1362_bus_resume() 1868 isp1362_hc_stop(hcd); isp1362_bus_resume() 1869 return isp1362_hc_start(hcd); isp1362_bus_resume() 1889 hcd->state = HC_STATE_RESUMING; isp1362_bus_resume() 1903 hcd->self.root_hub->dev.power.power_state = PMSG_ON; isp1362_bus_resume() 1904 hcd->state = HC_STATE_RUNNING; isp1362_bus_resume() 2211 static int isp1362_mem_config(struct usb_hcd *hcd) isp1362_mem_config() argument 2213 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_mem_config() 2235 dev_info(hcd->self.controller, "ISP1362 Memory usage:\n"); isp1362_mem_config() 2236 dev_info(hcd->self.controller, " ISTL: 2 * %4d: %4d @ $%04x:$%04x\n", isp1362_mem_config() 2238 dev_info(hcd->self.controller, " INTL: %4d * (%3zu+8): %4d @ $%04x\n", isp1362_mem_config() 2241 dev_info(hcd->self.controller, " ATL : %4d * (%3zu+8): %4d @ $%04x\n", isp1362_mem_config() 2244 dev_info(hcd->self.controller, " USED/FREE: %4d %4d\n", total, isp1362_mem_config() 2248 dev_err(hcd->self.controller, "%s: Memory requested: %d, available %d\n", isp1362_mem_config() 2322 static int isp1362_hc_reset(struct usb_hcd *hcd) isp1362_hc_reset() argument 2325 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_hc_reset() 2334 isp1362_hcd->board->reset(hcd->self.controller, 1); isp1362_hc_reset() 2337 isp1362_hcd->board->clock(hcd->self.controller, 1); isp1362_hc_reset() 2338 isp1362_hcd->board->reset(hcd->self.controller, 0); isp1362_hc_reset() 2362 static void isp1362_hc_stop(struct usb_hcd *hcd) isp1362_hc_stop() argument 2364 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_hc_stop() 2370 del_timer_sync(&hcd->rh_timer); isp1362_hc_stop() 2384 isp1362_hcd->board->reset(hcd->self.controller, 1); isp1362_hc_stop() 2389 isp1362_hcd->board->clock(hcd->self.controller, 0); isp1362_hc_stop() 2487 static int isp1362_hc_start(struct usb_hcd *hcd) isp1362_hc_start() argument 2490 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_hc_start() 2539 ret = isp1362_mem_config(hcd); isp1362_hc_start() 2571 hcd->state = HC_STATE_RUNNING; isp1362_hc_start() 2621 struct usb_hcd *hcd = platform_get_drvdata(pdev); isp1362_remove() local 2622 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_remove() 2626 usb_remove_hcd(hcd); isp1362_remove() 2628 usb_put_hcd(hcd); isp1362_remove() 2636 struct usb_hcd *hcd; isp1362_probe() local 2677 /* allocate and initialize hcd */ isp1362_probe() 2678 hcd = usb_create_hcd(&isp1362_hc_driver, &pdev->dev, dev_name(&pdev->dev)); isp1362_probe() 2679 if (!hcd) isp1362_probe() 2682 hcd->rsrc_start = data->start; isp1362_probe() 2683 isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_probe() 2696 dev_err(hcd->self.controller, "No platform delay function given\n"); isp1362_probe() 2711 retval = usb_add_hcd(hcd, irq, irq_flags | IRQF_SHARED); isp1362_probe() 2714 device_wakeup_enable(hcd->self.controller); isp1362_probe() 2716 dev_info(&pdev->dev, "%s, irq %d\n", hcd->product_desc, irq); isp1362_probe() 2723 usb_put_hcd(hcd); isp1362_probe() 2731 struct usb_hcd *hcd = platform_get_drvdata(pdev); isp1362_suspend() local 2732 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_suspend() 2740 retval = isp1362_bus_suspend(hcd); isp1362_suspend() 2754 struct usb_hcd *hcd = platform_get_drvdata(pdev); isp1362_resume() local 2755 struct isp1362_hcd *isp1362_hcd = hcd_to_isp1362_hcd(hcd); isp1362_resume()
|
H A D | ehci-pci.c | 25 #include <linux/usb/hcd.h> 100 static int ehci_pci_setup(struct usb_hcd *hcd) ehci_pci_setup() argument 102 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_pci_setup() 103 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); ehci_pci_setup() 107 ehci->caps = hcd->regs; ehci_pci_setup() 157 hcd->has_tt = 1; ehci_pci_setup() 161 hcd->has_tt = 1; ehci_pci_setup() 244 ehci->debug = hcd->regs + temp; ehci_pci_setup() 254 retval = ehci_setup(hcd); ehci_pci_setup() 349 static int ehci_pci_resume(struct usb_hcd *hcd, bool hibernated) ehci_pci_resume() argument 351 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_pci_resume() 352 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); ehci_pci_resume() 354 if (ehci_resume(hcd, hibernated) != 0) ehci_pci_resume()
|
H A D | xhci.c | 49 /* TODO: copied from ehci-hcd.c - can this be refactored? */ 281 struct usb_hcd *hcd = xhci_to_hcd(xhci); xhci_setup_msix() local 282 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); xhci_setup_msix() 322 hcd->msix_enabled = 1; xhci_setup_msix() 338 struct usb_hcd *hcd = xhci_to_hcd(xhci); xhci_cleanup_msix() local 339 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); xhci_cleanup_msix() 354 hcd->msix_enabled = 0; xhci_cleanup_msix() 368 static int xhci_try_enable_msi(struct usb_hcd *hcd) xhci_try_enable_msi() argument 370 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_try_enable_msi() 387 if (hcd->irq) xhci_try_enable_msi() 388 free_irq(hcd->irq, hcd); xhci_try_enable_msi() 389 hcd->irq = 0; xhci_try_enable_msi() 397 /* hcd->irq is 0, we have MSI */ xhci_try_enable_msi() 406 if (!strlen(hcd->irq_descr)) xhci_try_enable_msi() 407 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", xhci_try_enable_msi() 408 hcd->driver->description, hcd->self.busnum); xhci_try_enable_msi() 412 hcd->irq_descr, hcd); xhci_try_enable_msi() 418 hcd->irq = pdev->irq; xhci_try_enable_msi() 424 static inline int xhci_try_enable_msi(struct usb_hcd *hcd) xhci_try_enable_msi() argument 442 struct usb_hcd *hcd; compliance_mode_recovery() local 460 hcd = xhci->shared_hcd; compliance_mode_recovery() 462 if (hcd->state == HC_STATE_SUSPENDED) compliance_mode_recovery() 463 usb_hcd_resume_root_hub(hcd); compliance_mode_recovery() 465 usb_hcd_poll_rh_status(hcd); compliance_mode_recovery() 539 int xhci_init(struct usb_hcd *hcd) xhci_init() argument 541 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_init() 598 int xhci_run(struct usb_hcd *hcd) xhci_run() argument 603 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_run() 609 hcd->uses_new_polling = 1; xhci_run() 610 if (!usb_hcd_is_primary_hcd(hcd)) xhci_run() 615 ret = xhci_try_enable_msi(hcd); xhci_run() 678 void xhci_stop(struct usb_hcd *hcd) xhci_stop() argument 681 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_stop() 737 void xhci_shutdown(struct usb_hcd *hcd) xhci_shutdown() argument 739 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_shutdown() 742 usb_disable_xhci_ports(to_pci_dev(hcd->self.controller)); xhci_shutdown() 759 pci_set_power_state(to_pci_dev(hcd->self.controller), PCI_D3hot); xhci_shutdown() 897 struct usb_hcd *hcd = xhci_to_hcd(xhci); xhci_suspend() local 900 if (!hcd->state) xhci_suspend() 903 if (hcd->state != HC_STATE_SUSPENDED || xhci_suspend() 913 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); xhci_suspend() 914 del_timer_sync(&hcd->rh_timer); xhci_suspend() 919 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); xhci_suspend() 984 struct usb_hcd *hcd = xhci_to_hcd(xhci); xhci_resume() local 989 if (!hcd->state) xhci_resume() 1000 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); xhci_resume() 1062 if (!usb_hcd_is_primary_hcd(hcd)) xhci_resume() 1063 secondary_hcd = hcd; xhci_resume() 1068 retval = xhci_init(hcd->primary_hcd); xhci_resume() 1074 retval = xhci_run(hcd->primary_hcd); xhci_resume() 1079 hcd->state = HC_STATE_SUSPENDED; xhci_resume() 1108 usb_hcd_resume_root_hub(hcd); xhci_resume() 1125 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); xhci_resume() 1126 usb_hcd_poll_rh_status(hcd); xhci_resume() 1198 static int xhci_check_args(struct usb_hcd *hcd, struct usb_device *udev, xhci_check_args() argument 1204 if (!hcd || (check_ep && !ep) || !udev) { xhci_check_args() 1213 xhci = hcd_to_xhci(hcd); xhci_check_args() 1323 int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) xhci_urb_enqueue() argument 1325 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_urb_enqueue() 1333 if (!urb || xhci_check_args(hcd, urb->dev, urb->ep, xhci_urb_enqueue() 1340 if (!HCD_HW_ACCESSIBLE(hcd)) { xhci_urb_enqueue() 1529 int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) xhci_urb_dequeue() argument 1542 xhci = hcd_to_xhci(hcd); xhci_urb_dequeue() 1545 ret = usb_hcd_check_unlink_urb(hcd, urb, status); xhci_urb_dequeue() 1563 usb_hcd_unlink_urb_from_ep(hcd, urb); xhci_urb_dequeue() 1565 usb_hcd_giveback_urb(hcd, urb, -ESHUTDOWN); xhci_urb_dequeue() 1644 int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, xhci_drop_endpoint() argument 1656 ret = xhci_check_args(hcd, udev, ep, 1, true, __func__); xhci_drop_endpoint() 1659 xhci = hcd_to_xhci(hcd); xhci_drop_endpoint() 1725 int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, xhci_add_endpoint() argument 1737 ret = xhci_check_args(hcd, udev, ep, 1, true, __func__); xhci_add_endpoint() 1743 xhci = hcd_to_xhci(hcd); xhci_add_endpoint() 2743 int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) xhci_check_bandwidth() argument 2753 ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__); xhci_check_bandwidth() 2756 xhci = hcd_to_xhci(hcd); xhci_check_bandwidth() 2847 void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) xhci_reset_bandwidth() argument 2853 ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__); xhci_reset_bandwidth() 2856 xhci = hcd_to_xhci(hcd); xhci_reset_bandwidth() 2973 void xhci_endpoint_reset(struct usb_hcd *hcd, xhci_endpoint_reset() argument 2978 xhci = hcd_to_xhci(hcd); xhci_endpoint_reset() 3149 int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, xhci_alloc_streams() argument 3170 xhci = hcd_to_xhci(hcd); xhci_alloc_streams() 3310 int xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev, xhci_free_streams() argument 3323 xhci = hcd_to_xhci(hcd); xhci_free_streams() 3442 int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev) xhci_discover_or_reset_device() argument 3454 ret = xhci_check_args(hcd, udev, NULL, 0, false, __func__); xhci_discover_or_reset_device() 3457 xhci = hcd_to_xhci(hcd); xhci_discover_or_reset_device() 3463 ret = xhci_alloc_dev(hcd, udev); xhci_discover_or_reset_device() 3481 ret = xhci_alloc_dev(hcd, udev); xhci_discover_or_reset_device() 3605 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) xhci_free_dev() argument 3607 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_free_dev() 3625 pm_runtime_put_noidle(hcd->self.controller); xhci_free_dev() 3628 ret = xhci_check_args(hcd, udev, NULL, 0, true, __func__); xhci_free_dev() 3698 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) xhci_alloc_dev() argument 3700 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_alloc_dev() 3765 pm_runtime_get_noresume(hcd->self.controller); xhci_alloc_dev() 3790 static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev, xhci_setup_device() argument 3797 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_setup_device() 3967 int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev) xhci_address_device() argument 3969 return xhci_setup_device(hcd, udev, SETUP_CONTEXT_ADDRESS); xhci_address_device() 3972 int xhci_enable_device(struct usb_hcd *hcd, struct usb_device *udev) xhci_enable_device() argument 3974 return xhci_setup_device(hcd, udev, SETUP_CONTEXT_ONLY); xhci_enable_device() 3983 int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1) xhci_find_raw_port_number() argument 3985 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_find_raw_port_number() 3990 if (hcd->speed < HCD_USB3) xhci_find_raw_port_number() 4129 int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, xhci_set_usb2_hardware_lpm() argument 4132 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_set_usb2_hardware_lpm() 4141 if (hcd->speed >= HCD_USB3 || !xhci->hw_lpm_support || xhci_set_usb2_hardware_lpm() 4182 * context commands. It is protected by hcd->bandwidth xhci_set_usb2_hardware_lpm() 4187 mutex_lock(hcd->bandwidth_mutex); xhci_set_usb2_hardware_lpm() 4190 mutex_unlock(hcd->bandwidth_mutex); xhci_set_usb2_hardware_lpm() 4219 mutex_lock(hcd->bandwidth_mutex); xhci_set_usb2_hardware_lpm() 4221 mutex_unlock(hcd->bandwidth_mutex); xhci_set_usb2_hardware_lpm() 4253 int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev) xhci_update_device() argument 4255 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_update_device() 4258 if (hcd->speed >= HCD_USB3 || !xhci->sw_lpm_support || xhci_update_device() 4551 static u16 xhci_calculate_lpm_timeout(struct usb_hcd *hcd, xhci_calculate_lpm_timeout() argument 4554 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_calculate_lpm_timeout() 4662 int xhci_enable_usb3_lpm_timeout(struct usb_hcd *hcd, xhci_enable_usb3_lpm_timeout() argument 4670 xhci = hcd_to_xhci(hcd); xhci_enable_usb3_lpm_timeout() 4679 hub_encoded_timeout = xhci_calculate_lpm_timeout(hcd, udev, state); xhci_enable_usb3_lpm_timeout() 4693 int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd, xhci_disable_usb3_lpm_timeout() argument 4699 xhci = hcd_to_xhci(hcd); xhci_disable_usb3_lpm_timeout() 4709 int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, xhci_set_usb2_hardware_lpm() argument 4715 int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev) xhci_update_device() argument 4720 int xhci_enable_usb3_lpm_timeout(struct usb_hcd *hcd, xhci_enable_usb3_lpm_timeout() argument 4726 int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd, xhci_disable_usb3_lpm_timeout() argument 4738 int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, xhci_update_hub_device() argument 4741 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_update_hub_device() 4844 int xhci_get_frame(struct usb_hcd *hcd) xhci_get_frame() argument 4846 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_get_frame() 4851 int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks) xhci_gen_setup() argument 4854 struct device *dev = hcd->self.controller; xhci_gen_setup() 4858 hcd->self.sg_tablesize = ~0; xhci_gen_setup() 4861 hcd->self.no_sg_constraint = 1; xhci_gen_setup() 4864 hcd->self.no_stop_on_short = 1; xhci_gen_setup() 4866 xhci = hcd_to_xhci(hcd); xhci_gen_setup() 4868 if (usb_hcd_is_primary_hcd(hcd)) { xhci_gen_setup() 4869 xhci->main_hcd = hcd; xhci_gen_setup() 4873 hcd->speed = HCD_USB2; xhci_gen_setup() 4874 hcd->self.root_hub->speed = USB_SPEED_HIGH; xhci_gen_setup() 4880 hcd->has_tt = 1; xhci_gen_setup() 4884 hcd->speed = HCD_USB31; xhci_gen_setup() 4893 xhci->cap_regs = hcd->regs; xhci_gen_setup() 4894 xhci->op_regs = hcd->regs + xhci_gen_setup() 4896 xhci->run_regs = hcd->regs + xhci_gen_setup() 4952 retval = xhci_init(hcd); xhci_gen_setup() 4965 .description = "xhci-hcd",
|
H A D | r8a66597-hcd.c | 35 #include <linux/usb/hcd.h> 55 static int r8a66597_get_frame(struct usb_hcd *hcd); 1287 struct usb_hcd *hcd = r8a66597_to_hcd(r8a66597); variable in typeref:struct:usb_hcd 1305 urb->start_frame = r8a66597_get_frame(hcd); 1615 static irqreturn_t r8a66597_irq(struct usb_hcd *hcd) r8a66597_irq() argument 1617 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_irq() 1835 static int r8a66597_start(struct usb_hcd *hcd) r8a66597_start() argument 1837 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_start() 1839 hcd->state = HC_STATE_RUNNING; r8a66597_start() 1843 static void r8a66597_stop(struct usb_hcd *hcd) r8a66597_stop() argument 1845 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_stop() 1894 static int r8a66597_urb_enqueue(struct usb_hcd *hcd, r8a66597_urb_enqueue() argument 1899 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_urb_enqueue() 1910 ret = usb_hcd_link_urb_to_ep(hcd, urb); r8a66597_urb_enqueue() 1958 usb_hcd_unlink_urb_from_ep(hcd, urb); r8a66597_urb_enqueue() 1964 static int r8a66597_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, r8a66597_urb_dequeue() argument 1967 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_urb_dequeue() 1973 rc = usb_hcd_check_unlink_urb(hcd, urb, status); r8a66597_urb_dequeue() 1989 static void r8a66597_endpoint_disable(struct usb_hcd *hcd, r8a66597_endpoint_disable() argument 1992 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_endpoint_disable() 2022 static int r8a66597_get_frame(struct usb_hcd *hcd) r8a66597_get_frame() argument 2024 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_get_frame() 2095 struct usb_hcd *hcd) r8a66597_check_detect_child() 2106 if (bus->busnum != hcd->self.busnum) r8a66597_check_detect_child() 2114 static int r8a66597_hub_status_data(struct usb_hcd *hcd, char *buf) r8a66597_hub_status_data() argument 2116 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_hub_status_data() 2120 r8a66597_check_detect_child(r8a66597, hcd); r8a66597_hub_status_data() 2151 static int r8a66597_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, r8a66597_hub_control() argument 2154 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_hub_control() 2255 static int r8a66597_bus_suspend(struct usb_hcd *hcd) r8a66597_bus_suspend() argument 2257 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_bus_suspend() 2286 static int r8a66597_bus_resume(struct usb_hcd *hcd) r8a66597_bus_resume() argument 2288 struct r8a66597 *r8a66597 = hcd_to_r8a66597(hcd); r8a66597_bus_resume() 2372 struct usb_hcd *hcd = r8a66597_to_hcd(r8a66597); r8a66597_resume() local 2377 usb_root_hub_lost_power(hcd->self.root_hub); r8a66597_resume() 2397 struct usb_hcd *hcd = r8a66597_to_hcd(r8a66597); r8a66597_remove() local 2400 usb_remove_hcd(hcd); r8a66597_remove() 2404 usb_put_hcd(hcd); r8a66597_remove() 2414 struct usb_hcd *hcd = NULL; r8a66597_probe() local 2460 /* initialize hcd */ r8a66597_probe() 2461 hcd = usb_create_hcd(&r8a66597_hc_driver, &pdev->dev, (char *)hcd_name); r8a66597_probe() 2462 if (!hcd) { r8a66597_probe() 2464 dev_err(&pdev->dev, "Failed to create hcd\n"); r8a66597_probe() 2467 r8a66597 = hcd_to_r8a66597(hcd); r8a66597_probe() 2507 hcd->rsrc_start = res->start; r8a66597_probe() 2508 hcd->has_tt = 1; r8a66597_probe() 2510 ret = usb_add_hcd(hcd, irq, irq_trigger); r8a66597_probe() 2512 dev_err(&pdev->dev, "Failed to add hcd\n"); r8a66597_probe() 2515 device_wakeup_enable(hcd->self.controller); r8a66597_probe() 2523 usb_put_hcd(hcd); r8a66597_probe() 2094 r8a66597_check_detect_child(struct r8a66597 *r8a66597, struct usb_hcd *hcd) r8a66597_check_detect_child() argument
|
H A D | oxu210hp-hcd.c | 36 #include <linux/usb/hcd.h> 71 static inline struct oxu_hcd *hcd_to_oxu(struct usb_hcd *hcd) hcd_to_oxu() argument 73 return (struct oxu_hcd *) (hcd->hcd_priv); hcd_to_oxu() 244 static int oxu_hub_control(struct usb_hcd *hcd, 2440 static irqreturn_t oxu210_hcd_irq(struct usb_hcd *hcd) oxu210_hcd_irq() argument 2442 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu210_hcd_irq() 2458 if (!status || unlikely(hcd->state == HC_STATE_HALT)) { oxu210_hcd_irq() 2492 usb_hcd_resume_root_hub(hcd); oxu210_hcd_irq() 2510 mod_timer(&hcd->rh_timer, oxu->reset_done[i]); oxu210_hcd_irq() 2525 usb_hc_died(hcd); oxu210_hcd_irq() 2537 usb_hcd_poll_rh_status(hcd); oxu210_hcd_irq() 2541 static irqreturn_t oxu_irq(struct usb_hcd *hcd) oxu_irq() argument 2543 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_irq() 2546 u32 status = oxu_readl(hcd->regs, OXU_CHIPIRQSTATUS); oxu_irq() 2547 u32 enable = oxu_readl(hcd->regs, OXU_CHIPIRQEN_SET); oxu_irq() 2550 oxu_writel(hcd->regs, OXU_CHIPIRQEN_CLR, enable); oxu_irq() 2554 oxu210_hcd_irq(hcd); oxu_irq() 2559 oxu_writel(hcd->regs, OXU_CHIPIRQEN_SET, enable); oxu_irq() 2593 static int oxu_hcd_init(struct usb_hcd *hcd) oxu_hcd_init() argument 2595 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_hcd_init() 2670 static int oxu_reset(struct usb_hcd *hcd) oxu_reset() argument 2672 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_reset() 2679 hcd->self.controller->dma_mask = NULL; oxu_reset() 2682 oxu->caps = hcd->regs + OXU_OTG_CAP_OFFSET; oxu_reset() 2683 oxu->regs = hcd->regs + OXU_OTG_CAP_OFFSET + \ oxu_reset() 2686 oxu->mem = hcd->regs + OXU_SPH_MEM; oxu_reset() 2688 oxu->caps = hcd->regs + OXU_SPH_CAP_OFFSET; oxu_reset() 2689 oxu->regs = hcd->regs + OXU_SPH_CAP_OFFSET + \ oxu_reset() 2692 oxu->mem = hcd->regs + OXU_OTG_MEM; oxu_reset() 2698 return oxu_hcd_init(hcd); oxu_reset() 2701 static int oxu_run(struct usb_hcd *hcd) oxu_run() argument 2703 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_run() 2707 hcd->uses_new_polling = 1; oxu_run() 2745 hcd->state = HC_STATE_RUNNING; oxu_run() 2760 static void oxu_stop(struct usb_hcd *hcd) oxu_stop() argument 2762 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_stop() 2771 if (HC_IS_RUNNING(hcd->state)) oxu_stop() 2795 static void oxu_shutdown(struct usb_hcd *hcd) oxu_shutdown() argument 2797 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_shutdown() 2812 * urb + dev is in hcd.self.controller.urb_list 2815 * hcd-specific init for hcpriv hasn't been done yet 2820 static int __oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, __oxu_urb_enqueue() argument 2823 struct oxu_hcd *oxu = hcd_to_oxu(hcd); __oxu_urb_enqueue() 2852 static int oxu_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, oxu_urb_enqueue() argument 2855 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_urb_enqueue() 2864 return __oxu_urb_enqueue(hcd, urb, mem_flags); oxu_urb_enqueue() 2877 return __oxu_urb_enqueue(hcd, urb, mem_flags); oxu_urb_enqueue() 2906 ret = __oxu_urb_enqueue(hcd, murb, mem_flags); oxu_urb_enqueue() 2934 ret = __oxu_urb_enqueue(hcd, murb, mem_flags); oxu_urb_enqueue() 2945 static int oxu_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) oxu_urb_dequeue() argument 2947 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_urb_dequeue() 2981 && HC_IS_RUNNING(hcd->state)) { oxu_urb_dequeue() 2991 dev_err(hcd->self.controller, oxu_urb_dequeue() 3005 static void oxu_endpoint_disable(struct usb_hcd *hcd, oxu_endpoint_disable() argument 3008 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_endpoint_disable() 3029 if (!HC_IS_RUNNING(hcd->state)) oxu_endpoint_disable() 3068 static int oxu_get_frame(struct usb_hcd *hcd) oxu_get_frame() argument 3070 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_get_frame() 3077 static int oxu_hub_status_data(struct usb_hcd *hcd, char *buf) oxu_hub_status_data() argument 3079 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_hub_status_data() 3085 if (!HC_IS_RUNNING(hcd->state)) oxu_hub_status_data() 3153 static int oxu_hub_control(struct usb_hcd *hcd, u16 typeReq, oxu_hub_control() argument 3156 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_hub_control() 3386 if (device_may_wakeup(&hcd->self.root_hub->dev)) oxu_hub_control() 3446 static int oxu_bus_suspend(struct usb_hcd *hcd) oxu_bus_suspend() argument 3448 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_bus_suspend() 3461 if (HC_IS_RUNNING(hcd->state)) { oxu_bus_suspend() 3463 hcd->state = HC_STATE_QUIESCING; oxu_bus_suspend() 3489 if (device_may_wakeup(&hcd->self.root_hub->dev)) oxu_bus_suspend() 3504 hcd->state = HC_STATE_SUSPENDED; oxu_bus_suspend() 3508 if (!device_may_wakeup(&hcd->self.root_hub->dev)) oxu_bus_suspend() 3519 static int oxu_bus_resume(struct usb_hcd *hcd) oxu_bus_resume() argument 3521 struct oxu_hcd *oxu = hcd_to_oxu(hcd); oxu_bus_resume() 3591 hcd->state = HC_STATE_RUNNING; oxu_bus_resume() 3602 static int oxu_bus_suspend(struct usb_hcd *hcd) oxu_bus_suspend() argument 3607 static int oxu_bus_resume(struct usb_hcd *hcd) oxu_bus_resume() argument 3720 struct usb_hcd *hcd; oxu_create() local 3729 hcd = usb_create_hcd(&oxu_hc_driver, dev, oxu_create() 3731 if (!hcd) oxu_create() 3734 hcd->rsrc_start = memstart; oxu_create() 3735 hcd->rsrc_len = memlen; oxu_create() 3736 hcd->regs = base; oxu_create() 3737 hcd->irq = irq; oxu_create() 3738 hcd->state = HC_STATE_HALT; oxu_create() 3740 oxu = hcd_to_oxu(hcd); oxu_create() 3743 ret = usb_add_hcd(hcd, irq, IRQF_SHARED); oxu_create() 3747 device_wakeup_enable(hcd->self.controller); oxu_create() 3748 return hcd; oxu_create() 3756 struct usb_hcd *hcd; oxu_init() local 3769 hcd = oxu_create(pdev, memstart, memlen, base, irq, 1); oxu_init() 3770 if (IS_ERR(hcd)) { oxu_init() 3772 ret = PTR_ERR(hcd); oxu_init() 3775 info->hcd[0] = hcd; oxu_init() 3778 hcd = oxu_create(pdev, memstart, memlen, base, irq, 0); oxu_init() 3779 if (IS_ERR(hcd)) { oxu_init() 3781 ret = PTR_ERR(hcd); oxu_init() 3784 info->hcd[1] = hcd; oxu_init() 3792 usb_remove_hcd(info->hcd[0]); oxu_init() 3793 usb_put_hcd(info->hcd[0]); oxu_init() 3864 static void oxu_remove(struct platform_device *pdev, struct usb_hcd *hcd) oxu_remove() argument 3866 usb_remove_hcd(hcd); oxu_remove() 3867 usb_put_hcd(hcd); oxu_remove() 3874 oxu_remove(pdev, info->hcd[0]); oxu_drv_remove() 3875 oxu_remove(pdev, info->hcd[1]); oxu_drv_remove() 3890 struct usb_hcd *hcd = dev_get_drvdata(dev); 3898 struct usb_hcd *hcd = dev_get_drvdata(dev); 3914 .name = "oxu210hp-hcd",
|
H A D | uhci-hub.c | 185 static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf) uhci_hub_status_data() argument 187 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_hub_status_data() 194 if (!HCD_HW_ACCESSIBLE(hcd) || uhci->dead) uhci_hub_status_data() 205 usb_hcd_resume_root_hub(hcd); uhci_hub_status_data() 242 static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, uhci_hub_control() argument 245 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_hub_control() 252 if (!HCD_HW_ACCESSIBLE(hcd) || uhci->dead) uhci_hub_control()
|
H A D | fhci-hub.c | 25 #include <linux/usb/hcd.h> 181 int fhci_hub_status_data(struct usb_hcd *hcd, char *buf) fhci_hub_status_data() argument 183 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_hub_status_data() 206 int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, fhci_hub_control() argument 209 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_hub_control()
|
H A D | ohci.h | 28 /* info bits defined by hcd */ 333 /* hcd-private per-urb state */ 371 * hcd adds to schedule for a live hc any time, but removals finish 477 /* convert between an hcd pointer and the corresponding ohci_hcd */ hcd_to_ohci() 478 static inline struct ohci_hcd *hcd_to_ohci (struct usb_hcd *hcd) hcd_to_ohci() argument 480 return (struct ohci_hcd *) (hcd->hcd_priv); hcd_to_ohci() 731 int (*reset)(struct usb_hcd *hcd); 737 extern int ohci_setup(struct usb_hcd *hcd); 739 extern int ohci_suspend(struct usb_hcd *hcd, bool do_wakeup); 740 extern int ohci_resume(struct usb_hcd *hcd, bool hibernated); 742 extern int ohci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, 744 extern int ohci_hub_status_data(struct usb_hcd *hcd, char *buf);
|
H A D | sl811_cs.c | 6 * Port to sl811-hcd and 2.6.x by 105 /* The driver core will probe for us. We know sl811-hcd has been sl811_hc_init()
|
H A D | ehci-dbg.c | 19 /* this file is part of ehci-hcd.c */ 499 struct usb_hcd *hcd; fill_async_buffer() local 506 hcd = bus_to_hcd(buf->bus); fill_async_buffer() 507 ehci = hcd_to_ehci (hcd); fill_async_buffer() 622 struct usb_hcd *hcd; fill_periodic_buffer() local 636 hcd = bus_to_hcd(buf->bus); fill_periodic_buffer() 637 ehci = hcd_to_ehci (hcd); fill_periodic_buffer() 781 struct usb_hcd *hcd; fill_registers_buffer() local 789 hcd = bus_to_hcd(buf->bus); fill_registers_buffer() 790 ehci = hcd_to_ehci (hcd); fill_registers_buffer() 796 if (!HCD_HW_ACCESSIBLE(hcd)) { fill_registers_buffer() 801 hcd->self.controller->bus->name, fill_registers_buffer() 802 dev_name(hcd->self.controller), fill_registers_buffer() 803 hcd->product_desc); fill_registers_buffer() 813 hcd->self.controller->bus->name, fill_registers_buffer() 814 dev_name(hcd->self.controller), fill_registers_buffer() 815 hcd->product_desc, fill_registers_buffer() 822 if (dev_is_pci(hcd->self.controller)) { fill_registers_buffer()
|
H A D | xhci.h | 30 #include <linux/usb/hcd.h> 33 /* Code sharing between pci-quirks and xhci hcd */ 1489 static inline unsigned int hcd_index(struct usb_hcd *hcd) hcd_index() argument 1491 if (hcd->speed == HCD_USB3) hcd_index() 1665 int (*reset)(struct usb_hcd *hcd); 1666 int (*start)(struct usb_hcd *hcd); 1672 static inline struct xhci_hcd *hcd_to_xhci(struct usb_hcd *hcd) hcd_to_xhci() argument 1676 if (usb_hcd_is_primary_hcd(hcd)) hcd_to_xhci() 1677 primary_hcd = hcd; hcd_to_xhci() 1679 primary_hcd = hcd->primary_hcd; hcd_to_xhci() 1822 int xhci_init(struct usb_hcd *hcd); 1823 int xhci_run(struct usb_hcd *hcd); 1824 void xhci_stop(struct usb_hcd *hcd); 1825 void xhci_shutdown(struct usb_hcd *hcd); 1826 int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks); 1838 int xhci_get_frame(struct usb_hcd *hcd); 1839 irqreturn_t xhci_irq(struct usb_hcd *hcd); 1840 irqreturn_t xhci_msi_irq(int irq, void *hcd); 1841 int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev); 1842 void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev); 1847 int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, 1850 int xhci_free_streams(struct usb_hcd *hcd, struct usb_device *udev, 1853 int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev); 1854 int xhci_enable_device(struct usb_hcd *hcd, struct usb_device *udev); 1855 int xhci_update_device(struct usb_hcd *hcd, struct usb_device *udev); 1856 int xhci_set_usb2_hardware_lpm(struct usb_hcd *hcd, 1858 int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, 1860 int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags); 1861 int xhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status); 1862 int xhci_add_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep); 1863 int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep); 1864 void xhci_endpoint_reset(struct usb_hcd *hcd, struct usb_host_endpoint *ep); 1865 int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev); 1866 int xhci_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 1867 void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev); 1924 int xhci_enable_usb3_lpm_timeout(struct usb_hcd *hcd, 1926 int xhci_disable_usb3_lpm_timeout(struct usb_hcd *hcd, 1930 int xhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, 1932 int xhci_hub_status_data(struct usb_hcd *hcd, char *buf); 1933 int xhci_find_raw_port_number(struct usb_hcd *hcd, int port1); 1936 int xhci_bus_suspend(struct usb_hcd *hcd); 1937 int xhci_bus_resume(struct usb_hcd *hcd); 1944 int xhci_find_slot_id_by_port(struct usb_hcd *hcd, struct xhci_hcd *xhci,
|
H A D | fotg210-hcd.c | 39 #include <linux/usb/hcd.h> 460 struct usb_hcd *hcd; fill_async_buffer() local 467 hcd = bus_to_hcd(buf->bus); fill_async_buffer() 468 fotg210 = hcd_to_fotg210(hcd); fill_async_buffer() 527 struct usb_hcd *hcd; fill_periodic_buffer() local 542 hcd = bus_to_hcd(buf->bus); fill_periodic_buffer() 543 fotg210 = hcd_to_fotg210(hcd); fill_periodic_buffer() 652 struct usb_hcd *hcd; fill_registers_buffer() local 660 hcd = bus_to_hcd(buf->bus); fill_registers_buffer() 661 fotg210 = hcd_to_fotg210(hcd); fill_registers_buffer() 667 if (!HCD_HW_ACCESSIBLE(hcd)) { fill_registers_buffer() 672 hcd->self.controller->bus->name, fill_registers_buffer() 673 dev_name(hcd->self.controller), fill_registers_buffer() 674 hcd->product_desc); fill_registers_buffer() 685 hcd->self.controller->bus->name, fill_registers_buffer() 686 dev_name(hcd->self.controller), fill_registers_buffer() 687 hcd->product_desc, fill_registers_buffer() 1418 static int fotg210_hub_status_data(struct usb_hcd *hcd, char *buf) fotg210_hub_status_data() argument 1420 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_hub_status_data() 1485 static int fotg210_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, fotg210_hub_control() argument 1488 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_hub_control() 1806 static void __maybe_unused fotg210_relinquish_port(struct usb_hcd *hcd, fotg210_relinquish_port() argument 1812 static int __maybe_unused fotg210_port_handed_over(struct usb_hcd *hcd, fotg210_port_handed_over() argument 2118 static void fotg210_clear_tt_buffer_complete(struct usb_hcd *hcd, fotg210_clear_tt_buffer_complete() argument 2121 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_clear_tt_buffer_complete() 3302 static int fotg210_get_frame(struct usb_hcd *hcd); 4847 static void fotg210_shutdown(struct usb_hcd *hcd) fotg210_shutdown() argument 4849 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_shutdown() 4898 static void fotg210_stop(struct usb_hcd *hcd) fotg210_stop() argument 4900 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_stop() 4937 static int hcd_fotg210_init(struct usb_hcd *hcd) hcd_fotg210_init() argument 4939 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); hcd_fotg210_init() 5038 if (!(hcd->driver->flags & HCD_LOCAL_MEM)) hcd_fotg210_init() 5039 hcd->self.sg_tablesize = ~0; hcd_fotg210_init() 5044 static int fotg210_run(struct usb_hcd *hcd) fotg210_run() argument 5046 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_run() 5050 hcd->uses_new_polling = 1; fotg210_run() 5124 static int fotg210_setup(struct usb_hcd *hcd) fotg210_setup() argument 5126 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_setup() 5142 retval = hcd_fotg210_init(hcd); fotg210_setup() 5155 static irqreturn_t fotg210_irq(struct usb_hcd *hcd) fotg210_irq() argument 5157 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_irq() 5240 usb_hcd_resume_root_hub(hcd); fotg210_irq() 5258 mod_timer(&hcd->rh_timer, fotg210->reset_done[0]); fotg210_irq() 5268 usb_hc_died(hcd); fotg210_irq() 5287 usb_hcd_poll_rh_status(hcd); fotg210_irq() 5294 * urb + dev is in hcd.self.controller.urb_list 5297 * hcd-specific init for hcpriv hasn't been done yet 5302 static int fotg210_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, fotg210_urb_enqueue() argument 5305 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_urb_enqueue() 5338 static int fotg210_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) fotg210_urb_dequeue() argument 5340 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_urb_dequeue() 5346 rc = usb_hcd_check_unlink_urb(hcd, urb, status); fotg210_urb_dequeue() 5406 static void fotg210_endpoint_disable(struct usb_hcd *hcd, fotg210_endpoint_disable() argument 5409 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_endpoint_disable() 5479 static void fotg210_endpoint_reset(struct usb_hcd *hcd, fotg210_endpoint_reset() argument 5482 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_endpoint_reset() 5520 static int fotg210_get_frame(struct usb_hcd *hcd) fotg210_get_frame() argument 5522 struct fotg210_hcd *fotg210 = hcd_to_fotg210(hcd); fotg210_get_frame() 5606 struct usb_hcd *hcd; fotg210_hcd_probe() local 5626 hcd = usb_create_hcd(&fotg210_fotg210_hc_driver, dev, fotg210_hcd_probe() 5628 if (!hcd) { fotg210_hcd_probe() 5629 dev_err(dev, "failed to create hcd with err %d\n", retval); fotg210_hcd_probe() 5634 hcd->has_tt = 1; fotg210_hcd_probe() 5637 hcd->regs = devm_ioremap_resource(&pdev->dev, res); fotg210_hcd_probe() 5638 if (IS_ERR(hcd->regs)) { fotg210_hcd_probe() 5639 retval = PTR_ERR(hcd->regs); fotg210_hcd_probe() 5643 hcd->rsrc_start = res->start; fotg210_hcd_probe() 5644 hcd->rsrc_len = resource_size(res); fotg210_hcd_probe() 5646 fotg210 = hcd_to_fotg210(hcd); fotg210_hcd_probe() 5648 fotg210->caps = hcd->regs; fotg210_hcd_probe() 5650 retval = fotg210_setup(hcd); fotg210_hcd_probe() 5656 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); fotg210_hcd_probe() 5658 dev_err(dev, "failed to add hcd with err %d\n", retval); fotg210_hcd_probe() 5661 device_wakeup_enable(hcd->self.controller); fotg210_hcd_probe() 5666 usb_put_hcd(hcd); fotg210_hcd_probe() 5680 struct usb_hcd *hcd = dev_get_drvdata(dev); fotg210_hcd_remove() local 5682 if (!hcd) fotg210_hcd_remove() 5685 usb_remove_hcd(hcd); fotg210_hcd_remove() 5686 usb_put_hcd(hcd); fotg210_hcd_remove() 5693 .name = "fotg210-hcd",
|
H A D | fhci.h | 29 #include <linux/usb/hcd.h> 468 static inline struct fhci_hcd *hcd_to_fhci(struct usb_hcd *hcd) hcd_to_fhci() argument 470 return (struct fhci_hcd *)hcd->hcd_priv; hcd_to_fhci() 511 /* fhci-hcd.c */ 536 int fhci_hub_status_data(struct usb_hcd *hcd, char *buf); 537 int fhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, 566 irqreturn_t fhci_irq(struct usb_hcd *hcd);
|
H A D | ohci-dbg.c | 309 /* caller MUST own hcd spinlock if verbose is set! */ 582 struct usb_hcd *hcd; fill_registers_buffer() local 591 hcd = ohci_to_hcd(ohci); fill_registers_buffer() 604 hcd->self.controller->bus->name, fill_registers_buffer() 605 dev_name(hcd->self.controller), fill_registers_buffer() 606 hcd->product_desc, fill_registers_buffer() 609 if (!HCD_HW_ACCESSIBLE(hcd)) { fill_registers_buffer()
|
H A D | fhci-dbg.c | 23 #include <linux/usb/hcd.h>
|
H A D | fhci-mem.c | 24 #include <linux/usb/hcd.h>
|
H A D | ohci-mem.c | 17 * - driver buffers, read/written by HC ... the hcd glue or the
|
H A D | xhci-trace.h | 15 #define TRACE_SYSTEM xhci-hcd
|
H A D | ehci.h | 271 static inline struct ehci_hcd *hcd_to_ehci (struct usb_hcd *hcd) hcd_to_ehci() argument 273 return (struct ehci_hcd *) (hcd->hcd_priv); hcd_to_ehci() 873 int (*reset)(struct usb_hcd *hcd); 874 int (*port_power)(struct usb_hcd *hcd, 880 extern int ehci_setup(struct usb_hcd *hcd); 886 extern int ehci_suspend(struct usb_hcd *hcd, bool do_wakeup); 887 extern int ehci_resume(struct usb_hcd *hcd, bool force_reset); 892 extern int ehci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
|
H A D | r8a66597.h | 137 static inline struct r8a66597 *hcd_to_r8a66597(struct usb_hcd *hcd) hcd_to_r8a66597() argument 139 return (struct r8a66597 *)(hcd->hcd_priv); hcd_to_r8a66597()
|
H A D | sl811.h | 158 static inline struct sl811 *hcd_to_sl811(struct usb_hcd *hcd) hcd_to_sl811() argument 160 return (struct sl811 *) (hcd->hcd_priv); hcd_to_sl811()
|
H A D | fhci-sched.c | 27 #include <linux/usb/hcd.h> 510 struct usb_hcd *hcd = _hcd; fhci_frame_limit_timer_irq() local 511 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_frame_limit_timer_irq() 546 irqreturn_t fhci_irq(struct usb_hcd *hcd) fhci_irq() argument 548 struct fhci_hcd *fhci = hcd_to_fhci(hcd); fhci_irq()
|
H A D | xhci-ring.c | 599 struct usb_hcd *hcd; xhci_giveback_urb_in_irq() local 606 hcd = bus_to_hcd(urb->dev->bus); xhci_giveback_urb_in_irq() 617 usb_hcd_unlink_urb_from_ep(hcd, urb); xhci_giveback_urb_in_irq() 620 usb_hcd_giveback_urb(hcd, urb, status); xhci_giveback_urb_in_irq() 1431 static unsigned int find_faked_portnum_from_hw_portnum(struct usb_hcd *hcd, find_faked_portnum_from_hw_portnum() argument 1456 if ((port_speed == 0x03) == (hcd->speed >= HCD_USB3)) find_faked_portnum_from_hw_portnum() 1485 struct usb_hcd *hcd; handle_port_status() local 1517 hcd = xhci_to_hcd(xhci); handle_port_status() 1518 if ((major_revision == 0x03) != (hcd->speed >= HCD_USB3)) handle_port_status() 1519 hcd = xhci->shared_hcd; handle_port_status() 1543 bus_state = &xhci->bus_state[hcd_index(hcd)]; handle_port_status() 1544 if (hcd->speed >= HCD_USB3) handle_port_status() 1549 faked_port_index = find_faked_portnum_from_hw_portnum(hcd, xhci, handle_port_status() 1553 if (hcd->state == HC_STATE_SUSPENDED) { handle_port_status() 1555 usb_hcd_resume_root_hub(hcd); handle_port_status() 1558 if (hcd->speed >= HCD_USB3 && (temp & PORT_PLS_MASK) == XDEV_INACTIVE) handle_port_status() 1592 mod_timer(&hcd->rh_timer, handle_port_status() 1608 slot_id = xhci_find_slot_id_by_port(hcd, xhci, handle_port_status() 1617 usb_wakeup_notification(hcd->self.root_hub, handle_port_status() 1637 if (hcd->speed < HCD_USB3) handle_port_status() 1660 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); handle_port_status() 1663 usb_hcd_poll_rh_status(hcd); handle_port_status() 2686 irqreturn_t xhci_irq(struct usb_hcd *hcd) xhci_irq() argument 2688 struct xhci_hcd *xhci = hcd_to_xhci(hcd); xhci_irq() 2722 if (hcd->irq) { xhci_irq() 2772 irqreturn_t xhci_msi_irq(int irq, void *hcd) xhci_msi_irq() argument 2774 return xhci_irq(hcd); xhci_msi_irq()
|
H A D | ehci-sysfs.c | 19 /* this file is part of ehci-hcd.c */
|
H A D | isp116x.h | 291 static inline struct isp116x *hcd_to_isp116x(struct usb_hcd *hcd) hcd_to_isp116x() argument 293 return (struct isp116x *)(hcd->hcd_priv); hcd_to_isp116x()
|
H A D | ehci-mem.c | 19 /* this file is part of ehci-hcd.c */
|
H A D | fhci-q.c | 25 #include <linux/usb/hcd.h>
|
H A D | uhci-q.c | 1409 static int uhci_urb_enqueue(struct usb_hcd *hcd, uhci_urb_enqueue() argument 1413 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_urb_enqueue() 1420 ret = usb_hcd_link_urb_to_ep(hcd, urb); uhci_urb_enqueue() 1476 usb_hcd_unlink_urb_from_ep(hcd, urb); uhci_urb_enqueue() 1482 static int uhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) uhci_urb_dequeue() argument 1484 struct uhci_hcd *uhci = hcd_to_uhci(hcd); uhci_urb_dequeue() 1490 rc = usb_hcd_check_unlink_urb(hcd, urb, status); uhci_urb_dequeue()
|
H A D | ehci-q.c | 19 /* this file is part of ehci-hcd.c */ 145 static void ehci_clear_tt_buffer_complete(struct usb_hcd *hcd, ehci_clear_tt_buffer_complete() argument 148 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_clear_tt_buffer_complete() 1164 struct usb_hcd *hcd, submit_single_step_set_feature() 1168 struct ehci_hcd *ehci = hcd_to_ehci(hcd); submit_single_step_set_feature() 1163 submit_single_step_set_feature( struct usb_hcd *hcd, struct urb *urb, int is_setup ) submit_single_step_set_feature() argument
|
H A D | fotg210.h | 189 static inline struct fotg210_hcd *hcd_to_fotg210(struct usb_hcd *hcd) hcd_to_fotg210() argument 191 return (struct fotg210_hcd *)(hcd->hcd_priv); hcd_to_fotg210()
|
H A D | uhci-hcd.h | 458 static inline struct uhci_hcd *hcd_to_uhci(struct usb_hcd *hcd) hcd_to_uhci() argument 460 return (struct uhci_hcd *) (hcd->hcd_priv); hcd_to_uhci()
|
H A D | bcma-hcd.c | 238 gpio_request(gpio, "bcma-hcd-gpio"); bcma_hci_platform_power_gpio()
|
H A D | imx21-dbg.c | 19 /* this file is part of imx21-hcd.c */
|
H A D | imx21-hcd.h | 422 struct usb_hcd *hcd; member in struct:imx21
|
H A D | ehci-timer.c | 15 /* This file is part of ehci-hcd.c */
|
H A D | oxu210hp.h | 349 struct usb_hcd *hcd[2]; member in struct:oxu_info
|
H A D | uhci-debug.c | 17 #include "uhci-hcd.h"
|
H A D | isp1362.h | 569 static inline struct isp1362_hcd *hcd_to_isp1362_hcd(struct usb_hcd *hcd) hcd_to_isp1362_hcd() argument 571 return (struct isp1362_hcd *) (hcd->hcd_priv); hcd_to_isp1362_hcd()
|
H A D | xhci-mem.c | 275 /* XXX: Do we need the hcd structure in all these functions? */ xhci_ring_free() 1073 struct usb_hcd *hcd; xhci_find_real_port_number() local 1076 hcd = xhci->shared_hcd; xhci_find_real_port_number() 1078 hcd = xhci->main_hcd; xhci_find_real_port_number() 1084 return xhci_find_raw_port_number(hcd, top_dev->portnum); xhci_find_real_port_number()
|
H A D | fhci-tds.c | 25 #include <linux/usb/hcd.h>
|
/linux-4.4.14/drivers/usb/isp1760/ |
H A D | Makefile | 2 isp1760-$(CONFIG_USB_ISP1760_HCD) += isp1760-hcd.o
|
H A D | isp1760-hcd.c | 20 #include <linux/usb/hcd.h> 30 #include "isp1760-hcd.h" 37 typedef void (packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh, 40 static inline struct isp1760_hcd *hcd_to_priv(struct usb_hcd *hcd) hcd_to_priv() argument 42 return *(struct isp1760_hcd **)hcd->hcd_priv; hcd_to_priv() 335 static void alloc_mem(struct usb_hcd *hcd, struct isp1760_qtd *qtd) alloc_mem() argument 337 struct isp1760_hcd *priv = hcd_to_priv(hcd); alloc_mem() 355 static void free_mem(struct usb_hcd *hcd, struct isp1760_qtd *qtd) free_mem() argument 357 struct isp1760_hcd *priv = hcd_to_priv(hcd); free_mem() 372 dev_err(hcd->self.controller, "%s: Invalid pointer: %08x\n", free_mem() 378 static int handshake(struct usb_hcd *hcd, u32 reg, handshake() argument 384 result = reg_read32(hcd->regs, reg); handshake() 397 static int ehci_reset(struct usb_hcd *hcd) ehci_reset() argument 400 struct isp1760_hcd *priv = hcd_to_priv(hcd); ehci_reset() 402 u32 command = reg_read32(hcd->regs, HC_USBCMD); ehci_reset() 405 reg_write32(hcd->regs, HC_USBCMD, command); ehci_reset() 406 hcd->state = HC_STATE_HALT; ehci_reset() 408 retval = handshake(hcd, HC_USBCMD, ehci_reset() 436 static int priv_init(struct usb_hcd *hcd) priv_init() argument 438 struct isp1760_hcd *priv = hcd_to_priv(hcd); priv_init() 454 hcc_params = reg_read32(hcd->regs, HC_HCCPARAMS); priv_init() 464 static int isp1760_hc_setup(struct usb_hcd *hcd) isp1760_hc_setup() argument 466 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_hc_setup() 470 reg_write32(hcd->regs, HC_SCRATCH_REG, 0xdeadbabe); isp1760_hc_setup() 472 scratch = reg_read32(hcd->regs, HC_CHIP_ID_REG); isp1760_hc_setup() 473 scratch = reg_read32(hcd->regs, HC_SCRATCH_REG); isp1760_hc_setup() 475 dev_err(hcd->self.controller, "Scratch test failed.\n"); isp1760_hc_setup() 487 reg_write32(hcd->regs, HC_BUFFER_STATUS_REG, 0); isp1760_hc_setup() 488 reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, NO_TRANSFER_ACTIVE); isp1760_hc_setup() 489 reg_write32(hcd->regs, HC_INT_PTD_SKIPMAP_REG, NO_TRANSFER_ACTIVE); isp1760_hc_setup() 490 reg_write32(hcd->regs, HC_ISO_PTD_SKIPMAP_REG, NO_TRANSFER_ACTIVE); isp1760_hc_setup() 492 result = ehci_reset(hcd); isp1760_hc_setup() 499 hwmode = reg_read32(hcd->regs, HC_HW_MODE_CTRL) & ~ALL_ATX_RESET; isp1760_hc_setup() 500 reg_write32(hcd->regs, HC_HW_MODE_CTRL, hwmode | ALL_ATX_RESET); isp1760_hc_setup() 502 reg_write32(hcd->regs, HC_HW_MODE_CTRL, hwmode); isp1760_hc_setup() 504 reg_write32(hcd->regs, HC_INTERRUPT_ENABLE, INTERRUPT_ENABLE_MASK); isp1760_hc_setup() 506 priv->hcs_params = reg_read32(hcd->regs, HC_HCSPARAMS); isp1760_hc_setup() 508 return priv_init(hcd); isp1760_hc_setup() 670 static void isp1760_urb_done(struct usb_hcd *hcd, struct urb *urb) 674 struct isp1760_hcd *priv = hcd_to_priv(hcd); 690 usb_hcd_unlink_urb_from_ep(hcd, urb); 692 usb_hcd_giveback_urb(hcd, urb, urb->status); 720 static void start_bus_transfer(struct usb_hcd *hcd, u32 ptd_offset, int slot, start_bus_transfer() argument 725 struct isp1760_hcd *priv = hcd_to_priv(hcd); start_bus_transfer() 736 priv->atl_done_map |= reg_read32(hcd->regs, start_bus_transfer() 740 priv->int_done_map |= reg_read32(hcd->regs, start_bus_transfer() 750 ptd_write(hcd->regs, ptd_offset, slot, ptd); start_bus_transfer() 753 skip_map = reg_read32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG); start_bus_transfer() 755 reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, skip_map); start_bus_transfer() 757 skip_map = reg_read32(hcd->regs, HC_INT_PTD_SKIPMAP_REG); start_bus_transfer() 759 reg_write32(hcd->regs, HC_INT_PTD_SKIPMAP_REG, skip_map); start_bus_transfer() 769 static void collect_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh, collect_qtds() argument 789 mem_reads8(hcd->regs, qtd->payload_addr, collect_qtds() 811 free_mem(hcd, qtd); collect_qtds() 832 static void enqueue_qtds(struct usb_hcd *hcd, struct isp1760_qh *qh) enqueue_qtds() argument 834 struct isp1760_hcd *priv = hcd_to_priv(hcd); enqueue_qtds() 872 alloc_mem(hcd, qtd); enqueue_qtds() 879 mem_writes8(hcd->regs, qtd->payload_addr, enqueue_qtds() 889 dev_dbg(hcd->self.controller, "%s: No slot " enqueue_qtds() 899 start_bus_transfer(hcd, ptd_offset, free_slot, enqueue_qtds() 911 static void schedule_ptds(struct usb_hcd *hcd) schedule_ptds() argument 920 if (!hcd) { schedule_ptds() 925 priv = hcd_to_priv(hcd); schedule_ptds() 933 collect_qtds(hcd, qh, &urb_list); list_for_each_entry_safe() 941 isp1760_urb_done(hcd, urb_listitem->urb); 972 enqueue_qtds(hcd, qh); 980 static int check_int_transfer(struct usb_hcd *hcd, struct ptd *ptd, check_int_transfer() argument 999 dev_dbg(hcd->self.controller, "%s: underrun " check_int_transfer() 1005 dev_dbg(hcd->self.controller, "%s: transaction " check_int_transfer() 1012 dev_dbg(hcd->self.controller, "%s: babble " check_int_transfer() 1027 static int check_atl_transfer(struct usb_hcd *hcd, struct ptd *ptd, check_atl_transfer() argument 1041 dev_dbg(hcd->self.controller, "%s: ptd error:\n" check_atl_transfer() 1053 dev_dbg(hcd->self.controller, "PID error; reloading ptd\n"); check_atl_transfer() 1069 static void handle_done_ptds(struct usb_hcd *hcd) handle_done_ptds() argument 1071 struct isp1760_hcd *priv = hcd_to_priv(hcd); handle_done_ptds() 1082 skip_map = reg_read32(hcd->regs, HC_INT_PTD_SKIPMAP_REG); handle_done_ptds() 1084 skip_map = reg_read32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG); handle_done_ptds() 1102 ptd_read(hcd->regs, INT_PTD_OFFSET, slot, &ptd); handle_done_ptds() 1103 state = check_int_transfer(hcd, &ptd, handle_done_ptds() 1117 ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); handle_done_ptds() 1118 state = check_atl_transfer(hcd, &ptd, handle_done_ptds() 1188 dev_err(hcd->self.controller, handle_done_ptds() 1198 start_bus_transfer(hcd, ptd_offset, slot, slots, qtd, handle_done_ptds() 1204 schedule_ptds(hcd); handle_done_ptds() 1207 static irqreturn_t isp1760_irq(struct usb_hcd *hcd) isp1760_irq() argument 1209 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_irq() 1215 if (!(hcd->state & HC_STATE_RUNNING)) isp1760_irq() 1218 imask = reg_read32(hcd->regs, HC_INTERRUPT_REG); isp1760_irq() 1221 reg_write32(hcd->regs, HC_INTERRUPT_REG, imask); /* Clear */ isp1760_irq() 1223 priv->int_done_map |= reg_read32(hcd->regs, HC_INT_PTD_DONEMAP_REG); isp1760_irq() 1224 priv->atl_done_map |= reg_read32(hcd->regs, HC_ATL_PTD_DONEMAP_REG); isp1760_irq() 1226 handle_done_ptds(hcd); isp1760_irq() 1266 struct usb_hcd *hcd = (struct usb_hcd *) data; errata2_function() local 1267 struct isp1760_hcd *priv = hcd_to_priv(hcd); errata2_function() 1278 ptd_read(hcd->regs, ATL_PTD_OFFSET, slot, &ptd); errata2_function() 1285 handle_done_ptds(hcd); errata2_function() 1293 static int isp1760_run(struct usb_hcd *hcd) isp1760_run() argument 1300 hcd->uses_new_polling = 1; isp1760_run() 1302 hcd->state = HC_STATE_RUNNING; isp1760_run() 1305 reg_write32(hcd->regs, HC_ATL_IRQ_MASK_AND_REG, 0); isp1760_run() 1306 reg_write32(hcd->regs, HC_ATL_IRQ_MASK_OR_REG, 0xffffffff); isp1760_run() 1307 reg_write32(hcd->regs, HC_INT_IRQ_MASK_AND_REG, 0); isp1760_run() 1308 reg_write32(hcd->regs, HC_INT_IRQ_MASK_OR_REG, 0xffffffff); isp1760_run() 1309 reg_write32(hcd->regs, HC_ISO_IRQ_MASK_AND_REG, 0); isp1760_run() 1310 reg_write32(hcd->regs, HC_ISO_IRQ_MASK_OR_REG, 0xffffffff); isp1760_run() 1313 temp = reg_read32(hcd->regs, HC_HW_MODE_CTRL); isp1760_run() 1314 reg_write32(hcd->regs, HC_HW_MODE_CTRL, temp | HW_GLOBAL_INTR_EN); isp1760_run() 1316 command = reg_read32(hcd->regs, HC_USBCMD); isp1760_run() 1319 reg_write32(hcd->regs, HC_USBCMD, command); isp1760_run() 1321 retval = handshake(hcd, HC_USBCMD, CMD_RUN, CMD_RUN, 250 * 1000); isp1760_run() 1331 reg_write32(hcd->regs, HC_CONFIGFLAG, FLAG_CF); isp1760_run() 1333 retval = handshake(hcd, HC_CONFIGFLAG, FLAG_CF, FLAG_CF, 250 * 1000); isp1760_run() 1338 setup_timer(&errata2_timer, errata2_function, (unsigned long)hcd); isp1760_run() 1342 chipid = reg_read32(hcd->regs, HC_CHIP_ID_REG); isp1760_run() 1343 dev_info(hcd->self.controller, "USB ISP %04x HW rev. %d started\n", isp1760_run() 1349 reg_write32(hcd->regs, HC_ATL_PTD_LASTPTD_REG, 0x80000000); isp1760_run() 1350 reg_write32(hcd->regs, HC_INT_PTD_LASTPTD_REG, 0x80000000); isp1760_run() 1351 reg_write32(hcd->regs, HC_ISO_PTD_LASTPTD_REG, 0x00000001); isp1760_run() 1352 reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, 0xffffffff); isp1760_run() 1353 reg_write32(hcd->regs, HC_INT_PTD_SKIPMAP_REG, 0xffffffff); isp1760_run() 1354 reg_write32(hcd->regs, HC_ISO_PTD_SKIPMAP_REG, 0xffffffff); isp1760_run() 1355 reg_write32(hcd->regs, HC_BUFFER_STATUS_REG, isp1760_run() 1391 static void packetize_urb(struct usb_hcd *hcd, packetize_urb() argument 1405 dev_err(hcd->self.controller, packetize_urb() 1492 static int isp1760_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, isp1760_urb_enqueue() argument 1495 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_urb_enqueue() 1517 dev_err(hcd->self.controller, "%s: isochronous USB packets " isp1760_urb_enqueue() 1522 dev_err(hcd->self.controller, "%s: unknown pipe type\n", isp1760_urb_enqueue() 1530 packetize_urb(hcd, urb, &new_qtds, mem_flags); isp1760_urb_enqueue() 1537 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { isp1760_urb_enqueue() 1542 retval = usb_hcd_link_urb_to_ep(hcd, urb); isp1760_urb_enqueue() 1563 usb_hcd_unlink_urb_from_ep(hcd, urb); 1572 schedule_ptds(hcd); 1579 static void kill_transfer(struct usb_hcd *hcd, struct urb *urb, kill_transfer() argument 1582 struct isp1760_hcd *priv = hcd_to_priv(hcd); kill_transfer() 1590 skip_map = reg_read32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG); kill_transfer() 1592 reg_write32(hcd->regs, HC_ATL_PTD_SKIPMAP_REG, skip_map); kill_transfer() 1596 skip_map = reg_read32(hcd->regs, HC_INT_PTD_SKIPMAP_REG); kill_transfer() 1598 reg_write32(hcd->regs, HC_INT_PTD_SKIPMAP_REG, skip_map); kill_transfer() 1610 static void dequeue_urb_from_qtd(struct usb_hcd *hcd, struct isp1760_qh *qh, dequeue_urb_from_qtd() argument 1629 kill_transfer(hcd, urb, qh); dequeue_urb_from_qtd() 1641 static int isp1760_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, isp1760_urb_dequeue() argument 1644 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_urb_dequeue() 1651 retval = usb_hcd_check_unlink_urb(hcd, urb, status); isp1760_urb_dequeue() 1663 dequeue_urb_from_qtd(hcd, qh, qtd); isp1760_urb_dequeue() 1669 schedule_ptds(hcd); isp1760_urb_dequeue() 1676 static void isp1760_endpoint_disable(struct usb_hcd *hcd, isp1760_endpoint_disable() argument 1679 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_endpoint_disable() 1702 schedule_ptds(hcd); isp1760_endpoint_disable() 1708 static int isp1760_hub_status_data(struct usb_hcd *hcd, char *buf) isp1760_hub_status_data() argument 1710 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_hub_status_data() 1717 if (!HC_IS_RUNNING(hcd->state)) isp1760_hub_status_data() 1725 temp = reg_read32(hcd->regs, HC_PORTSC1); isp1760_hub_status_data() 1730 reg_write32(hcd->regs, HC_PORTSC1, temp); isp1760_hub_status_data() 1787 static int check_reset_complete(struct usb_hcd *hcd, int index, check_reset_complete() argument 1796 dev_info(hcd->self.controller, check_reset_complete() 1802 reg_write32(hcd->regs, HC_PORTSC1, port_status); check_reset_complete() 1805 dev_info(hcd->self.controller, "port %d high speed\n", check_reset_complete() 1811 static int isp1760_hub_control(struct usb_hcd *hcd, u16 typeReq, isp1760_hub_control() argument 1814 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_hub_control() 1844 temp = reg_read32(hcd->regs, HC_PORTSC1); isp1760_hub_control() 1855 reg_write32(hcd->regs, HC_PORTSC1, temp & ~PORT_PE); isp1760_hub_control() 1869 reg_write32(hcd->regs, HC_PORTSC1, isp1760_hub_control() 1880 reg_write32(hcd->regs, HC_PORTSC1, isp1760_hub_control() 1884 reg_write32(hcd->regs, HC_PORTSC1, temp | PORT_CSC); isp1760_hub_control() 1895 reg_read32(hcd->regs, HC_USBCMD); isp1760_hub_control() 1910 temp = reg_read32(hcd->regs, HC_PORTSC1); isp1760_hub_control() 1919 dev_err(hcd->self.controller, "Port resume should be skipped.\n"); isp1760_hub_control() 1927 mod_timer(&hcd->rh_timer, priv->reset_done); isp1760_hub_control() 1937 temp = reg_read32(hcd->regs, HC_PORTSC1); isp1760_hub_control() 1938 reg_write32(hcd->regs, HC_PORTSC1, isp1760_hub_control() 1940 retval = handshake(hcd, HC_PORTSC1, isp1760_hub_control() 1943 dev_err(hcd->self.controller, isp1760_hub_control() 1960 reg_write32(hcd->regs, HC_PORTSC1, temp & ~PORT_RESET); isp1760_hub_control() 1964 retval = handshake(hcd, HC_PORTSC1, isp1760_hub_control() 1967 dev_err(hcd->self.controller, "port %d reset error %d\n", isp1760_hub_control() 1973 temp = check_reset_complete(hcd, wIndex, isp1760_hub_control() 1974 reg_read32(hcd->regs, HC_PORTSC1)); isp1760_hub_control() 1983 dev_err(hcd->self.controller, "PORT_OWNER is set\n"); isp1760_hub_control() 2017 temp = reg_read32(hcd->regs, HC_PORTSC1); isp1760_hub_control() 2024 reg_write32(hcd->regs, HC_PORTSC1, temp | PORT_PE); isp1760_hub_control() 2032 reg_write32(hcd->regs, HC_PORTSC1, temp | PORT_SUSPEND); isp1760_hub_control() 2036 reg_write32(hcd->regs, HC_PORTSC1, isp1760_hub_control() 2060 reg_write32(hcd->regs, HC_PORTSC1, temp); isp1760_hub_control() 2065 reg_read32(hcd->regs, HC_USBCMD); isp1760_hub_control() 2077 static int isp1760_get_frame(struct usb_hcd *hcd) isp1760_get_frame() argument 2079 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_get_frame() 2082 fr = reg_read32(hcd->regs, HC_FRINDEX); isp1760_get_frame() 2086 static void isp1760_stop(struct usb_hcd *hcd) isp1760_stop() argument 2088 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_stop() 2093 isp1760_hub_control(hcd, ClearPortFeature, USB_PORT_FEAT_POWER, 1, isp1760_stop() 2098 ehci_reset(hcd); isp1760_stop() 2100 temp = reg_read32(hcd->regs, HC_HW_MODE_CTRL); isp1760_stop() 2101 reg_write32(hcd->regs, HC_HW_MODE_CTRL, temp &= ~HW_GLOBAL_INTR_EN); isp1760_stop() 2104 reg_write32(hcd->regs, HC_CONFIGFLAG, 0); isp1760_stop() 2107 static void isp1760_shutdown(struct usb_hcd *hcd) isp1760_shutdown() argument 2111 isp1760_stop(hcd); isp1760_shutdown() 2112 temp = reg_read32(hcd->regs, HC_HW_MODE_CTRL); isp1760_shutdown() 2113 reg_write32(hcd->regs, HC_HW_MODE_CTRL, temp &= ~HW_GLOBAL_INTR_EN); isp1760_shutdown() 2115 command = reg_read32(hcd->regs, HC_USBCMD); isp1760_shutdown() 2117 reg_write32(hcd->regs, HC_USBCMD, command); isp1760_shutdown() 2120 static void isp1760_clear_tt_buffer_complete(struct usb_hcd *hcd, isp1760_clear_tt_buffer_complete() argument 2123 struct isp1760_hcd *priv = hcd_to_priv(hcd); isp1760_clear_tt_buffer_complete() 2132 schedule_ptds(hcd); isp1760_clear_tt_buffer_complete() 2138 .description = "isp1760-hcd", 2194 struct usb_hcd *hcd; isp1760_hcd_register() local 2197 hcd = usb_create_hcd(&isp1760_hc_driver, dev, dev_name(dev)); isp1760_hcd_register() 2198 if (!hcd) isp1760_hcd_register() 2201 *(struct isp1760_hcd **)hcd->hcd_priv = priv; isp1760_hcd_register() 2203 priv->hcd = hcd; isp1760_hcd_register() 2207 hcd->irq = irq; isp1760_hcd_register() 2208 hcd->regs = regs; isp1760_hcd_register() 2209 hcd->rsrc_start = mem->start; isp1760_hcd_register() 2210 hcd->rsrc_len = resource_size(mem); isp1760_hcd_register() 2213 hcd->cant_recv_wakeups = 1; isp1760_hcd_register() 2215 ret = usb_add_hcd(hcd, irq, irqflags); isp1760_hcd_register() 2219 device_wakeup_enable(hcd->self.controller); isp1760_hcd_register() 2224 usb_put_hcd(hcd); isp1760_hcd_register() 2230 if (!priv->hcd) isp1760_hcd_unregister() 2233 usb_remove_hcd(priv->hcd); isp1760_hcd_unregister() 2234 usb_put_hcd(priv->hcd); isp1760_hcd_unregister()
|
H A D | isp1760-core.h | 21 #include "isp1760-hcd.h" 48 struct isp1760_hcd hcd; member in struct:isp1760_device
|
H A D | isp1760-core.c | 25 #include "isp1760-hcd.h" 147 ret = isp1760_hcd_register(&isp->hcd, isp->regs, mem, irq, isp1760_register() 156 isp1760_hcd_unregister(&isp->hcd); isp1760_register() 171 isp1760_hcd_unregister(&isp->hcd); isp1760_unregister()
|
H A D | isp1760-hcd.h | 51 struct usb_hcd *hcd; member in struct:isp1760_hcd
|
H A D | isp1760-if.c | 19 #include <linux/usb/hcd.h>
|
/linux-4.4.14/drivers/usb/usbip/ |
H A D | Makefile | 6 obj-$(CONFIG_USBIP_VHCI_HCD) += vhci-hcd.o 7 vhci-hcd-y := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o
|
H A D | vhci_hcd.c | 44 /* See usb gadget dummy hcd */ 46 static int vhci_hub_status(struct usb_hcd *hcd, char *buff); 47 static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, 49 static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, 51 static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status); 53 static void vhci_stop(struct usb_hcd *hcd); 54 static int vhci_get_frame_number(struct usb_hcd *hcd); 179 static int vhci_hub_status(struct usb_hcd *hcd, char *buf) vhci_hub_status() argument 189 vhci = hcd_to_vhci(hcd); vhci_hub_status() 192 if (!HCD_HW_ACCESSIBLE(hcd)) { vhci_hub_status() 208 if ((hcd->state == HC_STATE_SUSPENDED) && (changed == 1)) vhci_hub_status() 209 usb_hcd_resume_root_hub(hcd); vhci_hub_status() 228 static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, vhci_hub_control() argument 237 if (!HCD_HW_ACCESSIBLE(hcd)) vhci_hub_control() 250 dum = hcd_to_vhci(hcd); vhci_hub_control() 458 static int vhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, vhci_urb_enqueue() argument 466 hcd, urb, mem_flags); vhci_urb_enqueue() 492 ret = usb_hcd_link_urb_to_ep(hcd, urb); vhci_urb_enqueue() 565 usb_hcd_unlink_urb_from_ep(hcd, urb); vhci_urb_enqueue() 620 static int vhci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) vhci_urb_dequeue() argument 640 ret = usb_hcd_check_unlink_urb(hcd, urb, status); vhci_urb_dequeue() 668 usb_hcd_unlink_urb_from_ep(hcd, urb); vhci_urb_dequeue() 877 static int vhci_start(struct usb_hcd *hcd) vhci_start() argument 879 struct vhci_hcd *vhci = hcd_to_vhci(hcd); vhci_start() 897 hcd->power_budget = 0; /* no limit */ vhci_start() 898 hcd->uses_new_polling = 1; vhci_start() 910 static void vhci_stop(struct usb_hcd *hcd) vhci_stop() argument 912 struct vhci_hcd *vhci = hcd_to_vhci(hcd); vhci_stop() 929 static int vhci_get_frame_number(struct usb_hcd *hcd) vhci_get_frame_number() argument 938 static int vhci_bus_suspend(struct usb_hcd *hcd) vhci_bus_suspend() argument 940 struct vhci_hcd *vhci = hcd_to_vhci(hcd); vhci_bus_suspend() 942 dev_dbg(&hcd->self.root_hub->dev, "%s\n", __func__); vhci_bus_suspend() 945 hcd->state = HC_STATE_SUSPENDED; vhci_bus_suspend() 951 static int vhci_bus_resume(struct usb_hcd *hcd) vhci_bus_resume() argument 953 struct vhci_hcd *vhci = hcd_to_vhci(hcd); vhci_bus_resume() 956 dev_dbg(&hcd->self.root_hub->dev, "%s\n", __func__); vhci_bus_resume() 959 if (!HCD_HW_ACCESSIBLE(hcd)) vhci_bus_resume() 962 hcd->state = HC_STATE_RUNNING; vhci_bus_resume() 997 struct usb_hcd *hcd; vhci_hcd_probe() local 1003 * Allocate and initialize hcd. vhci_hcd_probe() 1006 hcd = usb_create_hcd(&vhci_hc_driver, &pdev->dev, dev_name(&pdev->dev)); vhci_hcd_probe() 1007 if (!hcd) { vhci_hcd_probe() 1008 pr_err("create hcd failed\n"); vhci_hcd_probe() 1011 hcd->has_tt = 1; vhci_hcd_probe() 1014 the_controller = hcd_to_vhci(hcd); vhci_hcd_probe() 1020 ret = usb_add_hcd(hcd, 0, 0); vhci_hcd_probe() 1023 usb_put_hcd(hcd); vhci_hcd_probe() 1034 struct usb_hcd *hcd; vhci_hcd_remove() local 1036 hcd = platform_get_drvdata(pdev); vhci_hcd_remove() 1037 if (!hcd) vhci_hcd_remove() 1045 usb_remove_hcd(hcd); vhci_hcd_remove() 1046 usb_put_hcd(hcd); vhci_hcd_remove() 1057 struct usb_hcd *hcd; vhci_hcd_suspend() local 1062 hcd = platform_get_drvdata(pdev); vhci_hcd_suspend() 1080 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); vhci_hcd_suspend() 1088 struct usb_hcd *hcd; vhci_hcd_resume() local 1092 hcd = platform_get_drvdata(pdev); vhci_hcd_resume() 1093 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); vhci_hcd_resume() 1094 usb_hcd_poll_rh_status(hcd); vhci_hcd_resume()
|
H A D | vhci.h | 20 #include <linux/usb/hcd.h> 114 static inline struct vhci_hcd *hcd_to_vhci(struct usb_hcd *hcd) hcd_to_vhci() argument 116 return (struct vhci_hcd *) (hcd->hcd_priv); hcd_to_vhci()
|
H A D | stub_rx.c | 23 #include <linux/usb/hcd.h> 238 * flight in usb hcd hardware/driver). Now we are stub_recv_cmd_unlink()
|
/linux-4.4.14/drivers/usb/core/ |
H A D | Makefile | 5 usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o 10 usbcore-$(CONFIG_PCI) += hcd-pci.o
|
H A D | buffer.c | 17 #include <linux/usb/hcd.h> 49 * @hcd: the bus whose buffer pools are to be initialized 60 int hcd_buffer_create(struct usb_hcd *hcd) hcd_buffer_create() argument 65 if (!hcd->self.controller->dma_mask && hcd_buffer_create() 66 !(hcd->driver->flags & HCD_LOCAL_MEM)) hcd_buffer_create() 74 hcd->pool[i] = dma_pool_create(name, hcd->self.controller, hcd_buffer_create() 76 if (!hcd->pool[i]) { hcd_buffer_create() 77 hcd_buffer_destroy(hcd); hcd_buffer_create() 87 * @hcd: the bus whose buffer pools are to be destroyed 92 void hcd_buffer_destroy(struct usb_hcd *hcd) hcd_buffer_destroy() argument 97 struct dma_pool *pool = hcd->pool[i]; hcd_buffer_destroy() 101 hcd->pool[i] = NULL; hcd_buffer_destroy() 118 struct usb_hcd *hcd = bus_to_hcd(bus); hcd_buffer_alloc() local 123 !(hcd->driver->flags & HCD_LOCAL_MEM)) { hcd_buffer_alloc() 130 return dma_pool_alloc(hcd->pool[i], mem_flags, dma); hcd_buffer_alloc() 132 return dma_alloc_coherent(hcd->self.controller, size, dma, mem_flags); hcd_buffer_alloc() 142 struct usb_hcd *hcd = bus_to_hcd(bus); hcd_buffer_free() local 149 !(hcd->driver->flags & HCD_LOCAL_MEM)) { hcd_buffer_free() 156 dma_pool_free(hcd->pool[i], addr, dma); hcd_buffer_free() 160 dma_free_coherent(hcd->self.controller, size, addr, dma); hcd_buffer_free()
|
H A D | hcd.c | 47 #include <linux/usb/hcd.h> 415 * @hcd: the host controller for this root hub 426 rh_string(int id, struct usb_hcd const *hcd, u8 *data, unsigned len) rh_string() argument 443 s = hcd->self.bus_name; rh_string() 447 s = hcd->product_desc; rh_string() 452 init_utsname()->release, hcd->driver->description); rh_string() 465 static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) rh_call_control() argument 481 status = usb_hcd_link_urb_to_ep(hcd, urb); rh_call_control() 485 urb->hcpriv = hcd; /* Indicate it's queued */ rh_call_control() 530 tbuf[0] = (device_may_wakeup(&hcd->self.root_hub->dev) rh_call_control() 538 device_set_wakeup_enable(&hcd->self.root_hub->dev, 0); rh_call_control() 543 if (device_can_wakeup(&hcd->self.root_hub->dev) rh_call_control() 545 device_set_wakeup_enable(&hcd->self.root_hub->dev, 1); rh_call_control() 558 switch (hcd->speed) { rh_call_control() 576 if (hcd->has_tt) rh_call_control() 580 switch (hcd->speed) { rh_call_control() 598 if (device_can_wakeup(&hcd->self.root_hub->dev)) rh_call_control() 604 hcd, ubuf, wLength); rh_call_control() 622 dev_dbg (hcd->self.controller, "root hub device address %d\n", rh_call_control() 638 dev_dbg (hcd->self.controller, "no endpoint features yet\n"); rh_call_control() 658 status = hcd->driver->hub_control (hcd, rh_call_control() 663 usb_hub_adjust_deviceremovable(hcd->self.root_hub, rh_call_control() 674 dev_dbg (hcd->self.controller, rh_call_control() 711 usb_hcd_unlink_urb_from_ep(hcd, urb); rh_call_control() 712 usb_hcd_giveback_urb(hcd, urb, status); rh_call_control() 727 void usb_hcd_poll_rh_status(struct usb_hcd *hcd) usb_hcd_poll_rh_status() argument 734 if (unlikely(!hcd->rh_pollable)) usb_hcd_poll_rh_status() 736 if (!hcd->uses_new_polling && !hcd->status_urb) usb_hcd_poll_rh_status() 739 length = hcd->driver->hub_status_data(hcd, buffer); usb_hcd_poll_rh_status() 744 urb = hcd->status_urb; usb_hcd_poll_rh_status() 746 clear_bit(HCD_FLAG_POLL_PENDING, &hcd->flags); usb_hcd_poll_rh_status() 747 hcd->status_urb = NULL; usb_hcd_poll_rh_status() 751 usb_hcd_unlink_urb_from_ep(hcd, urb); usb_hcd_poll_rh_status() 752 usb_hcd_giveback_urb(hcd, urb, 0); usb_hcd_poll_rh_status() 755 set_bit(HCD_FLAG_POLL_PENDING, &hcd->flags); usb_hcd_poll_rh_status() 764 if (hcd->uses_new_polling ? HCD_POLL_RH(hcd) : usb_hcd_poll_rh_status() 765 (length == 0 && hcd->status_urb != NULL)) usb_hcd_poll_rh_status() 766 mod_timer (&hcd->rh_timer, (jiffies/(HZ/4) + 1) * (HZ/4)); usb_hcd_poll_rh_status() 778 static int rh_queue_status (struct usb_hcd *hcd, struct urb *urb) rh_queue_status() argument 785 if (hcd->status_urb || urb->transfer_buffer_length < len) { rh_queue_status() 786 dev_dbg (hcd->self.controller, "not queuing rh status urb\n"); rh_queue_status() 791 retval = usb_hcd_link_urb_to_ep(hcd, urb); rh_queue_status() 795 hcd->status_urb = urb; rh_queue_status() 796 urb->hcpriv = hcd; /* indicate it's queued */ rh_queue_status() 797 if (!hcd->uses_new_polling) rh_queue_status() 798 mod_timer(&hcd->rh_timer, (jiffies/(HZ/4) + 1) * (HZ/4)); rh_queue_status() 801 else if (HCD_POLL_PENDING(hcd)) rh_queue_status() 802 mod_timer(&hcd->rh_timer, jiffies); rh_queue_status() 809 static int rh_urb_enqueue (struct usb_hcd *hcd, struct urb *urb) rh_urb_enqueue() argument 812 return rh_queue_status (hcd, urb); rh_urb_enqueue() 814 return rh_call_control (hcd, urb); rh_urb_enqueue() 823 static int usb_rh_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) usb_rh_urb_dequeue() argument 829 rc = usb_hcd_check_unlink_urb(hcd, urb, status); usb_rh_urb_dequeue() 837 if (!hcd->uses_new_polling) usb_rh_urb_dequeue() 838 del_timer (&hcd->rh_timer); usb_rh_urb_dequeue() 839 if (urb == hcd->status_urb) { usb_rh_urb_dequeue() 840 hcd->status_urb = NULL; usb_rh_urb_dequeue() 841 usb_hcd_unlink_urb_from_ep(hcd, urb); usb_rh_urb_dequeue() 842 usb_hcd_giveback_urb(hcd, urb, status); usb_rh_urb_dequeue() 860 struct usb_hcd *hcd; authorized_default_show() local 862 hcd = bus_to_hcd(usb_bus); authorized_default_show() 863 return snprintf(buf, PAGE_SIZE, "%u\n", !!HCD_DEV_AUTHORIZED(hcd)); authorized_default_show() 874 struct usb_hcd *hcd; authorized_default_store() local 876 hcd = bus_to_hcd(usb_bus); authorized_default_store() 880 set_bit(HCD_FLAG_DEV_AUTHORIZED, &hcd->flags); authorized_default_store() 882 clear_bit(HCD_FLAG_DEV_AUTHORIZED, &hcd->flags); authorized_default_store() 903 struct usb_hcd *hcd = bus_to_hcd(usb_dev->bus); interface_authorized_default_show() local 905 return sprintf(buf, "%u\n", !!HCD_INTF_AUTHORIZED(hcd)); interface_authorized_default_show() 919 struct usb_hcd *hcd = bus_to_hcd(usb_dev->bus); interface_authorized_default_store() local 927 set_bit(HCD_FLAG_INTF_AUTHORIZED, &hcd->flags); interface_authorized_default_store() 929 clear_bit(HCD_FLAG_INTF_AUTHORIZED, &hcd->flags); interface_authorized_default_store() 1043 * @hcd: host controller for this root hub 1052 static int register_root_hub(struct usb_hcd *hcd) register_root_hub() argument 1054 struct device *parent_dev = hcd->self.controller; register_root_hub() 1055 struct usb_device *usb_dev = hcd->self.root_hub; register_root_hub() 1095 hcd->rh_registered = 1; register_root_hub() 1099 if (HCD_DEAD(hcd)) register_root_hub() 1100 usb_hc_died (hcd); /* This time clean up */ register_root_hub() 1212 * @hcd: host controller to which @urb was submitted 1225 int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb) usb_hcd_link_urb_to_ep() argument 1251 if (HCD_RH_RUNNING(hcd)) { usb_hcd_link_urb_to_ep() 1266 * @hcd: host controller to which @urb was submitted 1283 int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, usb_hcd_check_unlink_urb() argument 1308 * @hcd: host controller to which @urb was submitted 1316 void usb_hcd_unlink_urb_from_ep(struct usb_hcd *hcd, struct urb *urb) usb_hcd_unlink_urb_from_ep() argument 1318 /* clear all state linking urb to this dev (and hcd) */ usb_hcd_unlink_urb_from_ep() 1409 void usb_hcd_unmap_urb_setup_for_dma(struct usb_hcd *hcd, struct urb *urb) usb_hcd_unmap_urb_setup_for_dma() argument 1412 dma_unmap_single(hcd->self.controller, usb_hcd_unmap_urb_setup_for_dma() 1428 static void unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) unmap_urb_for_dma() argument 1430 if (hcd->driver->unmap_urb_for_dma) unmap_urb_for_dma() 1431 hcd->driver->unmap_urb_for_dma(hcd, urb); unmap_urb_for_dma() 1433 usb_hcd_unmap_urb_for_dma(hcd, urb); unmap_urb_for_dma() 1436 void usb_hcd_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) usb_hcd_unmap_urb_for_dma() argument 1440 usb_hcd_unmap_urb_setup_for_dma(hcd, urb); usb_hcd_unmap_urb_for_dma() 1444 dma_unmap_sg(hcd->self.controller, usb_hcd_unmap_urb_for_dma() 1449 dma_unmap_page(hcd->self.controller, usb_hcd_unmap_urb_for_dma() 1454 dma_unmap_single(hcd->self.controller, usb_hcd_unmap_urb_for_dma() 1471 static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, map_urb_for_dma() argument 1474 if (hcd->driver->map_urb_for_dma) map_urb_for_dma() 1475 return hcd->driver->map_urb_for_dma(hcd, urb, mem_flags); map_urb_for_dma() 1477 return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); map_urb_for_dma() 1480 int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, usb_hcd_map_urb_for_dma() argument 1493 if (hcd->self.uses_pio_for_control) usb_hcd_map_urb_for_dma() 1495 if (hcd->self.uses_dma) { usb_hcd_map_urb_for_dma() 1497 hcd->self.controller, usb_hcd_map_urb_for_dma() 1501 if (dma_mapping_error(hcd->self.controller, usb_hcd_map_urb_for_dma() 1505 } else if (hcd->driver->flags & HCD_LOCAL_MEM) { usb_hcd_map_urb_for_dma() 1521 if (hcd->self.uses_dma) { usb_hcd_map_urb_for_dma() 1532 hcd->self.controller, usb_hcd_map_urb_for_dma() 1547 hcd->self.controller, usb_hcd_map_urb_for_dma() 1552 if (dma_mapping_error(hcd->self.controller, usb_hcd_map_urb_for_dma() 1562 hcd->self.controller, usb_hcd_map_urb_for_dma() 1566 if (dma_mapping_error(hcd->self.controller, usb_hcd_map_urb_for_dma() 1572 } else if (hcd->driver->flags & HCD_LOCAL_MEM) { usb_hcd_map_urb_for_dma() 1584 usb_hcd_unmap_urb_for_dma(hcd, urb); usb_hcd_map_urb_for_dma() 1600 struct usb_hcd *hcd = bus_to_hcd(urb->dev->bus); usb_hcd_submit_urb() local 1609 usbmon_urb_submit(&hcd->self, urb); usb_hcd_submit_urb() 1620 status = rh_urb_enqueue(hcd, urb); usb_hcd_submit_urb() 1622 status = map_urb_for_dma(hcd, urb, mem_flags); usb_hcd_submit_urb() 1624 status = hcd->driver->urb_enqueue(hcd, urb, mem_flags); usb_hcd_submit_urb() 1626 unmap_urb_for_dma(hcd, urb); usb_hcd_submit_urb() 1631 usbmon_urb_submit_error(&hcd->self, urb, status); usb_hcd_submit_urb() 1645 /* this makes the hcd giveback() the urb more quickly, by kicking it 1650 static int unlink1(struct usb_hcd *hcd, struct urb *urb, int status) unlink1() argument 1655 value = usb_rh_urb_dequeue(hcd, urb, status); unlink1() 1661 value = hcd->driver->urb_dequeue(hcd, urb, status); unlink1() 1674 struct usb_hcd *hcd; usb_hcd_unlink_urb() local 1691 hcd = bus_to_hcd(urb->dev->bus); usb_hcd_unlink_urb() 1692 retval = unlink1(hcd, urb, status); usb_hcd_unlink_urb() 1707 struct usb_hcd *hcd = bus_to_hcd(urb->dev->bus); __usb_hcd_giveback_urb() local 1718 unmap_urb_for_dma(hcd, urb); __usb_hcd_giveback_urb() 1719 usbmon_urb_complete(&hcd->self, urb, status); __usb_hcd_giveback_urb() 1780 * @hcd: host controller returning the URB 1795 void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, int status) usb_hcd_giveback_urb() argument 1804 if (!hcd_giveback_urb_in_bh(hcd) && !is_root_hub(urb->dev)) { usb_hcd_giveback_urb() 1810 bh = &hcd->high_prio_bh; usb_hcd_giveback_urb() 1813 bh = &hcd->low_prio_bh; usb_hcd_giveback_urb() 1840 struct usb_hcd *hcd; usb_hcd_flush_endpoint() local 1846 hcd = bus_to_hcd(udev->bus); usb_hcd_flush_endpoint() 1860 /* kick hcd */ usb_hcd_flush_endpoint() 1861 unlink1(hcd, urb, -ESHUTDOWN); usb_hcd_flush_endpoint() 1862 dev_dbg (hcd->self.controller, usb_hcd_flush_endpoint() 1937 struct usb_hcd *hcd; usb_hcd_alloc_bandwidth() local 1940 hcd = bus_to_hcd(udev->bus); usb_hcd_alloc_bandwidth() 1941 if (!hcd->driver->check_bandwidth) usb_hcd_alloc_bandwidth() 1949 hcd->driver->drop_endpoint(hcd, udev, ep); usb_hcd_alloc_bandwidth() 1952 hcd->driver->drop_endpoint(hcd, udev, ep); usb_hcd_alloc_bandwidth() 1954 hcd->driver->check_bandwidth(hcd, udev); usb_hcd_alloc_bandwidth() 1970 ret = hcd->driver->drop_endpoint(hcd, udev, ep); usb_hcd_alloc_bandwidth() 1976 ret = hcd->driver->drop_endpoint(hcd, udev, ep); usb_hcd_alloc_bandwidth() 1994 ret = hcd->driver->add_endpoint(hcd, udev, &alt->endpoint[j]); usb_hcd_alloc_bandwidth() 2023 ret = hcd->driver->drop_endpoint(hcd, udev, usb_hcd_alloc_bandwidth() 2030 ret = hcd->driver->add_endpoint(hcd, udev, usb_hcd_alloc_bandwidth() 2036 ret = hcd->driver->check_bandwidth(hcd, udev); usb_hcd_alloc_bandwidth() 2039 hcd->driver->reset_bandwidth(hcd, udev); usb_hcd_alloc_bandwidth() 2043 /* Disables the endpoint: synchronizes with the hcd to make sure all 2054 struct usb_hcd *hcd; usb_hcd_disable_endpoint() local 2057 hcd = bus_to_hcd(udev->bus); usb_hcd_disable_endpoint() 2058 if (hcd->driver->endpoint_disable) usb_hcd_disable_endpoint() 2059 hcd->driver->endpoint_disable(hcd, ep); usb_hcd_disable_endpoint() 2073 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_hcd_reset_endpoint() local 2075 if (hcd->driver->endpoint_reset) usb_hcd_reset_endpoint() 2076 hcd->driver->endpoint_reset(hcd, ep); usb_hcd_reset_endpoint() 2094 * @mem_flags: flags hcd should use to allocate memory. 2107 struct usb_hcd *hcd; usb_alloc_streams() local 2112 hcd = bus_to_hcd(dev->bus); usb_alloc_streams() 2113 if (!hcd->driver->alloc_streams || !hcd->driver->free_streams) usb_alloc_streams() 2129 ret = hcd->driver->alloc_streams(hcd, dev, eps, num_eps, usb_alloc_streams() 2146 * @mem_flags: flags hcd should use to allocate memory. 2157 struct usb_hcd *hcd; usb_free_streams() local 2162 hcd = bus_to_hcd(dev->bus); usb_free_streams() 2171 ret = hcd->driver->free_streams(hcd, dev, eps, num_eps, mem_flags); usb_free_streams() 2198 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_hcd_get_frame_number() local 2200 if (!HCD_RH_RUNNING(hcd)) usb_hcd_get_frame_number() 2202 return hcd->driver->get_frame_number (hcd); usb_hcd_get_frame_number() 2211 struct usb_hcd *hcd = container_of(rhdev->bus, struct usb_hcd, self); hcd_bus_suspend() local 2213 int old_state = hcd->state; hcd_bus_suspend() 2218 if (HCD_DEAD(hcd)) { hcd_bus_suspend() 2223 if (!hcd->driver->bus_suspend) { hcd_bus_suspend() 2226 clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags); hcd_bus_suspend() 2227 hcd->state = HC_STATE_QUIESCING; hcd_bus_suspend() 2228 status = hcd->driver->bus_suspend(hcd); hcd_bus_suspend() 2232 hcd->state = HC_STATE_SUSPENDED; hcd_bus_suspend() 2238 status = hcd->driver->hub_status_data(hcd, buffer); hcd_bus_suspend() 2247 if (!HCD_DEAD(hcd)) { hcd_bus_suspend() 2248 set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags); hcd_bus_suspend() 2249 hcd->state = old_state; hcd_bus_suspend() 2260 struct usb_hcd *hcd = container_of(rhdev->bus, struct usb_hcd, self); hcd_bus_resume() local 2262 int old_state = hcd->state; hcd_bus_resume() 2266 if (HCD_DEAD(hcd)) { hcd_bus_resume() 2270 if (!hcd->driver->bus_resume) hcd_bus_resume() 2272 if (HCD_RH_RUNNING(hcd)) hcd_bus_resume() 2275 hcd->state = HC_STATE_RESUMING; hcd_bus_resume() 2276 status = hcd->driver->bus_resume(hcd); hcd_bus_resume() 2277 clear_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags); hcd_bus_resume() 2283 if (!HCD_DEAD(hcd)) { hcd_bus_resume() 2287 set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags); hcd_bus_resume() 2288 hcd->state = HC_STATE_RUNNING; hcd_bus_resume() 2306 hcd->state = old_state; 2310 usb_hc_died(hcd); 2318 struct usb_hcd *hcd = container_of(work, struct usb_hcd, wakeup_work); hcd_resume_work() local 2319 struct usb_device *udev = hcd->self.root_hub; hcd_resume_work() 2326 * @hcd: host controller for this root hub 2333 void usb_hcd_resume_root_hub (struct usb_hcd *hcd) usb_hcd_resume_root_hub() argument 2338 if (hcd->rh_registered) { usb_hcd_resume_root_hub() 2339 set_bit(HCD_FLAG_WAKEUP_PENDING, &hcd->flags); usb_hcd_resume_root_hub() 2340 queue_work(pm_wq, &hcd->wakeup_work); usb_hcd_resume_root_hub() 2354 * @bus: the bus (must use hcd framework) 2367 struct usb_hcd *hcd; usb_bus_start_enum() local 2374 hcd = container_of (bus, struct usb_hcd, self); usb_bus_start_enum() 2375 if (port_num && hcd->driver->start_port_reset) usb_bus_start_enum() 2376 status = hcd->driver->start_port_reset(hcd, port_num); usb_bus_start_enum() 2382 mod_timer(&hcd->rh_timer, jiffies + msecs_to_jiffies(10)); usb_bus_start_enum() 2403 struct usb_hcd *hcd = __hcd; usb_hcd_irq() local 2406 if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd))) usb_hcd_irq() 2408 else if (hcd->driver->irq(hcd) == IRQ_NONE) usb_hcd_irq() 2421 * @hcd: pointer to the HCD representing the controller 2429 void usb_hc_died (struct usb_hcd *hcd) usb_hc_died() argument 2433 dev_err (hcd->self.controller, "HC died; cleaning up\n"); usb_hc_died() 2436 clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags); usb_hc_died() 2437 set_bit(HCD_FLAG_DEAD, &hcd->flags); usb_hc_died() 2438 if (hcd->rh_registered) { usb_hc_died() 2439 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); usb_hc_died() 2442 usb_set_device_state (hcd->self.root_hub, usb_hc_died() 2444 usb_kick_hub_wq(hcd->self.root_hub); usb_hc_died() 2446 if (usb_hcd_is_primary_hcd(hcd) && hcd->shared_hcd) { usb_hc_died() 2447 hcd = hcd->shared_hcd; usb_hc_died() 2448 if (hcd->rh_registered) { usb_hc_died() 2449 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); usb_hc_died() 2452 usb_set_device_state(hcd->self.root_hub, usb_hc_died() 2454 usb_kick_hub_wq(hcd->self.root_hub); usb_hc_died() 2474 * @driver: HC driver that will use this hcd 2475 * @dev: device for this HC, stored in hcd->self.controller 2476 * @bus_name: value to store in hcd->self.bus_name 2483 * hcd structure. 2492 struct usb_hcd *hcd; usb_create_shared_hcd() local 2494 hcd = kzalloc(sizeof(*hcd) + driver->hcd_priv_size, GFP_KERNEL); usb_create_shared_hcd() 2495 if (!hcd) { usb_create_shared_hcd() 2496 dev_dbg (dev, "hcd alloc failed\n"); usb_create_shared_hcd() 2500 hcd->bandwidth_mutex = kmalloc(sizeof(*hcd->bandwidth_mutex), usb_create_shared_hcd() 2502 if (!hcd->bandwidth_mutex) { usb_create_shared_hcd() 2503 kfree(hcd); usb_create_shared_hcd() 2504 dev_dbg(dev, "hcd bandwidth mutex alloc failed\n"); usb_create_shared_hcd() 2507 mutex_init(hcd->bandwidth_mutex); usb_create_shared_hcd() 2508 dev_set_drvdata(dev, hcd); usb_create_shared_hcd() 2511 hcd->bandwidth_mutex = primary_hcd->bandwidth_mutex; usb_create_shared_hcd() 2512 hcd->primary_hcd = primary_hcd; usb_create_shared_hcd() 2514 hcd->shared_hcd = primary_hcd; usb_create_shared_hcd() 2515 primary_hcd->shared_hcd = hcd; usb_create_shared_hcd() 2519 kref_init(&hcd->kref); usb_create_shared_hcd() 2521 usb_bus_init(&hcd->self); usb_create_shared_hcd() 2522 hcd->self.controller = dev; usb_create_shared_hcd() 2523 hcd->self.bus_name = bus_name; usb_create_shared_hcd() 2524 hcd->self.uses_dma = (dev->dma_mask != NULL); usb_create_shared_hcd() 2526 init_timer(&hcd->rh_timer); usb_create_shared_hcd() 2527 hcd->rh_timer.function = rh_timer_func; usb_create_shared_hcd() 2528 hcd->rh_timer.data = (unsigned long) hcd; usb_create_shared_hcd() 2530 INIT_WORK(&hcd->wakeup_work, hcd_resume_work); usb_create_shared_hcd() 2533 hcd->driver = driver; usb_create_shared_hcd() 2534 hcd->speed = driver->flags & HCD_MASK; usb_create_shared_hcd() 2535 hcd->product_desc = (driver->product_desc) ? driver->product_desc : usb_create_shared_hcd() 2537 return hcd; usb_create_shared_hcd() 2543 * @driver: HC driver that will use this hcd 2544 * @dev: device for this HC, stored in hcd->self.controller 2545 * @bus_name: value to store in hcd->self.bus_name 2550 * hcd structure. 2568 * freed. When hcd_release() is called for either hcd in a peer set 2574 struct usb_hcd *hcd = container_of (kref, struct usb_hcd, kref); hcd_release() local 2577 if (usb_hcd_is_primary_hcd(hcd)) hcd_release() 2578 kfree(hcd->bandwidth_mutex); hcd_release() 2579 if (hcd->shared_hcd) { hcd_release() 2580 struct usb_hcd *peer = hcd->shared_hcd; hcd_release() 2583 if (peer->primary_hcd == hcd) hcd_release() 2587 kfree(hcd); hcd_release() 2590 struct usb_hcd *usb_get_hcd (struct usb_hcd *hcd) usb_get_hcd() argument 2592 if (hcd) usb_get_hcd() 2593 kref_get (&hcd->kref); usb_get_hcd() 2594 return hcd; usb_get_hcd() 2598 void usb_put_hcd (struct usb_hcd *hcd) usb_put_hcd() argument 2600 if (hcd) usb_put_hcd() 2601 kref_put (&hcd->kref, hcd_release); usb_put_hcd() 2605 int usb_hcd_is_primary_hcd(struct usb_hcd *hcd) usb_hcd_is_primary_hcd() argument 2607 if (!hcd->primary_hcd) usb_hcd_is_primary_hcd() 2609 return hcd == hcd->primary_hcd; usb_hcd_is_primary_hcd() 2613 int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1) usb_hcd_find_raw_port_number() argument 2615 if (!hcd->driver->find_raw_port_number) usb_hcd_find_raw_port_number() 2618 return hcd->driver->find_raw_port_number(hcd, port1); usb_hcd_find_raw_port_number() 2621 static int usb_hcd_request_irqs(struct usb_hcd *hcd, usb_hcd_request_irqs() argument 2626 if (hcd->driver->irq) { usb_hcd_request_irqs() 2628 snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d", usb_hcd_request_irqs() 2629 hcd->driver->description, hcd->self.busnum); usb_hcd_request_irqs() 2631 hcd->irq_descr, hcd); usb_hcd_request_irqs() 2633 dev_err(hcd->self.controller, usb_hcd_request_irqs() 2638 hcd->irq = irqnum; usb_hcd_request_irqs() 2639 dev_info(hcd->self.controller, "irq %d, %s 0x%08llx\n", irqnum, usb_hcd_request_irqs() 2640 (hcd->driver->flags & HCD_MEMORY) ? usb_hcd_request_irqs() 2642 (unsigned long long)hcd->rsrc_start); usb_hcd_request_irqs() 2644 hcd->irq = 0; usb_hcd_request_irqs() 2645 if (hcd->rsrc_start) usb_hcd_request_irqs() 2646 dev_info(hcd->self.controller, "%s 0x%08llx\n", usb_hcd_request_irqs() 2647 (hcd->driver->flags & HCD_MEMORY) ? usb_hcd_request_irqs() 2649 (unsigned long long)hcd->rsrc_start); usb_hcd_request_irqs() 2658 static void usb_put_invalidate_rhdev(struct usb_hcd *hcd) usb_put_invalidate_rhdev() argument 2663 rhdev = hcd->self.root_hub; usb_put_invalidate_rhdev() 2664 hcd->self.root_hub = NULL; usb_put_invalidate_rhdev() 2671 * @hcd: the usb_hcd structure to initialize 2679 int usb_add_hcd(struct usb_hcd *hcd, usb_add_hcd() argument 2685 if (IS_ENABLED(CONFIG_USB_PHY) && !hcd->usb_phy) { usb_add_hcd() 2686 struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller, 0); usb_add_hcd() 2698 hcd->usb_phy = phy; usb_add_hcd() 2699 hcd->remove_phy = 1; usb_add_hcd() 2703 if (IS_ENABLED(CONFIG_GENERIC_PHY) && !hcd->phy) { usb_add_hcd() 2704 struct phy *phy = phy_get(hcd->self.controller, "usb"); usb_add_hcd() 2722 hcd->phy = phy; usb_add_hcd() 2723 hcd->remove_phy = 1; usb_add_hcd() 2727 dev_info(hcd->self.controller, "%s\n", hcd->product_desc); usb_add_hcd() 2731 if (hcd->wireless) usb_add_hcd() 2732 clear_bit(HCD_FLAG_DEV_AUTHORIZED, &hcd->flags); usb_add_hcd() 2734 set_bit(HCD_FLAG_DEV_AUTHORIZED, &hcd->flags); usb_add_hcd() 2737 set_bit(HCD_FLAG_DEV_AUTHORIZED, &hcd->flags); usb_add_hcd() 2739 clear_bit(HCD_FLAG_DEV_AUTHORIZED, &hcd->flags); usb_add_hcd() 2741 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); usb_add_hcd() 2744 set_bit(HCD_FLAG_INTF_AUTHORIZED, &hcd->flags); usb_add_hcd() 2750 retval = hcd_buffer_create(hcd); usb_add_hcd() 2752 dev_dbg(hcd->self.controller, "pool alloc failed\n"); usb_add_hcd() 2756 retval = usb_register_bus(&hcd->self); usb_add_hcd() 2760 rhdev = usb_alloc_dev(NULL, &hcd->self, 0); usb_add_hcd() 2762 dev_err(hcd->self.controller, "unable to allocate root hub\n"); usb_add_hcd() 2767 hcd->self.root_hub = rhdev; usb_add_hcd() 2770 switch (hcd->speed) { usb_add_hcd() 2799 set_bit(HCD_FLAG_RH_RUNNING, &hcd->flags); usb_add_hcd() 2804 if (hcd->driver->reset) { usb_add_hcd() 2805 retval = hcd->driver->reset(hcd); usb_add_hcd() 2807 dev_err(hcd->self.controller, "can't setup: %d\n", usb_add_hcd() 2812 hcd->rh_pollable = 1; usb_add_hcd() 2815 if (device_can_wakeup(hcd->self.controller) usb_add_hcd() 2816 && device_can_wakeup(&hcd->self.root_hub->dev)) usb_add_hcd() 2817 dev_dbg(hcd->self.controller, "supports USB remote wakeup\n"); usb_add_hcd() 2820 init_giveback_urb_bh(&hcd->high_prio_bh); usb_add_hcd() 2821 init_giveback_urb_bh(&hcd->low_prio_bh); usb_add_hcd() 2826 if (usb_hcd_is_primary_hcd(hcd) && irqnum) { usb_add_hcd() 2827 retval = usb_hcd_request_irqs(hcd, irqnum, irqflags); usb_add_hcd() 2832 hcd->state = HC_STATE_RUNNING; usb_add_hcd() 2833 retval = hcd->driver->start(hcd); usb_add_hcd() 2835 dev_err(hcd->self.controller, "startup error %d\n", retval); usb_add_hcd() 2840 retval = register_root_hub(hcd); usb_add_hcd() 2850 if (hcd->uses_new_polling && HCD_POLL_RH(hcd)) usb_add_hcd() 2851 usb_hcd_poll_rh_status(hcd); usb_add_hcd() 2856 clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags); usb_add_hcd() 2857 if (HC_IS_RUNNING(hcd->state)) usb_add_hcd() 2858 hcd->state = HC_STATE_QUIESCING; usb_add_hcd() 2860 hcd->rh_registered = 0; usb_add_hcd() 2864 cancel_work_sync(&hcd->wakeup_work); usb_add_hcd() 2870 hcd->rh_pollable = 0; usb_add_hcd() 2871 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); usb_add_hcd() 2872 del_timer_sync(&hcd->rh_timer); usb_add_hcd() 2873 hcd->driver->stop(hcd); usb_add_hcd() 2874 hcd->state = HC_STATE_HALT; usb_add_hcd() 2875 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); usb_add_hcd() 2876 del_timer_sync(&hcd->rh_timer); usb_add_hcd() 2878 if (usb_hcd_is_primary_hcd(hcd) && hcd->irq > 0) usb_add_hcd() 2879 free_irq(irqnum, hcd); usb_add_hcd() 2883 usb_put_invalidate_rhdev(hcd); usb_add_hcd() 2885 usb_deregister_bus(&hcd->self); usb_add_hcd() 2887 hcd_buffer_destroy(hcd); usb_add_hcd() 2889 if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) { usb_add_hcd() 2890 phy_power_off(hcd->phy); usb_add_hcd() 2891 phy_exit(hcd->phy); usb_add_hcd() 2892 phy_put(hcd->phy); usb_add_hcd() 2893 hcd->phy = NULL; usb_add_hcd() 2896 if (hcd->remove_phy && hcd->usb_phy) { usb_add_hcd() 2897 usb_phy_shutdown(hcd->usb_phy); usb_add_hcd() 2898 usb_put_phy(hcd->usb_phy); usb_add_hcd() 2899 hcd->usb_phy = NULL; usb_add_hcd() 2907 * @hcd: the usb_hcd structure to remove 2913 void usb_remove_hcd(struct usb_hcd *hcd) usb_remove_hcd() argument 2915 struct usb_device *rhdev = hcd->self.root_hub; usb_remove_hcd() 2917 dev_info(hcd->self.controller, "remove, state %x\n", hcd->state); usb_remove_hcd() 2922 clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags); usb_remove_hcd() 2923 if (HC_IS_RUNNING (hcd->state)) usb_remove_hcd() 2924 hcd->state = HC_STATE_QUIESCING; usb_remove_hcd() 2926 dev_dbg(hcd->self.controller, "roothub graceful disconnect\n"); usb_remove_hcd() 2928 hcd->rh_registered = 0; usb_remove_hcd() 2932 cancel_work_sync(&hcd->wakeup_work); usb_remove_hcd() 2954 hcd->rh_pollable = 0; usb_remove_hcd() 2955 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); usb_remove_hcd() 2956 del_timer_sync(&hcd->rh_timer); usb_remove_hcd() 2958 hcd->driver->stop(hcd); usb_remove_hcd() 2959 hcd->state = HC_STATE_HALT; usb_remove_hcd() 2962 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); usb_remove_hcd() 2963 del_timer_sync(&hcd->rh_timer); usb_remove_hcd() 2965 if (usb_hcd_is_primary_hcd(hcd)) { usb_remove_hcd() 2966 if (hcd->irq > 0) usb_remove_hcd() 2967 free_irq(hcd->irq, hcd); usb_remove_hcd() 2970 usb_deregister_bus(&hcd->self); usb_remove_hcd() 2971 hcd_buffer_destroy(hcd); usb_remove_hcd() 2973 if (IS_ENABLED(CONFIG_GENERIC_PHY) && hcd->remove_phy && hcd->phy) { usb_remove_hcd() 2974 phy_power_off(hcd->phy); usb_remove_hcd() 2975 phy_exit(hcd->phy); usb_remove_hcd() 2976 phy_put(hcd->phy); usb_remove_hcd() 2977 hcd->phy = NULL; usb_remove_hcd() 2979 if (hcd->remove_phy && hcd->usb_phy) { usb_remove_hcd() 2980 usb_phy_shutdown(hcd->usb_phy); usb_remove_hcd() 2981 usb_put_phy(hcd->usb_phy); usb_remove_hcd() 2982 hcd->usb_phy = NULL; usb_remove_hcd() 2985 usb_put_invalidate_rhdev(hcd); usb_remove_hcd() 2992 struct usb_hcd *hcd = platform_get_drvdata(dev); usb_hcd_platform_shutdown() local 2994 if (hcd->driver->shutdown) usb_hcd_platform_shutdown() 2995 hcd->driver->shutdown(hcd); usb_hcd_platform_shutdown()
|
H A D | hcd-pci.c | 23 #include <linux/usb/hcd.h> 56 typedef void (*companion_fn)(struct pci_dev *pdev, struct usb_hcd *hcd, 60 static void for_each_companion(struct pci_dev *pdev, struct usb_hcd *hcd, for_each_companion() argument 89 fn(pdev, hcd, companion, companion_hcd); for_each_pci_dev() 99 static void ehci_pre_add(struct pci_dev *pdev, struct usb_hcd *hcd, ehci_pre_add() argument 116 static void ehci_post_add(struct pci_dev *pdev, struct usb_hcd *hcd, ehci_post_add() argument 125 companion_hcd->self.hs_companion = &hcd->self; ehci_post_add() 137 static void non_ehci_add(struct pci_dev *pdev, struct usb_hcd *hcd, non_ehci_add() argument 143 hcd->self.hs_companion = &companion_hcd->self; non_ehci_add() 148 static void ehci_remove(struct pci_dev *pdev, struct usb_hcd *hcd, ehci_remove() argument 158 static void ehci_wait_for_companions(struct pci_dev *pdev, struct usb_hcd *hcd, ehci_wait_for_companions() argument 189 struct usb_hcd *hcd; usb_hcd_pci_probe() local 207 * make sure irq setup is not touched for xhci in generic hcd code usb_hcd_pci_probe() 220 hcd = usb_create_hcd(driver, &dev->dev, pci_name(dev)); usb_hcd_pci_probe() 221 if (!hcd) { usb_hcd_pci_probe() 226 hcd->amd_resume_bug = (usb_hcd_amd_remote_wakeup_quirk(dev) && usb_hcd_pci_probe() 231 hcd->rsrc_start = pci_resource_start(dev, 0); usb_hcd_pci_probe() 232 hcd->rsrc_len = pci_resource_len(dev, 0); usb_hcd_pci_probe() 233 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, usb_hcd_pci_probe() 239 hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_pci_probe() 240 if (hcd->regs == NULL) { usb_hcd_pci_probe() 255 hcd->rsrc_start = pci_resource_start(dev, region); usb_hcd_pci_probe() 256 hcd->rsrc_len = pci_resource_len(dev, region); usb_hcd_pci_probe() 257 if (request_region(hcd->rsrc_start, hcd->rsrc_len, usb_hcd_pci_probe() 273 dev_set_drvdata(&dev->dev, hcd); usb_hcd_pci_probe() 274 for_each_companion(dev, hcd, ehci_pre_add); usb_hcd_pci_probe() 275 retval = usb_add_hcd(hcd, hcd_irq, IRQF_SHARED); usb_hcd_pci_probe() 278 for_each_companion(dev, hcd, ehci_post_add); usb_hcd_pci_probe() 282 dev_set_drvdata(&dev->dev, hcd); usb_hcd_pci_probe() 283 retval = usb_add_hcd(hcd, hcd_irq, IRQF_SHARED); usb_hcd_pci_probe() 287 for_each_companion(dev, hcd, non_ehci_add); usb_hcd_pci_probe() 293 device_wakeup_enable(hcd->self.controller); usb_hcd_pci_probe() 301 iounmap(hcd->regs); usb_hcd_pci_probe() 303 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_pci_probe() 305 release_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_pci_probe() 307 usb_put_hcd(hcd); usb_hcd_pci_probe() 332 struct usb_hcd *hcd; usb_hcd_pci_remove() local 334 hcd = pci_get_drvdata(dev); usb_hcd_pci_remove() 335 if (!hcd) usb_hcd_pci_remove() 346 usb_hcd_irq(0, hcd); usb_hcd_pci_remove() 352 for_each_companion(dev, hcd, ehci_remove); usb_hcd_pci_remove() 353 usb_remove_hcd(hcd); usb_hcd_pci_remove() 359 hcd->self.hs_companion = NULL; usb_hcd_pci_remove() 360 usb_remove_hcd(hcd); usb_hcd_pci_remove() 365 if (hcd->driver->flags & HCD_MEMORY) { usb_hcd_pci_remove() 366 iounmap(hcd->regs); usb_hcd_pci_remove() 367 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_pci_remove() 369 release_region(hcd->rsrc_start, hcd->rsrc_len); usb_hcd_pci_remove() 372 usb_put_hcd(hcd); usb_hcd_pci_remove() 383 struct usb_hcd *hcd; usb_hcd_pci_shutdown() local 385 hcd = pci_get_drvdata(dev); usb_hcd_pci_shutdown() 386 if (!hcd) usb_hcd_pci_shutdown() 389 if (test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags) && usb_hcd_pci_shutdown() 390 hcd->driver->shutdown) { usb_hcd_pci_shutdown() 391 hcd->driver->shutdown(hcd); usb_hcd_pci_shutdown() 392 if (usb_hcd_is_primary_hcd(hcd) && hcd->irq > 0) usb_hcd_pci_shutdown() 393 free_irq(hcd->irq, hcd); usb_hcd_pci_shutdown() 425 struct usb_hcd *hcd = pci_get_drvdata(pci_dev); check_root_hub_suspended() local 427 if (HCD_RH_RUNNING(hcd)) { check_root_hub_suspended() 431 if (hcd->shared_hcd) { check_root_hub_suspended() 432 hcd = hcd->shared_hcd; check_root_hub_suspended() 433 if (HCD_RH_RUNNING(hcd)) { check_root_hub_suspended() 444 struct usb_hcd *hcd = pci_get_drvdata(pci_dev); suspend_common() local 456 if (hcd->driver->pci_suspend && !HCD_DEAD(hcd)) { suspend_common() 460 if (do_wakeup && HCD_WAKEUP_PENDING(hcd)) suspend_common() 462 if (do_wakeup && hcd->shared_hcd && suspend_common() 463 HCD_WAKEUP_PENDING(hcd->shared_hcd)) suspend_common() 465 retval = hcd->driver->pci_suspend(hcd, do_wakeup); suspend_common() 466 suspend_report_result(hcd->driver->pci_suspend, retval); suspend_common() 469 if ((retval == 0 && do_wakeup && HCD_WAKEUP_PENDING(hcd)) || suspend_common() 470 (retval == 0 && do_wakeup && hcd->shared_hcd && suspend_common() 471 HCD_WAKEUP_PENDING(hcd->shared_hcd))) { suspend_common() 472 if (hcd->driver->pci_resume) suspend_common() 473 hcd->driver->pci_resume(hcd, false); suspend_common() 484 if (!hcd->msix_enabled) suspend_common() 499 struct usb_hcd *hcd = pci_get_drvdata(pci_dev); resume_common() local 502 if (HCD_RH_RUNNING(hcd) || resume_common() 503 (hcd->shared_hcd && resume_common() 504 HCD_RH_RUNNING(hcd->shared_hcd))) { resume_common() 517 if (hcd->driver->pci_resume && !HCD_DEAD(hcd)) { resume_common() 525 for_each_companion(pci_dev, hcd, resume_common() 528 retval = hcd->driver->pci_resume(hcd, resume_common() 532 if (hcd->shared_hcd) resume_common() 533 usb_hc_died(hcd->shared_hcd); resume_common() 534 usb_hc_died(hcd); resume_common() 550 struct usb_hcd *hcd = pci_get_drvdata(pci_dev); hcd_pci_suspend_noirq() local 563 if (HCD_DEAD(hcd)) hcd_pci_suspend_noirq()
|
H A D | hub.c | 22 #include <linux/usb/hcd.h> 734 drv = clear->hcd->driver; hub_tt_work() 736 (drv->clear_tt_buffer_complete)(clear->hcd, clear->ep); hub_tt_work() 820 clear->hcd = bus_to_hcd(udev->bus); usb_hub_clear_tt_buffer() 1030 struct usb_hcd *hcd; hub_activate() local 1104 hcd = bus_to_hcd(hdev->bus); hub_activate() 1105 if (hcd->driver->update_hub_device) { hub_activate() 1106 ret = hcd->driver->update_hub_device(hcd, hdev, hub_activate() 1356 struct usb_hcd *hcd; hub_configure() local 1540 hcd = bus_to_hcd(hdev->bus); hub_configure() 1542 if (hcd->power_budget > 0) hub_configure() 1543 hdev->bus_mA = hcd->power_budget; hub_configure() 1595 * maxpktsize is defined in hcd.c's fake endpoint descriptors hub_configure() 1639 if (hcd->driver->update_hub_device) { hub_configure() 1640 ret = hcd->driver->update_hub_device(hcd, hdev, hub_configure() 2107 struct usb_hcd *hcd = bus_to_hcd(udev->bus); hub_free_dev() local 2110 if (hcd->driver->free_dev && udev->parent) hub_free_dev() 2111 hcd->driver->free_dev(hcd, udev); hub_free_dev() 2161 /* deallocate hcd/hardware state ... nuking all pending urbs and usb_disconnect() 2329 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_enumerate_device() local 2351 if (IS_ENABLED(CONFIG_USB_OTG_WHITELIST) && hcd->tpl_support && usb_enumerate_device() 2619 struct usb_hcd *hcd; hub_is_wusb() local 2622 hcd = container_of(hub->hdev->bus, struct usb_hcd, self); hub_is_wusb() 2623 return hcd->wireless; hub_is_wusb() 2842 struct usb_hcd *hcd = bus_to_hcd(udev->bus); hub_port_reset() local 2848 if (hcd->driver->reset_device) hub_port_reset() 2849 hcd->driver->reset_device(hcd, udev); hub_port_reset() 2973 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_disable_ltm() local 2976 if (!usb_device_supports_ltm(hcd->self.root_hub) || usb_disable_ltm() 2995 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_enable_ltm() local 2998 if (!usb_device_supports_ltm(hcd->self.root_hub) || usb_enable_ltm() 3854 static void usb_enable_link_state(struct usb_hcd *hcd, struct usb_device *udev, usb_enable_link_state() argument 3885 timeout = hcd->driver->enable_usb3_lpm_timeout(hcd, udev, state); usb_enable_link_state() 3903 hcd->driver->disable_usb3_lpm_timeout(hcd, udev, state); usb_enable_link_state() 3939 static int usb_disable_link_state(struct usb_hcd *hcd, struct usb_device *udev, usb_disable_link_state() argument 3957 if (hcd->driver->disable_usb3_lpm_timeout(hcd, udev, state)) usb_disable_link_state() 3985 struct usb_hcd *hcd; usb_disable_lpm() local 3993 hcd = bus_to_hcd(udev->bus); usb_disable_lpm() 3994 if (!hcd || !hcd->driver->disable_usb3_lpm_timeout) usb_disable_lpm() 4002 if (usb_disable_link_state(hcd, udev, USB3_LPM_U1)) usb_disable_lpm() 4004 if (usb_disable_link_state(hcd, udev, USB3_LPM_U2)) usb_disable_lpm() 4018 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_unlocked_disable_lpm() local 4021 if (!hcd) usb_unlocked_disable_lpm() 4024 mutex_lock(hcd->bandwidth_mutex); usb_unlocked_disable_lpm() 4026 mutex_unlock(hcd->bandwidth_mutex); usb_unlocked_disable_lpm() 4042 struct usb_hcd *hcd; usb_enable_lpm() local 4051 hcd = bus_to_hcd(udev->bus); usb_enable_lpm() 4055 if (!hcd || !hcd->driver->enable_usb3_lpm_timeout || usb_enable_lpm() 4056 !hcd->driver->disable_usb3_lpm_timeout) usb_enable_lpm() 4062 usb_enable_link_state(hcd, udev, USB3_LPM_U1); usb_enable_lpm() 4063 usb_enable_link_state(hcd, udev, USB3_LPM_U2); usb_enable_lpm() 4070 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_unlocked_enable_lpm() local 4072 if (!hcd) usb_unlocked_enable_lpm() 4075 mutex_lock(hcd->bandwidth_mutex); usb_unlocked_enable_lpm() 4077 mutex_unlock(hcd->bandwidth_mutex); usb_unlocked_enable_lpm() 4196 struct usb_hcd *hcd = bus_to_hcd(udev->bus); hub_set_address() local 4202 if (!hcd->driver->address_device && devnum <= 1) hub_set_address() 4208 if (hcd->driver->address_device) hub_set_address() 4209 retval = hcd->driver->address_device(hcd, udev); hub_set_address() 4252 struct usb_hcd *hcd = bus_to_hcd(udev->bus); hub_enable_device() local 4254 if (!hcd->driver->enable_device) hub_enable_device() 4261 return hcd->driver->enable_device(hcd, udev); hub_enable_device() 4279 struct usb_hcd *hcd = bus_to_hcd(hdev->bus); hub_port_init() local 4574 if (hcd->driver->update_device) hub_port_init() 4575 hcd->driver->update_device(hcd, udev); hub_port_init() 4667 struct usb_hcd *hcd = bus_to_hcd(hdev->bus); hub_port_connect() local 4674 if (hcd->usb_phy && !hdev->parent) hub_port_connect() 4675 usb_phy_notify_disconnect(hcd->usb_phy, udev->speed); hub_port_connect() 4833 if (hcd->usb_phy && !hdev->parent) hub_port_connect() 4834 usb_phy_notify_connect(hcd->usb_phy, hub_port_connect() 4859 !hcd->driver->port_handed_over || hub_port_connect() 4860 !(hcd->driver->port_handed_over)(hcd, port1)) { hub_port_connect() 4868 if (hcd->driver->relinquish_port && !hub->hdev->parent) hub_port_connect() 4869 hcd->driver->relinquish_port(hcd, port1); hub_port_connect() 5353 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_reset_and_verify_device() local 5421 mutex_lock(hcd->bandwidth_mutex); usb_reset_and_verify_device() 5427 mutex_unlock(hcd->bandwidth_mutex); usb_reset_and_verify_device() 5438 mutex_unlock(hcd->bandwidth_mutex); usb_reset_and_verify_device() 5441 mutex_unlock(hcd->bandwidth_mutex); usb_reset_and_verify_device() 5539 /* this requires hcd-specific logic; see ohci_restart() */ usb_reset_device()
|
H A D | quirks.c | 16 #include <linux/usb/hcd.h> 265 struct usb_hcd *hcd; usb_amd_resume_quirk() local 267 hcd = bus_to_hcd(udev->bus); usb_amd_resume_quirk() 269 if (udev->level == 1 && hcd->amd_resume_bug == 1) usb_amd_resume_quirk()
|
H A D | port.c | 318 struct usb_hcd *hcd, *peer_hcd; match_location() local 326 hcd = bus_to_hcd(hdev->bus); match_location() 329 if (peer_hcd != hcd->shared_hcd) match_location() 345 * data, the peer hcd for root hubs, or the upstream peer relationship 366 struct usb_hcd *hcd = bus_to_hcd(hdev->bus); find_and_link_peer() local 367 struct usb_hcd *peer_hcd = hcd->shared_hcd; find_and_link_peer()
|
H A D | usb-acpi.c | 18 #include <linux/usb/hcd.h> 173 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_acpi_find_companion() local 176 raw = usb_hcd_find_raw_port_number(hcd, port1); usb_acpi_find_companion()
|
H A D | message.c | 16 #include <linux/usb/hcd.h> /* for usbcore internals */ 1060 * If @reset_hardware is set then also deallocates hcd/hardware state 1141 * Deallocates hcd/hardware state for the endpoints (nuking all or most 1148 struct usb_hcd *hcd = bus_to_hcd(dev->bus); usb_disable_device() local 1195 if (hcd->driver->check_bandwidth) { usb_disable_device() 1202 mutex_lock(hcd->bandwidth_mutex); usb_disable_device() 1204 mutex_unlock(hcd->bandwidth_mutex); usb_disable_device() 1293 struct usb_hcd *hcd = bus_to_hcd(dev->bus); usb_set_interface() local 1320 mutex_lock(hcd->bandwidth_mutex); usb_set_interface() 1326 mutex_unlock(hcd->bandwidth_mutex); usb_set_interface() 1338 mutex_unlock(hcd->bandwidth_mutex); usb_set_interface() 1361 mutex_unlock(hcd->bandwidth_mutex); usb_set_interface() 1364 mutex_unlock(hcd->bandwidth_mutex); usb_set_interface() 1369 * should hcd+usbcore postprocess control requests? usb_set_interface() 1447 struct usb_hcd *hcd = bus_to_hcd(dev->bus); usb_reset_configuration() local 1464 mutex_lock(hcd->bandwidth_mutex); usb_reset_configuration() 1470 mutex_unlock(hcd->bandwidth_mutex); usb_reset_configuration() 1502 mutex_unlock(hcd->bandwidth_mutex); usb_reset_configuration() 1511 mutex_unlock(hcd->bandwidth_mutex); usb_reset_configuration() 1513 /* re-init hc/hcd interface/endpoint state */ usb_reset_configuration() 1734 struct usb_hcd *hcd = bus_to_hcd(dev->bus); usb_set_configuration() local 1813 mutex_lock(hcd->bandwidth_mutex); usb_set_configuration() 1820 mutex_unlock(hcd->bandwidth_mutex); usb_set_configuration() 1828 mutex_unlock(hcd->bandwidth_mutex); usb_set_configuration() 1835 * hc/hcd/usbcore interface/endpoint state. usb_set_configuration() 1846 intf->authorized = !!HCD_INTF_AUTHORIZED(hcd); usb_set_configuration() 1898 mutex_unlock(hcd->bandwidth_mutex); usb_set_configuration()
|
H A D | hub.h | 24 #include <linux/usb/hcd.h>
|
H A D | usb.c | 35 #include <linux/usb/hcd.h> 279 struct usb_hcd *hcd; usb_release_dev() local 282 hcd = bus_to_hcd(udev->bus); usb_release_dev() 286 usb_put_hcd(hcd); usb_release_dev() 399 struct usb_hcd *hcd = container_of(bus, struct usb_hcd, self); usb_bus_is_wusb() local 400 return hcd->wireless; usb_bus_is_wusb()
|
H A D | generic.c | 21 #include <linux/usb/hcd.h>
|
H A D | driver.c | 30 #include <linux/usb/hcd.h> 1872 struct usb_hcd *hcd = bus_to_hcd(udev->bus); usb_set_usb2_hardware_lpm() local 1878 if (hcd->driver->set_usb2_hw_lpm) { usb_set_usb2_hardware_lpm() 1879 ret = hcd->driver->set_usb2_hw_lpm(hcd, udev, enable); usb_set_usb2_hardware_lpm()
|
H A D | config.c | 3 #include <linux/usb/hcd.h>
|
H A D | devices.c | 58 #include <linux/usb/hcd.h>
|
H A D | urb.c | 8 #include <linux/usb/hcd.h> 856 * usb_wait_anchor_empty_timeout waiters. This is used in the hcd urb give-
|
/linux-4.4.14/drivers/usb/c67x00/ |
H A D | Makefile | 7 c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o
|
H A D | c67x00-hcd.c | 2 * c67x00-hcd.c: Cypress C67X00 USB Host Controller Driver 29 #include "c67x00-hcd.h" 61 static int c67x00_hub_status_data(struct usb_hcd *hcd, char *buf) c67x00_hub_status_data() argument 63 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); c67x00_hub_status_data() 80 static int c67x00_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, c67x00_hub_control() argument 83 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); c67x00_hub_control() 253 struct usb_hcd *hcd = c67x00_hcd_to_hcd(c67x00); c67x00_hcd_irq() local 264 if (unlikely(hcd->state == HC_STATE_HALT)) c67x00_hcd_irq() 267 if (!HCD_HW_ACCESSIBLE(hcd)) c67x00_hcd_irq() 280 static int c67x00_hcd_start(struct usb_hcd *hcd) c67x00_hcd_start() argument 282 hcd->uses_new_polling = 1; c67x00_hcd_start() 283 hcd->state = HC_STATE_RUNNING; c67x00_hcd_start() 284 set_bit(HCD_FLAG_POLL_RH, &hcd->flags); c67x00_hcd_start() 292 static void c67x00_hcd_stop(struct usb_hcd *hcd) c67x00_hcd_stop() argument 297 static int c67x00_hcd_get_frame(struct usb_hcd *hcd) c67x00_hcd_get_frame() argument 299 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); c67x00_hcd_get_frame() 309 .description = "c67x00-hcd", 346 struct usb_hcd *hcd; c67x00_hcd_probe() local 353 hcd = usb_create_hcd(&c67x00_hc_driver, sie_dev(sie), "c67x00_sie"); c67x00_hcd_probe() 354 if (!hcd) { c67x00_hcd_probe() 358 c67x00 = hcd_to_c67x00_hcd(hcd); c67x00_hcd_probe() 380 retval = usb_add_hcd(hcd, 0, 0); c67x00_hcd_probe() 387 device_wakeup_enable(hcd->self.controller); c67x00_hcd_probe() 399 usb_put_hcd(hcd); c67x00_hcd_probe() 408 struct usb_hcd *hcd = c67x00_hcd_to_hcd(c67x00); c67x00_hcd_remove() local 411 usb_remove_hcd(hcd); c67x00_hcd_remove() 412 usb_put_hcd(hcd); c67x00_hcd_remove()
|
H A D | c67x00-hcd.h | 2 * c67x00-hcd.h: Cypress C67X00 USB HCD 31 #include <linux/usb/hcd.h> 101 static inline struct c67x00_hcd *hcd_to_c67x00_hcd(struct usb_hcd *hcd) hcd_to_c67x00_hcd() argument 103 return (struct c67x00_hcd *)(hcd->hcd_priv); hcd_to_c67x00_hcd() 121 int c67x00_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags); 122 int c67x00_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status); 123 void c67x00_endpoint_disable(struct usb_hcd *hcd,
|
H A D | c67x00-sched.c | 28 #include "c67x00-hcd.h" 319 void c67x00_endpoint_disable(struct usb_hcd *hcd, struct usb_host_endpoint *ep) c67x00_endpoint_disable() argument 321 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); c67x00_endpoint_disable() 356 int c67x00_urb_enqueue(struct usb_hcd *hcd, c67x00_urb_enqueue() argument 362 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); c67x00_urb_enqueue() 375 if (!HC_IS_RUNNING(hcd->state)) { c67x00_urb_enqueue() 380 ret = usb_hcd_link_urb_to_ep(hcd, urb); c67x00_urb_enqueue() 446 usb_hcd_unlink_urb_from_ep(hcd, urb); c67x00_urb_enqueue() 455 int c67x00_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) c67x00_urb_dequeue() argument 457 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); c67x00_urb_dequeue() 462 rc = usb_hcd_check_unlink_urb(hcd, urb, status); c67x00_urb_dequeue() 467 usb_hcd_unlink_urb_from_ep(hcd, urb); c67x00_urb_dequeue() 470 usb_hcd_giveback_urb(hcd, urb, status); c67x00_urb_dequeue()
|
H A D | c67x00-drv.c | 46 #include "c67x00-hcd.h"
|
H A D | c67x00.h | 50 /* USB status register - Notice it has different content in hcd/udc mode */
|
/linux-4.4.14/drivers/xen/ |
H A D | dbgp.c | 4 #include <linux/usb/hcd.h> 9 static int xen_dbgp_op(struct usb_hcd *hcd, int op) xen_dbgp_op() argument 12 const struct device *ctrlr = hcd_to_bus(hcd)->controller; xen_dbgp_op() 36 int xen_dbgp_reset_prep(struct usb_hcd *hcd) xen_dbgp_reset_prep() argument 38 return xen_dbgp_op(hcd, PHYSDEVOP_DBGP_RESET_PREPARE); xen_dbgp_reset_prep() 41 int xen_dbgp_external_startup(struct usb_hcd *hcd) xen_dbgp_external_startup() argument 43 return xen_dbgp_op(hcd, PHYSDEVOP_DBGP_RESET_DONE); xen_dbgp_external_startup()
|
/linux-4.4.14/drivers/usb/chipidea/ |
H A D | host.c | 25 #include <linux/usb/hcd.h> 36 static int (*orig_bus_suspend)(struct usb_hcd *hcd); 42 static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable) ehci_ci_portpower() argument 44 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ehci_ci_portpower() 46 struct device *dev = hcd->self.controller; ehci_ci_portpower() 80 static int ehci_ci_reset(struct usb_hcd *hcd) ehci_ci_reset() argument 82 struct device *dev = hcd->self.controller; ehci_ci_reset() 86 ret = ehci_setup(hcd); ehci_ci_reset() 103 return usb_hcd_irq(ci->irq, ci->hcd); host_irq() 108 struct usb_hcd *hcd; host_start() local 116 hcd = usb_create_hcd(&ci_ehci_hc_driver, ci->dev, dev_name(ci->dev)); host_start() 117 if (!hcd) host_start() 121 hcd->rsrc_start = ci->hw_bank.phys; host_start() 122 hcd->rsrc_len = ci->hw_bank.size; host_start() 123 hcd->regs = ci->hw_bank.abs; host_start() 124 hcd->has_tt = 1; host_start() 126 hcd->power_budget = ci->platdata->power_budget; host_start() 127 hcd->tpl_support = ci->platdata->tpl_support; host_start() 129 hcd->phy = ci->phy; host_start() 131 hcd->usb_phy = ci->usb_phy; host_start() 133 ehci = hcd_to_ehci(hcd); host_start() 156 ret = usb_add_hcd(hcd, 0, 0); host_start() 162 ci->hcd = hcd; host_start() 165 otg->host = &hcd->self; host_start() 166 hcd->self.otg_port = 1; host_start() 177 usb_put_hcd(hcd); host_start() 184 struct usb_hcd *hcd = ci->hcd; host_stop() local 186 if (hcd) { host_stop() 187 usb_remove_hcd(hcd); host_stop() 188 usb_put_hcd(hcd); host_stop() 198 if (ci->role == CI_ROLE_HOST && ci->hcd) ci_hdrc_host_destroy() 202 static int ci_ehci_bus_suspend(struct usb_hcd *hcd) ci_ehci_bus_suspend() argument 204 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ci_ehci_bus_suspend() 208 int ret = orig_bus_suspend(hcd); ci_ehci_bus_suspend()
|
H A D | ci_hdrc_usb2.c | 19 #include <linux/usb/hcd.h>
|
H A D | ci.h | 192 * @hcd: pointer to usb_hcd for ehci host driver 242 struct usb_hcd *hcd; member in struct:ci_hdrc
|
H A D | otg_fsm.c | 24 #include <linux/usb/hcd.h>
|
/linux-4.4.14/include/linux/usb/ |
H A D | ehci-dbgp.h | 56 static inline int xen_dbgp_reset_prep(struct usb_hcd *hcd) xen_dbgp_reset_prep() argument 61 static inline int xen_dbgp_external_startup(struct usb_hcd *hcd) xen_dbgp_external_startup() argument 72 static inline int dbgp_reset_prep(struct usb_hcd *hcd) dbgp_reset_prep() argument 74 return xen_dbgp_reset_prep(hcd); dbgp_reset_prep() 77 static inline int dbgp_external_startup(struct usb_hcd *hcd) dbgp_external_startup() argument 79 return xen_dbgp_external_startup(hcd); dbgp_external_startup()
|
H A D | hcd.h | 78 struct usb_bus self; /* hcd is-a bus */ 84 * hcd->driver->flags & HCD_MASK 123 #define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE)) 124 #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH)) 125 #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING)) 126 #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) 127 #define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING)) 128 #define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) 135 #define HCD_INTF_AUTHORIZED(hcd) \ 136 ((hcd)->flags & (1U << HCD_FLAG_INTF_AUTHORIZED)) 143 #define HCD_DEV_AUTHORIZED(hcd) \ 144 ((hcd)->flags & (1U << HCD_FLAG_DEV_AUTHORIZED)) 219 static inline struct usb_bus *hcd_to_bus(struct usb_hcd *hcd) hcd_to_bus() argument 221 return &hcd->self; hcd_to_bus() 238 const char *description; /* "ehci-hcd" etc */ 243 irqreturn_t (*irq) (struct usb_hcd *hcd); 258 int (*reset) (struct usb_hcd *hcd); 259 int (*start) (struct usb_hcd *hcd); 265 int (*pci_suspend)(struct usb_hcd *hcd, bool do_wakeup); 268 int (*pci_resume)(struct usb_hcd *hcd, bool hibernated); 271 void (*stop) (struct usb_hcd *hcd); 274 void (*shutdown) (struct usb_hcd *hcd); 277 int (*get_frame_number) (struct usb_hcd *hcd); 280 int (*urb_enqueue)(struct usb_hcd *hcd, 282 int (*urb_dequeue)(struct usb_hcd *hcd, 294 int (*map_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb, 296 void (*unmap_urb_for_dma)(struct usb_hcd *hcd, struct urb *urb); 299 void (*endpoint_disable)(struct usb_hcd *hcd, 304 void (*endpoint_reset)(struct usb_hcd *hcd, 308 int (*hub_status_data) (struct usb_hcd *hcd, char *buf); 309 int (*hub_control) (struct usb_hcd *hcd, 331 int (*alloc_streams)(struct usb_hcd *hcd, struct usb_device *udev, 337 int (*free_streams)(struct usb_hcd *hcd, struct usb_device *udev, 397 int (*port_power)(struct usb_hcd *hcd, int portnum, bool enable); 401 static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd) hcd_giveback_urb_in_bh() argument 403 return hcd->driver->flags & HCD_BH; hcd_giveback_urb_in_bh() 406 static inline bool hcd_periodic_completion_in_progress(struct usb_hcd *hcd, hcd_periodic_completion_in_progress() argument 409 return hcd->high_prio_bh.completing_ep == ep; hcd_periodic_completion_in_progress() 412 extern int usb_hcd_link_urb_to_ep(struct usb_hcd *hcd, struct urb *urb); 413 extern int usb_hcd_check_unlink_urb(struct usb_hcd *hcd, struct urb *urb, 415 extern void usb_hcd_unlink_urb_from_ep(struct usb_hcd *hcd, struct urb *urb); 419 extern void usb_hcd_giveback_urb(struct usb_hcd *hcd, struct urb *urb, 421 extern int usb_hcd_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, 443 extern struct usb_hcd *usb_get_hcd(struct usb_hcd *hcd); 444 extern void usb_put_hcd(struct usb_hcd *hcd); 445 extern int usb_hcd_is_primary_hcd(struct usb_hcd *hcd); 446 extern int usb_add_hcd(struct usb_hcd *hcd, 448 extern void usb_remove_hcd(struct usb_hcd *hcd); 449 extern int usb_hcd_find_raw_port_number(struct usb_hcd *hcd, int port1); 471 int hcd_buffer_create(struct usb_hcd *hcd); 472 void hcd_buffer_destroy(struct usb_hcd *hcd); 482 extern void usb_hc_died(struct usb_hcd *hcd); 483 extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd); 490 /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ 545 struct usb_hcd *hcd; member in struct:usb_tt_clear 644 extern void usb_hcd_resume_root_hub(struct usb_hcd *hcd); 646 static inline void usb_hcd_resume_root_hub(struct usb_hcd *hcd) usb_hcd_resume_root_hub() argument 706 /* This rwsem is for use only by the hub driver and ehci-hcd.
|
H A D | isp1760.h | 3 * and place the isp1760 onto platform_bus named "isp1760-hcd".
|
H A D | sl811.h | 3 * and place the sl811hs onto platform_bus named "sl811-hcd".
|
H A D | ehci_pdriver.h | 60 int (*pre_setup)(struct usb_hcd *hcd);
|
/linux-4.4.14/drivers/usb/renesas_usbhs/ |
H A D | mod_host.c | 23 #include <linux/usb/hcd.h> 466 static int usbhsh_connected_to_rhdev(struct usb_hcd *hcd, usbhsh_connected_to_rhdev() argument 471 return hcd->self.root_hub == usbv->parent; usbhsh_connected_to_rhdev() 503 struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); usbhsh_device_attach() local 504 struct device *dev = usbhsh_hcd_to_dev(hcd); usbhsh_device_attach() 579 if (!usbhsh_connected_to_rhdev(hcd, udev)) { 603 struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); usbhsh_device_detach() local 605 struct device *dev = usbhsh_hcd_to_dev(hcd); usbhsh_device_detach() 648 struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); usbhsh_queue_done() local 670 usb_hcd_unlink_urb_from_ep(hcd, urb); usbhsh_queue_done() 671 usb_hcd_giveback_urb(hcd, urb, status); usbhsh_queue_done() 674 static int usbhsh_queue_push(struct usb_hcd *hcd, usbhsh_queue_push() argument 678 struct usbhsh_hpriv *hpriv = usbhsh_hcd_to_hpriv(hcd); usbhsh_queue_push() 681 struct device *dev = usbhsh_hcd_to_dev(hcd); usbhsh_queue_push() 880 static int usbhsh_dcp_queue_push(struct usb_hcd *hcd, usbhsh_dcp_queue_push() argument 884 struct usbhsh_hpriv *hpriv = usbhsh_hcd_to_hpriv(hcd); usbhsh_dcp_queue_push() 887 struct device *dev = usbhsh_hcd_to_dev(hcd); usbhsh_dcp_queue_push() 953 static int usbhsh_host_start(struct usb_hcd *hcd) usbhsh_host_start() argument 958 static void usbhsh_host_stop(struct usb_hcd *hcd) usbhsh_host_stop() argument 962 static int usbhsh_urb_enqueue(struct usb_hcd *hcd, usbhsh_urb_enqueue() argument 966 struct usbhsh_hpriv *hpriv = usbhsh_hcd_to_hpriv(hcd); usbhsh_urb_enqueue() 982 ret = usb_hcd_link_urb_to_ep(hcd, urb); usbhsh_urb_enqueue() 1027 ret = usbhsh_dcp_queue_push(hcd, urb, mem_flags); usbhsh_urb_enqueue() 1029 ret = usbhsh_queue_push(hcd, urb, mem_flags); usbhsh_urb_enqueue() 1045 static int usbhsh_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) usbhsh_urb_dequeue() argument 1047 struct usbhsh_hpriv *hpriv = usbhsh_hcd_to_hpriv(hcd); usbhsh_urb_dequeue() 1061 static void usbhsh_endpoint_disable(struct usb_hcd *hcd, usbhsh_endpoint_disable() argument 1069 * this function might be called manytimes by same hcd/ep usbhsh_endpoint_disable() 1076 hpriv = usbhsh_hcd_to_hpriv(hcd); usbhsh_endpoint_disable() 1088 static int usbhsh_hub_status_data(struct usb_hcd *hcd, char *buf) usbhsh_hub_status_data() argument 1090 struct usbhsh_hpriv *hpriv = usbhsh_hcd_to_hpriv(hcd); usbhsh_hub_status_data() 1248 static int usbhsh_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, usbhsh_hub_control() argument 1251 struct usbhsh_hpriv *hpriv = usbhsh_hcd_to_hpriv(hcd); usbhsh_hub_control() 1287 static int usbhsh_bus_nop(struct usb_hcd *hcd) usbhsh_bus_nop() argument 1464 struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); usbhsh_start() local 1469 /* add hcd */ usbhsh_start() 1470 ret = usb_add_hcd(hcd, 0, 0); usbhsh_start() 1473 device_wakeup_enable(hcd->self.controller); usbhsh_start() 1508 struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); usbhsh_stop() local 1521 usb_remove_hcd(hcd); usbhsh_stop() 1534 struct usb_hcd *hcd; usbhs_mod_host_probe() local 1539 /* initialize hcd */ usbhs_mod_host_probe() 1540 hcd = usb_create_hcd(&usbhsh_driver, dev, usbhsh_hcd_name); usbhs_mod_host_probe() 1541 if (!hcd) { usbhs_mod_host_probe() 1542 dev_err(dev, "Failed to create hcd\n"); usbhs_mod_host_probe() 1545 hcd->has_tt = 1; /* for low/full speed */ usbhs_mod_host_probe() 1555 hpriv = usbhsh_hcd_to_hpriv(hcd); usbhs_mod_host_probe() 1582 struct usb_hcd *hcd = usbhsh_hpriv_to_hcd(hpriv); usbhs_mod_host_remove() local 1584 usb_put_hcd(hcd); usbhs_mod_host_remove()
|
/linux-4.4.14/drivers/usb/gadget/udc/ |
H A D | dummy_hcd.c | 41 #include <linux/usb/hcd.h> 271 static inline struct dummy_hcd *hcd_to_dummy_hcd(struct usb_hcd *hcd) hcd_to_dummy_hcd() argument 273 return (struct dummy_hcd *) (hcd->hcd_priv); hcd_to_dummy_hcd() 349 * the hcd speed 353 * speed of the hcd. 995 /* The gadget structure is stored inside the hcd structure and will be 1123 * this uses the hcd framework to hook up to host side drivers. 1209 struct usb_hcd *hcd, dummy_urb_enqueue() 1224 dum_hcd = hcd_to_dummy_hcd(hcd); dummy_urb_enqueue() 1233 rc = usb_hcd_link_urb_to_ep(hcd, urb); dummy_urb_enqueue() 1259 static int dummy_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) dummy_urb_dequeue() argument 1267 dum_hcd = hcd_to_dummy_hcd(hcd); dummy_urb_dequeue() 1270 rc = usb_hcd_check_unlink_urb(hcd, urb, status); dummy_urb_dequeue() 1949 static int dummy_hub_status(struct usb_hcd *hcd, char *buf) dummy_hub_status() argument 1955 dum_hcd = hcd_to_dummy_hcd(hcd); dummy_hub_status() 1958 if (!HCD_HW_ACCESSIBLE(hcd)) dummy_hub_status() 1973 usb_hcd_resume_root_hub(hcd); dummy_hub_status() 2029 struct usb_hcd *hcd, dummy_hub_control() 2040 if (!HCD_HW_ACCESSIBLE(hcd)) dummy_hub_control() 2043 dum_hcd = hcd_to_dummy_hcd(hcd); dummy_hub_control() 2052 if (hcd->speed == HCD_USB3) { dummy_hub_control() 2066 if (hcd->speed == HCD_USB3) { dummy_hub_control() 2082 if (hcd->speed == HCD_USB3 && dummy_hub_control() 2090 if (hcd->speed == HCD_USB3) dummy_hub_control() 2097 if (hcd->speed != HCD_USB3) dummy_hub_control() 2129 if (hcd->speed < HCD_USB3) { dummy_hub_control() 2159 if (hcd->speed != HCD_USB3) { dummy_hub_control() 2173 if (hcd->speed != HCD_USB3) { dummy_hub_control() 2182 if (hcd->speed == HCD_USB3) { dummy_hub_control() 2202 if (hcd->speed == HCD_USB3) dummy_hub_control() 2210 if (hcd->speed != HCD_USB3) { dummy_hub_control() 2219 if (hcd->speed == HCD_USB3) { dummy_hub_control() 2242 if (hcd->speed == HCD_USB3) { dummy_hub_control() 2257 if (hcd->speed != HCD_USB3) { dummy_hub_control() 2267 if (hcd->speed != HCD_USB3) { dummy_hub_control() 2285 usb_hcd_poll_rh_status(hcd); dummy_hub_control() 2289 static int dummy_bus_suspend(struct usb_hcd *hcd) dummy_bus_suspend() argument 2291 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); dummy_bus_suspend() 2293 dev_dbg(&hcd->self.root_hub->dev, "%s\n", __func__); dummy_bus_suspend() 2298 hcd->state = HC_STATE_SUSPENDED; dummy_bus_suspend() 2303 static int dummy_bus_resume(struct usb_hcd *hcd) dummy_bus_resume() argument 2305 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); dummy_bus_resume() 2308 dev_dbg(&hcd->self.root_hub->dev, "%s\n", __func__); dummy_bus_resume() 2311 if (!HCD_HW_ACCESSIBLE(hcd)) { dummy_bus_resume() 2318 hcd->state = HC_STATE_RUNNING; dummy_bus_resume() 2373 struct usb_hcd *hcd = dev_get_drvdata(dev); 2374 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); 2413 static int dummy_start(struct usb_hcd *hcd) 2415 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); 2422 if (!usb_hcd_is_primary_hcd(hcd)) 2433 hcd->power_budget = POWER_BUDGET; 2434 hcd->state = HC_STATE_RUNNING; 2435 hcd->uses_new_polling = 1; 2438 hcd->self.otg_port = 1; 2445 static void dummy_stop(struct usb_hcd *hcd) 2449 dum = hcd_to_dummy_hcd(hcd)->dum; 2450 device_remove_file(dummy_dev(hcd_to_dummy_hcd(hcd)), &dev_attr_urbs); 2451 dev_info(dummy_dev(hcd_to_dummy_hcd(hcd)), "stopped\n"); 2456 static int dummy_h_get_frame(struct usb_hcd *hcd) 2461 static int dummy_setup(struct usb_hcd *hcd) 2465 dum = *((void **)dev_get_platdata(hcd->self.controller)); 2466 hcd->self.sg_tablesize = ~0; 2467 if (usb_hcd_is_primary_hcd(hcd)) { 2468 dum->hs_hcd = hcd_to_dummy_hcd(hcd); 2475 hcd->speed = HCD_USB2; 2476 hcd->self.root_hub->speed = USB_SPEED_HIGH; 2478 dum->ss_hcd = hcd_to_dummy_hcd(hcd); 2480 hcd->speed = HCD_USB3; 2481 hcd->self.root_hub->speed = USB_SPEED_SUPER; 2487 static int dummy_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, 2491 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); 2534 static int dummy_free_streams(struct usb_hcd *hcd, struct usb_device *udev, 2538 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); 2657 struct usb_hcd *hcd; 2663 hcd = platform_get_drvdata(pdev); 2664 dum_hcd = hcd_to_dummy_hcd(hcd); 2669 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 2675 struct usb_hcd *hcd; 2679 hcd = platform_get_drvdata(pdev); 2680 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 2681 usb_hcd_poll_rh_status(hcd); 2772 * The hcd was added successfully but its probe 1208 dummy_urb_enqueue( struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags ) dummy_urb_enqueue() argument 2028 dummy_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength ) dummy_hub_control() argument
|
/linux-4.4.14/drivers/usb/misc/ |
H A D | lvstest.c | 21 #include <linux/usb/hcd.h> 48 struct usb_hcd *hcd; create_lvs_device() local 57 hcd = bus_to_hcd(hdev->bus); create_lvs_device() 68 if (hcd->driver->enable_device) { create_lvs_device() 69 if (hcd->driver->enable_device(hcd, udev) < 0) { create_lvs_device() 82 struct usb_hcd *hcd = bus_to_hcd(hdev->bus); destroy_lvs_device() local 84 if (hcd->driver->free_dev) destroy_lvs_device() 85 hcd->driver->free_dev(hcd, udev); destroy_lvs_device() 300 struct usb_hcd *hcd = bus_to_hcd(hdev->bus); lvs_rh_work() local 336 if (hcd->usb_phy) lvs_rh_work() 337 usb_phy_notify_connect(hcd->usb_phy, lvs_rh_work() 341 if (hcd->usb_phy) lvs_rh_work() 342 usb_phy_notify_disconnect(hcd->usb_phy, lvs_rh_work()
|
H A D | usb_u132.h | 4 * the "u132-hcd" modules. 42 * "u132-hcd" module is a USB host controller driver that talks 52 * the kernel to load the "u132-hcd" module. 55 * PC card and the "u132-hcd" module uses the API to send and receive 56 * data. The API features call-backs, so that part of the "u132-hcd"
|
H A D | ldusb.c | 134 /* As of kernel version 2.6.4 ehci-hcd uses an
|
H A D | usbtest.c | 783 * to see if usbcore, hcd, and device all behave right. such testing would 1412 /* keep the endpoint busy. there are lots of hc/hcd-internal unlink1() 1425 * hcd states and code paths, even with little other system load. unlink1()
|
/linux-4.4.14/drivers/usb/dwc2/ |
H A D | Makefile | 8 dwc2-y += hcd.o hcd_intr.o
|
H A D | hcd.c | 2 * hcd.c - DesignWare HS OTG Controller host-mode routines 51 #include <linux/usb/hcd.h> 55 #include "hcd.h" 710 struct usb_hcd *hcd; dwc2_hc_setup_align_buf() local 733 hcd = dwc2_hsotg_to_hcd(hsotg); dwc2_hc_setup_align_buf() 734 usb_hcd_unmap_urb_for_dma(hcd, usb_urb); dwc2_hc_setup_align_buf() 1441 struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); dwc2_host_is_b_hnp_enabled() local 1443 return hcd->self.b_hnp_enable; dwc2_host_is_b_hnp_enabled() 2129 static struct dwc2_hsotg *dwc2_hcd_to_hsotg(struct usb_hcd *hcd) dwc2_hcd_to_hsotg() argument 2133 p = (struct wrapper_priv_data *) &hcd->hcd_priv; dwc2_hcd_to_hsotg() 2137 static int _dwc2_hcd_start(struct usb_hcd *hcd); 2141 struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); dwc2_host_start() local 2143 hcd->self.is_b_host = dwc2_hcd_is_b_host(hsotg); dwc2_host_start() 2144 _dwc2_hcd_start(hcd); dwc2_host_start() 2149 struct usb_hcd *hcd = dwc2_hsotg_to_hcd(hsotg); dwc2_host_disconnect() local 2151 hcd->self.is_b_host = 0; dwc2_host_disconnect() 2173 static void dwc2_allocate_bus_bandwidth(struct usb_hcd *hcd, u16 bw, dwc2_allocate_bus_bandwidth() argument 2176 struct usb_bus *bus = hcd_to_bus(hcd); dwc2_allocate_bus_bandwidth() 2186 static void dwc2_free_bus_bandwidth(struct usb_hcd *hcd, u16 bw, dwc2_free_bus_bandwidth() argument 2189 struct usb_bus *bus = hcd_to_bus(hcd); dwc2_free_bus_bandwidth() 2321 static int _dwc2_hcd_start(struct usb_hcd *hcd) _dwc2_hcd_start() argument 2323 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_start() 2324 struct usb_bus *bus = hcd_to_bus(hcd); _dwc2_hcd_start() 2331 hcd->state = HC_STATE_RUNNING; _dwc2_hcd_start() 2332 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); _dwc2_hcd_start() 2345 usb_hcd_resume_root_hub(hcd); _dwc2_hcd_start() 2356 static void _dwc2_hcd_stop(struct usb_hcd *hcd) _dwc2_hcd_stop() argument 2358 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_stop() 2365 synchronize_irq(hcd->irq); _dwc2_hcd_stop() 2368 /* Ensure hcd is disconnected */ _dwc2_hcd_stop() 2372 hcd->state = HC_STATE_HALT; _dwc2_hcd_stop() 2373 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); _dwc2_hcd_stop() 2379 static int _dwc2_hcd_suspend(struct usb_hcd *hcd) _dwc2_hcd_suspend() argument 2381 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_suspend() 2391 if (!HCD_HW_ACCESSIBLE(hcd)) _dwc2_hcd_suspend() 2425 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); _dwc2_hcd_suspend() 2435 static int _dwc2_hcd_resume(struct usb_hcd *hcd) _dwc2_hcd_resume() argument 2437 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_resume() 2455 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); _dwc2_hcd_resume() 2504 static int _dwc2_hcd_get_frame_number(struct usb_hcd *hcd) _dwc2_hcd_get_frame_number() argument 2506 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_get_frame_number() 2511 static void dwc2_dump_urb_info(struct usb_hcd *hcd, struct urb *urb, dwc2_dump_urb_info() argument 2515 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); dwc2_dump_urb_info() 2592 static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, _dwc2_hcd_urb_enqueue() argument 2595 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_urb_enqueue() 2611 dwc2_dump_urb_info(hcd, urb, "urb_enqueue"); _dwc2_hcd_urb_enqueue() 2655 if (hcd->self.uses_dma) { _dwc2_hcd_urb_enqueue() 2705 retval = usb_hcd_link_urb_to_ep(hcd, urb); _dwc2_hcd_urb_enqueue() 2714 dwc2_allocate_bus_bandwidth(hcd, _dwc2_hcd_urb_enqueue() 2725 usb_hcd_unlink_urb_from_ep(hcd, urb); _dwc2_hcd_urb_enqueue() 2751 static int _dwc2_hcd_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, _dwc2_hcd_urb_dequeue() argument 2754 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_urb_dequeue() 2759 dwc2_dump_urb_info(hcd, urb, "urb_dequeue"); _dwc2_hcd_urb_dequeue() 2763 rc = usb_hcd_check_unlink_urb(hcd, urb, status); _dwc2_hcd_urb_dequeue() 2774 usb_hcd_unlink_urb_from_ep(hcd, urb); _dwc2_hcd_urb_dequeue() 2781 usb_hcd_giveback_urb(hcd, urb, status); _dwc2_hcd_urb_dequeue() 2797 static void _dwc2_hcd_endpoint_disable(struct usb_hcd *hcd, _dwc2_hcd_endpoint_disable() argument 2800 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_endpoint_disable() 2813 static void _dwc2_hcd_endpoint_reset(struct usb_hcd *hcd, _dwc2_hcd_endpoint_reset() argument 2816 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_endpoint_reset() 2835 static irqreturn_t _dwc2_hcd_irq(struct usb_hcd *hcd) _dwc2_hcd_irq() argument 2837 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_irq() 2848 static int _dwc2_hcd_hub_status_data(struct usb_hcd *hcd, char *buf) _dwc2_hcd_hub_status_data() argument 2850 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_hub_status_data() 2857 static int _dwc2_hcd_hub_control(struct usb_hcd *hcd, u16 typereq, u16 wvalue, _dwc2_hcd_hub_control() argument 2860 int retval = dwc2_hcd_hub_control(dwc2_hcd_to_hsotg(hcd), typereq, _dwc2_hcd_hub_control() 2866 static void _dwc2_hcd_clear_tt_buffer_complete(struct usb_hcd *hcd, _dwc2_hcd_clear_tt_buffer_complete() argument 2869 struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); _dwc2_hcd_clear_tt_buffer_complete() 2992 struct usb_hcd *hcd; dwc2_hcd_init() local 3038 hcd = usb_create_hcd(&dwc2_hc_driver, hsotg->dev, dev_name(hsotg->dev)); dwc2_hcd_init() 3039 if (!hcd) dwc2_hcd_init() 3043 hcd->self.uses_dma = 0; dwc2_hcd_init() 3045 hcd->has_tt = 1; dwc2_hcd_init() 3047 ((struct wrapper_priv_data *) &hcd->hcd_priv)->hsotg = hsotg; dwc2_hcd_init() 3048 hsotg->priv = hcd; dwc2_hcd_init() 3133 hcd->self.otg_port = hsotg->otg_port; dwc2_hcd_init() 3136 hcd->self.sg_tablesize = 0; dwc2_hcd_init() 3139 otg_set_host(hsotg->uphy->otg, &hcd->self); dwc2_hcd_init() 3146 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); dwc2_hcd_init() 3150 device_wakeup_enable(hcd->self.controller); dwc2_hcd_init() 3161 usb_put_hcd(hcd); dwc2_hcd_init() 3180 struct usb_hcd *hcd; dwc2_hcd_remove() local 3184 hcd = dwc2_hsotg_to_hcd(hsotg); dwc2_hcd_remove() 3185 dev_dbg(hsotg->dev, "hsotg->hcd = %p\n", hcd); dwc2_hcd_remove() 3187 if (!hcd) { dwc2_hcd_remove() 3196 usb_remove_hcd(hcd); dwc2_hcd_remove() 3199 usb_put_hcd(hcd); dwc2_hcd_remove()
|
H A D | pci.c | 51 #include <linux/usb/hcd.h>
|
H A D | core_intr.c | 50 #include <linux/usb/hcd.h> 54 #include "hcd.h"
|
H A D | hcd_queue.c | 50 #include <linux/usb/hcd.h> 54 #include "hcd.h"
|
H A D | platform.c | 52 #include "hcd.h"
|
H A D | hcd_ddma.c | 49 #include <linux/usb/hcd.h> 53 #include "hcd.h"
|
H A D | core.h | 905 extern void dwc2_enable_global_interrupts(struct dwc2_hsotg *hcd); 906 extern void dwc2_disable_global_interrupts(struct dwc2_hsotg *hcd);
|
/linux-4.4.14/include/linux/platform_data/ |
H A D | max3421-hcd.h | 16 * At this point, the only control the max3421-hcd driver cares about is
|
H A D | usb-ohci-s3c2410.h | 26 struct usb_hcd *hcd; member in struct:s3c2410_hcd_info
|
/linux-4.4.14/arch/arm/mach-imx/devices/ |
H A D | platform-imx21-hcd.c | 38 return imx_add_platform_device_dmamask("imx21-hcd", 0, imx_add_imx21_hcd()
|
H A D | Makefile | 8 obj-$(CONFIG_IMX_HAVE_PLATFORM_IMX21_HCD) += platform-imx21-hcd.o
|
/linux-4.4.14/drivers/usb/storage/ |
H A D | uas-detect.h | 2 #include <linux/usb/hcd.h> 59 struct usb_hcd *hcd = bus_to_hcd(udev->bus); uas_use_uas_driver() local 124 hcd->driver->description); uas_use_uas_driver() 130 if (udev->speed >= USB_SPEED_SUPER && !hcd->can_do_streams) { uas_use_uas_driver() 133 hcd_to_bus(hcd)->bus_name); uas_use_uas_driver()
|
/linux-4.4.14/drivers/usb/musb/ |
H A D | musb_virthub.c | 70 usb_hcd_poll_rh_status(musb->hcd); musb_host_finish_resume() 213 usb_hcd_poll_rh_status(musb->hcd); musb_port_reset() 226 usb_hcd_poll_rh_status(musb->hcd); musb_root_disconnect() 254 int musb_hub_status_data(struct usb_hcd *hcd, char *buf) musb_hub_status_data() argument 256 struct musb *musb = hcd_to_musb(hcd); musb_hub_status_data() 283 struct usb_hcd *hcd, musb_hub_control() 290 struct musb *musb = hcd_to_musb(hcd); musb_hub_control() 297 if (unlikely(!HCD_HW_ACCESSIBLE(hcd))) { musb_hub_control() 328 if (!hcd->self.is_b_host) musb_hub_control() 394 if (!hcd->self.is_b_host && musb_has_gadget(musb)) musb_hub_control() 282 musb_hub_control( struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength) musb_hub_control() argument
|
H A D | musb_host.c | 58 * + for 2.6.N, for N > ~10, needs API changes for hcd framework. 97 struct musb *hcd_to_musb(struct usb_hcd *hcd) hcd_to_musb() argument 99 return *(struct musb **) hcd->hcd_priv; hcd_to_musb() 326 usb_hcd_unlink_urb_from_ep(musb->hcd, urb); 328 usb_hcd_giveback_urb(musb->hcd, urb, status); 1508 usb_hcd_unmap_urb_for_dma(musb->hcd, urb); musb_host_tx() 2019 usb_hcd_unmap_urb_for_dma(musb->hcd, urb); musb_host_rx() 2192 struct usb_hcd *hcd, musb_urb_enqueue() 2197 struct musb *musb = hcd_to_musb(hcd); musb_urb_enqueue() 2210 ret = usb_hcd_link_urb_to_ep(hcd, urb); musb_urb_enqueue() 2236 usb_hcd_unlink_urb_from_ep(hcd, urb); musb_urb_enqueue() 2325 if (parent != hcd->self.root_hub) { musb_urb_enqueue() 2367 usb_hcd_unlink_urb_from_ep(hcd, urb); musb_urb_enqueue() 2438 static int musb_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) musb_urb_dequeue() argument 2440 struct musb *musb = hcd_to_musb(hcd); musb_urb_dequeue() 2452 ret = usb_hcd_check_unlink_urb(hcd, urb, status); musb_urb_dequeue() 2498 musb_h_disable(struct usb_hcd *hcd, struct usb_host_endpoint *hep) musb_h_disable() argument 2502 struct musb *musb = hcd_to_musb(hcd); musb_h_disable() 2550 static int musb_h_get_frame_number(struct usb_hcd *hcd) musb_h_get_frame_number() argument 2552 struct musb *musb = hcd_to_musb(hcd); musb_h_get_frame_number() 2557 static int musb_h_start(struct usb_hcd *hcd) musb_h_start() argument 2559 struct musb *musb = hcd_to_musb(hcd); musb_h_start() 2564 hcd->state = HC_STATE_RUNNING; musb_h_start() 2569 static void musb_h_stop(struct usb_hcd *hcd) musb_h_stop() argument 2571 musb_stop(hcd_to_musb(hcd)); musb_h_stop() 2572 hcd->state = HC_STATE_HALT; musb_h_stop() 2575 static int musb_bus_suspend(struct usb_hcd *hcd) musb_bus_suspend() argument 2577 struct musb *musb = hcd_to_musb(hcd); musb_bus_suspend() 2609 static int musb_bus_resume(struct usb_hcd *hcd) musb_bus_resume() argument 2611 struct musb *musb = hcd_to_musb(hcd); musb_bus_resume() 2696 static int musb_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, musb_map_urb_for_dma() argument 2699 struct musb *musb = hcd_to_musb(hcd); musb_map_urb_for_dma() 2709 return usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); musb_map_urb_for_dma() 2715 ret = usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); musb_map_urb_for_dma() 2722 static void musb_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) musb_unmap_urb_for_dma() argument 2724 struct musb *musb = hcd_to_musb(hcd); musb_unmap_urb_for_dma() 2726 usb_hcd_unmap_urb_for_dma(hcd, urb); musb_unmap_urb_for_dma() 2737 .description = "musb-hcd", 2772 /* usbcore sets dev->driver_data to hcd, and sometimes uses that... */ musb_host_alloc() 2773 musb->hcd = usb_create_hcd(&musb_hc_driver, dev, dev_name(dev)); musb_host_alloc() 2774 if (!musb->hcd) musb_host_alloc() 2777 *musb->hcd->hcd_priv = (unsigned long) musb; musb_host_alloc() 2778 musb->hcd->self.uses_pio_for_control = 1; musb_host_alloc() 2779 musb->hcd->uses_new_polling = 1; musb_host_alloc() 2780 musb->hcd->has_tt = 1; musb_host_alloc() 2789 usb_remove_hcd(musb->hcd); musb_host_cleanup() 2794 usb_put_hcd(musb->hcd); musb_host_free() 2800 struct usb_hcd *hcd = musb->hcd; musb_host_setup() local 2806 otg_set_host(musb->xceiv->otg, &hcd->self); musb_host_setup() 2807 hcd->self.otg_port = 1; musb_host_setup() 2808 musb->xceiv->otg->host = &hcd->self; musb_host_setup() 2809 hcd->power_budget = 2 * (power_budget ? : 250); musb_host_setup() 2811 ret = usb_add_hcd(hcd, 0, 0); musb_host_setup() 2815 device_wakeup_enable(hcd->self.controller); musb_host_setup() 2821 usb_hcd_resume_root_hub(musb->hcd); musb_host_resume_root_hub() 2827 if (musb->hcd->status_urb) musb_host_poke_root_hub() 2828 usb_hcd_poll_rh_status(musb->hcd); musb_host_poke_root_hub() 2830 usb_hcd_resume_root_hub(musb->hcd); musb_host_poke_root_hub() 2191 musb_urb_enqueue( struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) musb_urb_enqueue() argument
|
H A D | musb_host.h | 99 static inline struct musb *hcd_to_musb(struct usb_hcd *hcd) hcd_to_musb() argument 134 extern int musb_hub_status_data(struct usb_hcd *hcd, char *buf); musb_host_finish_resume() 135 extern int musb_hub_control(struct usb_hcd *hcd, musb_host_finish_resume()
|
H A D | musb_core.c | 488 struct usb_hcd *hcd = musb->hcd; musb_hnp_stop() local 503 if (hcd) musb_hnp_stop() 504 hcd->self.is_b_host = 0; musb_hnp_stop() 759 musb->is_active = musb->hcd->self.b_hnp_enable; musb_stage0_irq() 773 struct usb_hcd *hcd = musb->hcd; musb_stage0_irq() local 810 if (musb->hcd) musb_stage0_irq() 811 musb->hcd->self.is_b_host = 1; musb_stage0_irq() 818 if (hcd) musb_stage0_irq() 819 hcd->self.is_b_host = 0; musb_stage0_irq() 852 if (musb->hcd) musb_stage0_irq() 853 musb->hcd->self.is_b_host = 0; musb_stage0_irq()
|
H A D | musb_core.h | 72 #include <linux/usb/hcd.h> 424 struct usb_hcd *hcd; /* the usb hcd */ member in struct:musb
|
H A D | omap2430.c | 91 usb_hcd_poll_rh_status(musb->hcd); musb_do_idle()
|
/linux-4.4.14/drivers/usb/host/whci/ |
H A D | int.c | 31 irqreturn_t whc_int_handler(struct usb_hcd *hcd) whc_int_handler() argument 33 struct wusbhc *wusbhc = usb_hcd_to_wusbhc(hcd); whc_int_handler()
|
H A D | hcd.c | 217 .description = "whci-hcd", 247 dev_err(dev, "unable to create hcd\n"); whc_probe() 339 .name = "whci-hcd",
|
H A D | whcd.h | 167 irqreturn_t whc_int_handler(struct usb_hcd *hcd);
|
/linux-4.4.14/arch/arm/mach-pxa/ |
H A D | mp900.c | 73 .name = "isp116x-hcd",
|
H A D | viper.c | 631 .name = "isp116x-hcd",
|
/linux-4.4.14/drivers/staging/octeon-usb/ |
H A D | octeon-hcd.c | 61 #include <linux/usb/hcd.h> 70 #include "octeon-hcd.h" 524 * @hcd: USB HCD structure. 528 static int octeon_map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb, octeon_map_urb_for_dma() argument 537 ret = usb_hcd_map_urb_for_dma(hcd, urb, mem_flags); octeon_map_urb_for_dma() 546 * @hcd: USB HCD structure. 549 static void octeon_unmap_urb_for_dma(struct usb_hcd *hcd, struct urb *urb) octeon_unmap_urb_for_dma() argument 551 usb_hcd_unmap_urb_for_dma(hcd, urb); octeon_unmap_urb_for_dma() 1381 struct usb_hcd *hcd = octeon_to_hcd(priv); cvmx_usb_start_channel_control() local 1382 struct device *dev = hcd->self.controller; cvmx_usb_start_channel_control() 1998 struct usb_hcd *hcd = octeon_to_hcd(priv); octeon_usb_urb_complete_callback() local 1999 struct device *dev = hcd->self.controller; octeon_usb_urb_complete_callback() 2451 struct usb_hcd *hcd = octeon_to_hcd(priv); cvmx_usb_poll_channel() local 2452 struct device *dev = hcd->self.controller; cvmx_usb_poll_channel() 3069 static inline struct octeon_hcd *hcd_to_octeon(struct usb_hcd *hcd) hcd_to_octeon() argument 3071 return (struct octeon_hcd *)(hcd->hcd_priv); hcd_to_octeon() 3074 static irqreturn_t octeon_usb_irq(struct usb_hcd *hcd) octeon_usb_irq() argument 3076 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_irq() 3085 static int octeon_usb_start(struct usb_hcd *hcd) octeon_usb_start() argument 3087 hcd->state = HC_STATE_RUNNING; octeon_usb_start() 3091 static void octeon_usb_stop(struct usb_hcd *hcd) octeon_usb_stop() argument 3093 hcd->state = HC_STATE_HALT; octeon_usb_stop() 3096 static int octeon_usb_get_frame_number(struct usb_hcd *hcd) octeon_usb_get_frame_number() argument 3098 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_get_frame_number() 3103 static int octeon_usb_urb_enqueue(struct usb_hcd *hcd, octeon_usb_urb_enqueue() argument 3107 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_urb_enqueue() 3108 struct device *dev = hcd->self.controller; octeon_usb_urb_enqueue() 3119 rc = usb_hcd_link_urb_to_ep(hcd, urb); octeon_usb_urb_enqueue() 3200 usb_hcd_unlink_urb_from_ep(hcd, urb); octeon_usb_urb_enqueue() 3271 usb_hcd_unlink_urb_from_ep(hcd, urb); octeon_usb_urb_enqueue() 3281 static int octeon_usb_urb_dequeue(struct usb_hcd *hcd, octeon_usb_urb_dequeue() argument 3285 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_urb_dequeue() 3294 rc = usb_hcd_check_unlink_urb(hcd, urb, status); octeon_usb_urb_dequeue() 3307 static void octeon_usb_endpoint_disable(struct usb_hcd *hcd, octeon_usb_endpoint_disable() argument 3310 struct device *dev = hcd->self.controller; octeon_usb_endpoint_disable() 3313 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_endpoint_disable() 3326 static int octeon_usb_hub_status_data(struct usb_hcd *hcd, char *buf) octeon_usb_hub_status_data() argument 3328 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_hub_status_data() 3341 static int octeon_usb_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, octeon_usb_hub_control() argument 3344 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_hub_control() 3345 struct device *dev = hcd->self.controller; octeon_usb_hub_control() 3583 struct usb_hcd *hcd; octeon_usb_probe() local 3670 hcd = usb_create_hcd(&octeon_hc_driver, dev, dev_name(dev)); octeon_usb_probe() 3671 if (!hcd) { octeon_usb_probe() 3675 hcd->uses_new_polling = 1; octeon_usb_probe() 3676 priv = (struct octeon_hcd *)hcd->hcd_priv; octeon_usb_probe() 3703 kfree(hcd); octeon_usb_probe() 3707 status = usb_add_hcd(hcd, irq, 0); octeon_usb_probe() 3710 kfree(hcd); octeon_usb_probe() 3713 device_wakeup_enable(hcd->self.controller); octeon_usb_probe() 3724 struct usb_hcd *hcd = dev_get_drvdata(dev); octeon_usb_remove() local 3725 struct octeon_hcd *priv = hcd_to_octeon(hcd); octeon_usb_remove() 3728 usb_remove_hcd(hcd); octeon_usb_remove() 3735 kfree(hcd); octeon_usb_remove()
|
/linux-4.4.14/drivers/usb/dwc3/ |
H A D | host.c | 29 xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); dwc3_host_init()
|
/linux-4.4.14/arch/sh/boards/mach-se/7343/ |
H A D | setup.c | 129 .name = "isp116x-hcd",
|
/linux-4.4.14/drivers/usb/phy/ |
H A D | phy-mv-usb.c | 26 #include <linux/usb/hcd.h> 206 struct usb_hcd *hcd; mv_otg_start_host() local 213 hcd = bus_to_hcd(otg->host); mv_otg_start_host() 216 usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); mv_otg_start_host() 217 device_wakeup_enable(hcd->self.controller); mv_otg_start_host() 219 usb_remove_hcd(hcd); mv_otg_start_host()
|
H A D | phy-msm-usb.c | 44 #include <linux/usb/hcd.h> 690 struct usb_hcd *hcd; msm_otg_start_host() local 695 hcd = bus_to_hcd(phy->otg->host); msm_otg_start_host() 710 usb_add_hcd(hcd, hcd->irq, IRQF_SHARED); msm_otg_start_host() 711 device_wakeup_enable(hcd->self.controller); msm_otg_start_host() 717 usb_remove_hcd(hcd); msm_otg_start_host() 729 struct usb_hcd *hcd; msm_otg_set_host() local 754 hcd = bus_to_hcd(host); msm_otg_set_host() 755 hcd->power_budget = motg->pdata->power_budget; msm_otg_set_host()
|
/linux-4.4.14/drivers/usb/mon/ |
H A D | mon_main.c | 12 #include <linux/usb/hcd.h> 191 * Add a USB bus (usually by a modprobe foo-hcd) 206 * Remove a USB bus (either from rmmod foo-hcd or from a hot-remove event).
|
/linux-4.4.14/drivers/clk/imx/ |
H A D | clk-imx21.c | 150 clk_register_clkdev(clk[IMX21_CLK_USB_GATE], "per", "imx21-hcd.0"); mx21_clocks_init() 151 clk_register_clkdev(clk[IMX21_CLK_USB_HCLK_GATE], "ahb", "imx21-hcd.0"); mx21_clocks_init()
|
/linux-4.4.14/arch/avr32/boards/hammerhead/ |
H A D | flash.c | 129 * So in isp116x-hcd.c we should comment out USE_PLATFORM_DELAY 163 .name = "isp116x-hcd",
|
/linux-4.4.14/drivers/usb/wusbcore/ |
H A D | wa-hc.h | 37 * hcd glue with the USB API Host Controller Interface API. 77 * hcd.c. 370 * FIXME: has to go away in favour of a 'struct' hcd based solution
|
H A D | rh.c | 59 * Our entry points into here are, as in hcd.c, the USB stack root hub
|
H A D | wa-rpipe.c | 513 * This is called before calling hcd->stop(), so you don't need to do
|
H A D | wusbhc.h | 61 #include <linux/usb/hcd.h>
|
/linux-4.4.14/drivers/bluetooth/ |
H A D | btbcm.c | 319 snprintf(fw_name, len, "brcm/%s.hcd", hw_name ? : "BCM"); btbcm_initialize() 435 snprintf(fw_name, sizeof(fw_name), "brcm/%s.hcd", btbcm_setup_patchram() 456 snprintf(fw_name, sizeof(fw_name), "brcm/%s-%4.4x-%4.4x.hcd", btbcm_setup_patchram()
|
/linux-4.4.14/arch/blackfin/mach-bf533/boards/ |
H A D | ip0x.c | 254 .name = "isp1362-hcd",
|
H A D | cm_bf533.c | 395 .name = "isp1362-hcd",
|
/linux-4.4.14/include/linux/ |
H A D | fsl_devices.h | 90 unsigned power_budget; /* hcd->power_budget */
|
/linux-4.4.14/arch/m68k/atari/ |
H A D | config.c | 705 * ISP 1160 - using the isp116x-hcd module 751 .name = "isp116x-hcd", 846 .name = "isp116x-hcd",
|
/linux-4.4.14/drivers/usb/early/ |
H A D | ehci-dbgp.c | 974 int dbgp_reset_prep(struct usb_hcd *hcd) dbgp_reset_prep() argument 976 int ret = xen_dbgp_reset_prep(hcd); dbgp_reset_prep() 1002 int dbgp_external_startup(struct usb_hcd *hcd) dbgp_external_startup() argument 1004 return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup(); dbgp_external_startup()
|
/linux-4.4.14/arch/blackfin/mach-bf561/boards/ |
H A D | acvilon.c | 90 .name = "isp1760-hcd",
|
H A D | cm_bf561.c | 262 .name = "isp1362-hcd",
|
H A D | ezkit.c | 95 .name = "isp1362-hcd",
|
/linux-4.4.14/sound/usb/usx2y/ |
H A D | us122l.c | 614 snd_printk(KERN_ERR "disable ehci-hcd to run US-144 \n"); snd_us122l_probe() 748 { /* US-144 only works at USB1.1! Disable module ehci-hcd. */
|
H A D | usbusx2yaudio.c | 48 look for "0000425-linux-2.6.9-rc4-mm1_ohci-hcd.patch.gz" on 202 urb->start_frame = (frame + NRURBS * nr_of_packs()); // let hcd do rollover sanity checks usX2Y_urb_submit()
|
/linux-4.4.14/arch/blackfin/mach-bf537/boards/ |
H A D | tcm_bf537.c | 222 .name = "isp1362-hcd",
|
H A D | cm_bf537e.c | 287 .name = "isp1362-hcd",
|
H A D | cm_bf537u.c | 222 .name = "isp1362-hcd",
|
/linux-4.4.14/drivers/net/irda/ |
H A D | irda-usb.c | 40 * o usb-uhci-hcd (For Intel/Via USB controllers) 41 * o uhci-hcd (Alternate/JE driver for Intel/Via USB controllers) 42 * o ohci-hcd (For other USB controllers) 45 * o ehci-hcd (USB 2.0 controllers)
|
/linux-4.4.14/arch/arm/mach-omap1/ |
H A D | usb.c | 623 /* hcd explicitly gates 48MHz */ omap_1510_usb_init()
|