/linux/drivers/usb/core/ |
H A D | hcd.c | 38 #include <linux/usb/hcd.h> 51 * HCD-specific behaviors/bugs. 60 * tracking overhead. The HCD code should only block on spinlocks or on 65 * and includes mostly a "HCDI" (HCD Interface) along with some APIs used 405 * @hcd: the host controller for this root hub 416 rh_string(int id, struct usb_hcd const *hcd, u8 *data, unsigned len) in rh_string() argument 433 s = hcd->self.bus_name; in rh_string() 437 s = hcd->product_desc; in rh_string() 442 init_utsname()->release, hcd->driver->description); in rh_string() 455 static int rh_call_control (struct usb_hcd *hcd, struct urb *urb) in rh_call_control() argument [all …]
|
H A D | buffer.c | 3 * DMA memory management for framework level HCD code (hc_driver) 21 #include <linux/usb/hcd.h> 53 * @hcd: the bus whose buffer pools are to be initialized 65 int hcd_buffer_create(struct usb_hcd *hcd) in hcd_buffer_create() argument 70 if (hcd->localmem_pool || !hcd_uses_dma(hcd)) in hcd_buffer_create() 78 hcd->pool[i] = dma_pool_create(name, hcd->self.sysdev, in hcd_buffer_create() 80 if (!hcd->pool[i]) { in hcd_buffer_create() 81 hcd_buffer_destroy(hcd); in hcd_buffer_create() 91 * @hcd: the bus whose buffer pools are to be destroyed 97 void hcd_buffer_destroy(struct usb_hcd *hcd) in hcd_buffer_destroy() argument [all …]
|
/linux/drivers/usb/isp1760/ |
H A D | isp1760-hcd.c | 23 #include <linux/usb/hcd.h> 34 #include "isp1760-hcd.h" 41 typedef void (packet_enqueue)(struct usb_hcd *hcd, struct isp1760_qh *qh, 44 static inline struct isp1760_hcd *hcd_to_priv(struct usb_hcd *hcd) in hcd_to_priv() argument 46 return *(struct isp1760_hcd **)hcd->hcd_priv; in hcd_to_priv() 150 /* the rest is HCD-private */ 200 static u32 isp1760_hcd_read(struct usb_hcd *hcd, u32 field) in isp1760_hcd_read() argument 202 struct isp1760_hcd *priv = hcd_to_priv(hcd); in isp1760_hcd_read() 225 static void isp1760_hcd_write(struct usb_hcd *hcd, u32 field, u32 val) in isp1760_hcd_write() argument 227 struct isp1760_hcd *priv = hcd_to_priv(hcd); in isp1760_hcd_write() [all …]
|
H A D | isp1760-core.c | 25 #include "isp1760-hcd.h" 31 struct isp1760_hcd *hcd = &isp->hcd; in isp1760_init_core() local 46 isp1760_field_set(hcd->fields, SW_RESET_RESET_ALL); in isp1760_init_core() 50 if ((isp->devflags & ISP1760_FLAG_ANALOG_OC) && hcd->is_isp1763) { in isp1760_init_core() 56 isp1760_field_clear(hcd->fields, HW_DATA_BUS_WIDTH); in isp1760_init_core() 58 isp1760_field_set(hcd->fields, HW_DATA_BUS_WIDTH); in isp1760_init_core() 60 isp1760_field_set(hcd->fields, HW_ANA_DIGI_OC); in isp1760_init_core() 62 isp1760_field_set(hcd->fields, HW_DACK_POL_HIGH); in isp1760_init_core() 64 isp1760_field_set(hcd->fields, HW_DREQ_POL_HIGH); in isp1760_init_core() 66 isp1760_field_set(hcd->fields, HW_INTR_HIGH_ACT); in isp1760_init_core() [all …]
|
/linux/drivers/usb/host/ |
H A D | ohci-ps3.c | 12 static int ps3_ohci_hc_reset(struct usb_hcd *hcd) in ps3_ohci_hc_reset() argument 14 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ps3_ohci_hc_reset() 21 static int ps3_ohci_hc_start(struct usb_hcd *hcd) in ps3_ohci_hc_start() argument 24 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ps3_ohci_hc_start() 36 dev_err(hcd->self.controller, "can't start %s\n", in ps3_ohci_hc_start() 37 hcd->self.bus_name); in ps3_ohci_hc_start() 38 ohci_stop(hcd); in ps3_ohci_hc_start() 70 struct usb_hcd *hcd; in ps3_ohci_probe() local 122 hcd = usb_create_hcd(&ps3_ohci_hc_driver, &dev->core, dev_name(&dev->core)); in ps3_ohci_probe() 124 if (!hcd) { in ps3_ohci_probe() [all …]
|
H A D | max3421-hcd.c | 18 * For USB HCD implementation. 63 #include <linux/usb/hcd.h> 66 #include <linux/platform_data/max3421-hcd.h> 132 * SPI-thread without acquiring the HCD lock: 329 hcd_to_max3421(struct usb_hcd *hcd) in hcd_to_max3421() argument 331 return (struct max3421_hcd *) hcd->hcd_priv; in hcd_to_max3421() 341 spi_rd8(struct usb_hcd *hcd, unsigned int reg) in spi_rd8() argument 343 struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); in spi_rd8() 344 struct spi_device *spi = to_spi_device(hcd->self.controller); in spi_rd8() 367 spi_wr8(struct usb_hcd *hcd, unsigned int reg, u8 val) in spi_wr8() argument [all …]
|
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); 39 static void xhci_priv_plat_start(struct usb_hcd *hcd) in xhci_priv_plat_start() argument 41 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); in xhci_priv_plat_start() 44 priv->plat_start(hcd); in xhci_priv_plat_start() 47 static int xhci_priv_init_quirk(struct usb_hcd *hcd) in xhci_priv_init_quirk() argument 49 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); in xhci_priv_init_quirk() 54 return priv->init_quirk(hcd); in xhci_priv_init_quirk() 57 static int xhci_priv_suspend_quirk(struct usb_hcd *hcd) in xhci_priv_suspend_quirk() argument 59 struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); in xhci_priv_suspend_quirk() [all …]
|
H A D | ehci-sh.c | 14 struct usb_hcd *hcd; member 17 static int ehci_sh_reset(struct usb_hcd *hcd) in ehci_sh_reset() argument 19 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_sh_reset() 21 ehci->caps = hcd->regs; in ehci_sh_reset() 23 return ehci_setup(hcd); in ehci_sh_reset() 78 struct usb_hcd *hcd; in ehci_hcd_sh_probe() local 90 /* initialize hcd */ in ehci_hcd_sh_probe() 91 hcd = usb_create_hcd(&ehci_sh_hc_driver, &pdev->dev, in ehci_hcd_sh_probe() 93 if (!hcd) { in ehci_hcd_sh_probe() 98 hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in ehci_hcd_sh_probe() [all …]
|
H A D | ehci-ps3.c | 40 static int ps3_ehci_hc_reset(struct usb_hcd *hcd) in ps3_ehci_hc_reset() argument 43 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ps3_ehci_hc_reset() 46 ehci->caps = hcd->regs; in ps3_ehci_hc_reset() 48 result = ehci_setup(hcd); in ps3_ehci_hc_reset() 87 struct usb_hcd *hcd; in ps3_ehci_probe() local 138 hcd = usb_create_hcd(&ps3_ehci_hc_driver, &dev->core, dev_name(&dev->core)); in ps3_ehci_probe() 140 if (!hcd) { in ps3_ehci_probe() 147 hcd->rsrc_start = dev->m_region->lpar_addr; in ps3_ehci_probe() 148 hcd->rsrc_len = dev->m_region->len; in ps3_ehci_probe() 150 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) in ps3_ehci_probe() [all …]
|
H A D | Makefile | 9 fhci-y := fhci-hcd.o fhci-hub.o fhci-q.o 14 xhci-hcd-y := xhci.o xhci-mem.o xhci-ext-caps.o 15 xhci-hcd-y += xhci-ring.o xhci-hub.o xhci-dbg.o 16 xhci-hcd-y += xhci-trace.o 19 xhci-hcd-y += xhci-dbgcap.o xhci-dbgtty.o 22 xhci-mtk-hcd-y := xhci-mtk.o xhci-mtk-sch.o 24 xhci-plat-hcd-y := xhci-plat.o 26 xhci-plat-hcd-y += xhci-mvebu.o 29 xhci-hcd-y += xhci-debugfs.o 32 xhci-rcar-hcd-y += xhci-rcar.o [all …]
|
H A D | ohci-sa1111.c | 3 * OHCI HCD (Host Controller Driver) for USB. 44 static void dump_hci_status(struct usb_hcd *hcd, const char *label) 46 unsigned long status = readl_relaxed(hcd->regs + USB_STATUS); 57 static int ohci_sa1111_reset(struct usb_hcd *hcd) in ohci_sa1111_reset() argument 59 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_sa1111_reset() 65 static int ohci_sa1111_start(struct usb_hcd *hcd) in ohci_sa1111_start() argument 67 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_sa1111_start() 73 ohci_stop(hcd); in ohci_sa1111_start() 174 * then invokes the start() method for the HCD associated with it. 178 struct usb_hcd *hcd; in ohci_hcd_sa1111_probe() local [all …]
|
H A D | xhci-pci.c | 91 static int xhci_pci_setup(struct usb_hcd *hcd); 92 static int xhci_pci_run(struct usb_hcd *hcd); 93 static int xhci_pci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev, 108 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_msix_sync_irqs() local 110 if (hcd->msix_enabled) { in xhci_msix_sync_irqs() 111 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_msix_sync_irqs() 121 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_cleanup_msix() local 122 struct pci_dev *pdev = to_pci_dev(hcd->self.controller); in xhci_cleanup_msix() 124 if (hcd->irq > 0) in xhci_cleanup_msix() 129 hcd->msix_enabled = 0; in xhci_cleanup_msix() [all …]
|
H A D | ohci-pci.c | 3 * OHCI HCD (Host Controller Driver) for USB. 23 #include <linux/usb/hcd.h> 35 static int broken_suspend(struct usb_hcd *hcd) in broken_suspend() argument 37 device_init_wakeup(&hcd->self.root_hub->dev, 0); in broken_suspend() 44 static int ohci_quirk_amd756(struct usb_hcd *hcd) in ohci_quirk_amd756() argument 46 struct ohci_hcd *ohci = hcd_to_ohci (hcd); in ohci_quirk_amd756() 52 return broken_suspend(hcd); in ohci_quirk_amd756() 59 static int ohci_quirk_opti(struct usb_hcd *hcd) in ohci_quirk_opti() argument 61 struct ohci_hcd *ohci = hcd_to_ohci (hcd); in ohci_quirk_opti() 72 static int ohci_quirk_ns(struct usb_hcd *hcd) in ohci_quirk_ns() argument [all …]
|
H A D | uhci-pci.c | 3 * UHCI HCD (Host Controller Driver) PCI Bus Glue. 5 * Extracted from uhci-hcd.c: 46 * This function is called at the end of configure_hc in uhci-hcd.c. 114 static int uhci_pci_init(struct usb_hcd *hcd) in uhci_pci_init() argument 116 struct uhci_hcd *uhci = hcd_to_uhci(hcd); in uhci_pci_init() 118 uhci->io_addr = (unsigned long) hcd->rsrc_start; in uhci_pci_init() 120 uhci->rh_numports = uhci_count_ports(hcd); in uhci_pci_init() 165 struct usb_hcd *hcd = pci_get_drvdata(pdev); in uhci_shutdown() local 167 uhci_hc_died(hcd_to_uhci(hcd)); in uhci_shutdown() 172 static int uhci_pci_resume(struct usb_hcd *hcd, pm_message_t state); [all …]
|
H A D | ohci-mem.c | 3 * OHCI HCD (Host Controller Driver) for USB. 15 * - data used only by the HCD ... kmalloc is fine 16 * - async and periodic schedules, shared by HC and HCD ... these 18 * - driver buffers, read/written by HC ... the hcd glue or the 22 * No memory seen by this driver (or any HCD) may be paged out. 94 struct usb_hcd *hcd = ohci_to_hcd(hc); in td_alloc() local 96 if (hcd->localmem_pool) in td_alloc() 97 td = gen_pool_dma_zalloc_align(hcd->localmem_pool, in td_alloc() 114 struct usb_hcd *hcd = ohci_to_hcd(hc); in td_free() local 123 if (hcd->localmem_pool) in td_free() [all …]
|
H A D | xhci-hub.c | 279 static void xhci_usb2_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_usb2_hub_descriptor() argument 334 static void xhci_usb3_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_usb3_hub_descriptor() argument 367 static void xhci_hub_descriptor(struct usb_hcd *hcd, struct xhci_hcd *xhci, in xhci_hub_descriptor() argument 371 if (hcd->speed >= HCD_USB3) in xhci_hub_descriptor() 372 xhci_usb3_hub_descriptor(hcd, xhci, desc); in xhci_hub_descriptor() 374 xhci_usb2_hub_descriptor(hcd, xhci, desc); in xhci_hub_descriptor() 552 struct usb_hcd *hcd; in xhci_disable_port() local 555 hcd = port->rhub->hcd; in xhci_disable_port() 558 if (hcd->speed >= HCD_USB3) { in xhci_disable_port() 577 hcd->self.busnum, port->hcd_portnum + 1, portsc); in xhci_disable_port() [all …]
|
H A D | xen-hcd.c | 3 * xen-hcd.c 14 #include <linux/usb/hcd.h> 100 static inline struct xenhcd_info *xenhcd_hcd_to_info(struct usb_hcd *hcd) in xenhcd_hcd_to_info() argument 102 return (struct xenhcd_info *)hcd->hcd_priv; in xenhcd_hcd_to_info() 114 pr_alert("xen-hcd: protocol error: %s!\n", msg); in xenhcd_set_error() 312 static int xenhcd_bus_suspend(struct usb_hcd *hcd) in xenhcd_bus_suspend() argument 314 struct xenhcd_info *info = xenhcd_hcd_to_info(hcd); in xenhcd_bus_suspend() 321 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { in xenhcd_bus_suspend() 335 static int xenhcd_bus_resume(struct usb_hcd *hcd) in xenhcd_bus_resume() argument 337 struct xenhcd_info *info = xenhcd_hcd_to_info(hcd); in xenhcd_bus_resume() [all …]
|
H A D | ohci-hcd.c | 38 #include <linux/usb/hcd.h> 84 static void ohci_stop(struct usb_hcd *hcd); 148 struct usb_hcd *hcd, in ohci_urb_enqueue() argument 152 struct ohci_hcd *ohci = hcd_to_ohci (hcd); in ohci_urb_enqueue() 213 if (!HCD_HW_ACCESSIBLE(hcd)) { in ohci_urb_enqueue() 221 retval = usb_hcd_link_urb_to_ep(hcd, urb); in ohci_urb_enqueue() 229 usb_hcd_unlink_urb_from_ep(hcd, urb); in ohci_urb_enqueue() 313 static int ohci_urb_dequeue(struct usb_hcd *hcd, struct urb *urb, int status) in ohci_urb_dequeue() argument 315 struct ohci_hcd *ohci = hcd_to_ohci (hcd); in ohci_urb_dequeue() 321 rc = usb_hcd_check_unlink_urb(hcd, urb, status); in ohci_urb_dequeue() [all …]
|
H A D | Kconfig | 8 tristate "Cypress C67x00 HCD support" 21 tristate "xHCI HCD (USB 3.0) support" 28 module will be called xhci-hcd. 133 xhci-plat-hcd.ko 139 tristate "EHCI HCD (USB 2.0) support" 158 module will be called ehci-hcd. 270 tristate "NVIDIA Tegra HCD support" 326 will be called octeon-hcd. 353 tristate "OXU210HP HCD support" 363 module will be called oxu210hp-hcd. [all …]
|
/linux/drivers/staging/greybus/ |
H A D | usb.c | 12 #include <linux/usb/hcd.h> 38 static inline struct gb_usb_device *to_gb_usb_device(struct usb_hcd *hcd) in to_gb_usb_device() argument 40 return (struct gb_usb_device *)hcd->hcd_priv; in to_gb_usb_device() 48 static void hcd_stop(struct usb_hcd *hcd) in hcd_stop() argument 50 struct gb_usb_device *dev = to_gb_usb_device(hcd); in hcd_stop() 56 dev_err(&dev->gbphy_dev->dev, "HCD stop failed '%d'\n", ret); in hcd_stop() 59 static int hcd_start(struct usb_hcd *hcd) in hcd_start() argument 61 struct usb_bus *bus = hcd_to_bus(hcd); in hcd_start() 62 struct gb_usb_device *dev = to_gb_usb_device(hcd); in hcd_start() 68 dev_err(&dev->gbphy_dev->dev, "HCD start failed '%d'\n", ret); in hcd_start() [all …]
|
/linux/drivers/usb/chipidea/ |
H A D | host.c | 13 #include <linux/usb/hcd.h> 26 static int (*orig_bus_suspend)(struct usb_hcd *hcd); 38 static int ehci_ci_portpower(struct usb_hcd *hcd, int portnum, bool enable) in ehci_ci_portpower() 40 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ci_portpower() 42 struct device *dev = hcd->self.controller; in ehci_ci_portpower() 84 static int ehci_ci_reset(struct usb_hcd *hcd) in ehci_ci_reset() 86 struct device *dev = hcd->self.controller; in ehci_ci_reset() 88 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ci_reset() 91 ret = ehci_setup(hcd); in ehci_ci_reset() 117 return usb_hcd_irq(ci->irq, ci->hcd); in host_irq() 37 ehci_ci_portpower(struct usb_hcd * hcd,int portnum,bool enable) ehci_ci_portpower() argument 83 ehci_ci_reset(struct usb_hcd * hcd) ehci_ci_reset() argument 121 struct usb_hcd *hcd; host_start() local 210 struct usb_hcd *hcd = ci->hcd; host_stop() local 241 ci_ehci_hub_control(struct usb_hcd * hcd,u16 typeReq,u16 wValue,u16 wIndex,char * buf,u16 wLength) ci_ehci_hub_control() argument 329 ci_ehci_bus_suspend(struct usb_hcd * hcd) ci_ehci_bus_suspend() argument 433 ci_hdrc_map_urb_for_dma(struct usb_hcd * hcd,struct urb * urb,gfp_t mem_flags) ci_hdrc_map_urb_for_dma() argument 449 ci_hdrc_unmap_urb_for_dma(struct usb_hcd * hcd,struct urb * urb) ci_hdrc_unmap_urb_for_dma() argument [all...] |
/linux/include/linux/usb/ |
H A D | hcd.h | 73 struct usb_bus self; /* hcd is-a bus */ 79 * hcd->driver->flags & HCD_MASK 119 #define HCD_HW_ACCESSIBLE(hcd) ((hcd)->flags & (1U << HCD_FLAG_HW_ACCESSIBLE)) argument 120 #define HCD_POLL_RH(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_RH)) argument 121 #define HCD_POLL_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_POLL_PENDING)) argument 122 #define HCD_WAKEUP_PENDING(hcd) ((hcd)->flags & (1U << HCD_FLAG_WAKEUP_PENDING)) argument 123 #define HCD_RH_RUNNING(hcd) ((hcd)->flags & (1U << HCD_FLAG_RH_RUNNING)) argument 124 #define HCD_DEAD(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEAD)) argument 125 #define HCD_DEFER_RH_REGISTER(hcd) ((hcd)->flags & (1U << HCD_FLAG_DEFER_RH_REGISTER)) argument 132 #define HCD_INTF_AUTHORIZED(hcd) \ argument [all …]
|
/linux/drivers/usb/c67x00/ |
H A D | c67x00-hcd.c | 3 * c67x00-hcd.c: Cypress C67X00 USB Host Controller Driver 15 #include "c67x00-hcd.h" 47 static int c67x00_hub_status_data(struct usb_hcd *hcd, char *buf) in c67x00_hub_status_data() argument 49 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); in c67x00_hub_status_data() 66 static int c67x00_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, in c67x00_hub_control() argument 69 struct c67x00_hcd *c67x00 = hcd_to_c67x00_hcd(hcd); in c67x00_hub_control() 239 struct usb_hcd *hcd = c67x00_hcd_to_hcd(c67x00); in c67x00_hcd_irq() local 250 if (unlikely(hcd->state == HC_STATE_HALT)) in c67x00_hcd_irq() 253 if (!HCD_HW_ACCESSIBLE(hcd)) in c67x00_hcd_irq() 266 static int c67x00_hcd_start(struct usb_hcd *hcd) in c67x00_hcd_start() argument [all …]
|
/linux/drivers/usb/cdns3/ |
H A D | host.c | 17 #include <linux/usb/hcd.h> 32 static void xhci_cdns3_plat_start(struct usb_hcd *hcd) in xhci_cdns3_plat_start() argument 34 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_cdns3_plat_start() 42 if (hcd->regs) { in xhci_cdns3_plat_start() 43 value = readl(hcd->regs + XECP_AUX_CTRL_REG1); in xhci_cdns3_plat_start() 45 writel(value, hcd->regs + XECP_AUX_CTRL_REG1); in xhci_cdns3_plat_start() 47 value = readl(hcd->regs + XECP_PORT_CAP_REG); in xhci_cdns3_plat_start() 49 writel(value, hcd->regs + XECP_PORT_CAP_REG); in xhci_cdns3_plat_start() 53 static int xhci_cdns3_resume_quirk(struct usb_hcd *hcd) in xhci_cdns3_resume_quirk() argument 55 xhci_cdns3_plat_start(hcd); in xhci_cdns3_resume_quirk() [all …]
|
/linux/sound/soc/codecs/ |
H A D | hdmi-codec.c | 282 struct hdmi_codec_pdata hcd; member 446 bool has_capture = !hcp->hcd.no_i2s_capture; in hdmi_codec_startup() 447 bool has_playback = !hcp->hcd.no_i2s_playback; in hdmi_codec_startup() 460 if (hcp->hcd.ops->audio_startup) { in hdmi_codec_startup() 461 ret = hcp->hcd.ops->audio_startup(dai->dev->parent, hcp->hcd.data); in hdmi_codec_startup() 466 if (tx && hcp->hcd.ops->get_eld) { in hdmi_codec_startup() 467 ret = hcp->hcd.ops->get_eld(dai->dev->parent, hcp->hcd.data, in hdmi_codec_startup() 492 bool has_capture = !hcp->hcd.no_i2s_capture; in hdmi_codec_shutdown() 493 bool has_playback = !hcp->hcd.no_i2s_playback; in hdmi_codec_shutdown() 499 hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data); in hdmi_codec_shutdown() [all …]
|