/openbmc/linux/drivers/usb/host/ |
H A D | ehci-hcd.c | 3 * Enhanced Host Controller Interface (EHCI) driver for USB. 44 * EHCI hc_driver implementation ... experimental, incomplete. 58 #define DRIVER_DESC "USB 2.0 'Enhanced' Host Controller (EHCI) Driver" 98 #include "ehci.h" 111 static unsigned ehci_moschip_read_frame_index(struct ehci_hcd *ehci) in ehci_moschip_read_frame_index() argument 115 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index() 117 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index() 121 static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci) in ehci_read_frame_index() argument 123 if (ehci->frame_index_bug) in ehci_read_frame_index() 124 return ehci_moschip_read_frame_index(ehci); in ehci_read_frame_index() [all …]
|
H A D | ehci-hub.c | 6 /* this file is part of ehci-hcd.c */ 11 * EHCI Root Hub ... the nonsharable stuff 22 static void unlink_empty_async_suspended(struct ehci_hcd *ehci); 33 static void ehci_handover_companion_ports(struct ehci_hcd *ehci) in ehci_handover_companion_ports() argument 39 struct usb_hcd *hcd = ehci_to_hcd(ehci); in ehci_handover_companion_ports() 41 if (!ehci->owned_ports) in ehci_handover_companion_ports() 55 port = HCS_N_PORTS(ehci->hcs_params); in ehci_handover_companion_ports() 57 if (test_bit(port, &ehci->owned_ports)) { in ehci_handover_companion_ports() 58 reg = &ehci->regs->port_status[port]; in ehci_handover_companion_ports() 59 status = ehci_readl(ehci, reg) & ~PORT_RWC_BITS; in ehci_handover_companion_ports() [all …]
|
H A D | ehci-timer.c | 6 /* This file is part of ehci-hcd.c */ 11 static void ehci_set_command_bit(struct ehci_hcd *ehci, u32 bit) in ehci_set_command_bit() argument 13 ehci->command |= bit; in ehci_set_command_bit() 14 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_set_command_bit() 17 ehci_readl(ehci, &ehci->regs->command); in ehci_set_command_bit() 21 static void ehci_clear_command_bit(struct ehci_hcd *ehci, u32 bit) in ehci_clear_command_bit() argument 23 ehci->command &= ~bit; in ehci_clear_command_bit() 24 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_clear_command_bit() 27 ehci_readl(ehci, &ehci->regs->command); in ehci_clear_command_bit() 33 * EHCI timer support... Now using hrtimers. [all …]
|
H A D | ehci-mem.c | 6 /* this file is part of ehci-hcd.c */ 25 static inline void ehci_qtd_init(struct ehci_hcd *ehci, struct ehci_qtd *qtd, in ehci_qtd_init() argument 30 qtd->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); in ehci_qtd_init() 31 qtd->hw_next = EHCI_LIST_END(ehci); in ehci_qtd_init() 32 qtd->hw_alt_next = EHCI_LIST_END(ehci); in ehci_qtd_init() 36 static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, gfp_t flags) in ehci_qtd_alloc() argument 41 qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma); in ehci_qtd_alloc() 43 ehci_qtd_init(ehci, qtd, dma); in ehci_qtd_alloc() 48 static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd) in ehci_qtd_free() argument 50 dma_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma); in ehci_qtd_free() [all …]
|
H A D | ehci-sched.c | 7 /* this file is part of ehci-hcd.c */ 12 * EHCI scheduled transaction support: interrupt, iso, split iso 13 * These are called "periodic" transactions in the EHCI spec. 32 periodic_next_shadow(struct ehci_hcd *ehci, union ehci_shadow *periodic, in periodic_next_shadow() argument 35 switch (hc32_to_cpu(ehci, tag)) { in periodic_next_shadow() 49 shadow_next_periodic(struct ehci_hcd *ehci, union ehci_shadow *periodic, in shadow_next_periodic() argument 52 switch (hc32_to_cpu(ehci, tag)) { in shadow_next_periodic() 62 /* caller must hold ehci->lock */ 63 static void periodic_unlink(struct ehci_hcd *ehci, unsigned frame, void *ptr) in periodic_unlink() argument 65 union ehci_shadow *prev_p = &ehci->pshadow[frame]; in periodic_unlink() [all …]
|
H A D | ehci-dbg.c | 6 /* this file is part of ehci-hcd.c */ 13 * see EHCI spec, Table 2-4 for each value 15 static void dbg_hcs_params(struct ehci_hcd *ehci, char *label) in dbg_hcs_params() argument 17 u32 params = ehci_readl(ehci, &ehci->caps->hcs_params); in dbg_hcs_params() 19 ehci_dbg(ehci, in dbg_hcs_params() 29 /* Port routing, per EHCI 0.95 Spec, Section 2.2.5 */ in dbg_hcs_params() 37 byte = readb(&ehci->caps->portroute[(i >> 1)]); in dbg_hcs_params() 42 ehci_dbg(ehci, "%s portroute %s\n", label, buf); in dbg_hcs_params() 49 * see EHCI Spec, Table 2-5 for each value 51 static void dbg_hcc_params(struct ehci_hcd *ehci, char *label) in dbg_hcc_params() argument [all …]
|
H A D | ehci-fsl.c | 28 #include "ehci.h" 29 #include "ehci-fsl.h" 31 #define DRIVER_DESC "Freescale EHCI Host controller driver" 32 #define DRV_NAME "fsl-ehci" 147 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in fsl_ehci_drv_probe() local 150 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", in fsl_ehci_drv_probe() 151 hcd, ehci, hcd->usb_phy); in fsl_ehci_drv_probe() 155 &ehci_to_hcd(ehci)->self); in fsl_ehci_drv_probe() 196 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_setup_phy() local 206 portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy() [all …]
|
H A D | ehci-sysfs.c | 6 /* this file is part of ehci-hcd.c */ 14 struct ehci_hcd *ehci; in companion_show() local 19 ehci = hcd_to_ehci(dev_get_drvdata(dev)); in companion_show() 20 nports = HCS_N_PORTS(ehci->hcs_params); in companion_show() 23 if (test_bit(index, &ehci->companion_ports)) { in companion_show() 35 * return control of the port to the EHCI controller. 41 struct ehci_hcd *ehci; in companion_store() local 44 ehci = hcd_to_ehci(dev_get_drvdata(dev)); in companion_store() 50 new_owner = 0; /* Owned by EHCI */ in companion_store() 52 if (portnum <= 0 || portnum > HCS_N_PORTS(ehci->hcs_params)) in companion_store() [all …]
|
H A D | ehci-pci.c | 3 * EHCI HCD (Host Controller Driver) PCI Bus Glue. 14 #include "ehci.h" 17 #define DRIVER_DESC "EHCI PCI platform driver" 19 static const char hcd_name[] = "ehci-pci"; 36 * This is the list of PCI IDs for the devices that have EHCI USB class and 63 static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) in ehci_pci_reinit() argument 68 * (currently just BIOS handoff) allowed starting with EHCI 0.96 in ehci_pci_reinit() 74 ehci_dbg(ehci, "MWI active\n"); in ehci_pci_reinit() 82 ehci_writel(ehci, INTEL_QUARK_X1000_EHCI_MAX_THRESHOLD, in ehci_pci_reinit() 83 ehci->regs->intel_quark_x1000_insnreg01); in ehci_pci_reinit() [all …]
|
H A D | ehci-q.c | 6 /* this file is part of ehci-hcd.c */ 11 * EHCI hardware queue manipulation ... the core. QH/QTD manipulation. 20 * an ongoing challenge. That's in "ehci-sched.c". 30 /* PID Codes that are used here, from EHCI specification, Table 3-16. */ 37 qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf, in qtd_fill() argument 45 qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill() 46 qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32)); in qtd_fill() 57 qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill() 58 qtd->hw_buf_hi[i] = cpu_to_hc32(ehci, in qtd_fill() 71 qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token); in qtd_fill() [all …]
|
H A D | ehci-brcm.c | 15 #include "ehci.h" 27 static inline void ehci_brcm_wait_for_sof(struct ehci_hcd *ehci, u32 delay) in ehci_brcm_wait_for_sof() argument 29 u32 frame_idx = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_brcm_wait_for_sof() 34 res = readl_relaxed_poll_timeout(&ehci->regs->frame_index, val, in ehci_brcm_wait_for_sof() 37 ehci_err(ehci, "Error waiting for SOF\n"); in ehci_brcm_wait_for_sof() 43 * The EHCI controller has a bug where it can violate the SOF 60 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_brcm_hub_control() local 61 int ports = HCS_N_PORTS(ehci->hcs_params); in ehci_brcm_hub_control() 70 status_reg = &ehci->regs->port_status[temp]; in ehci_brcm_hub_control() 78 ehci->reset_done[wIndex-1] && in ehci_brcm_hub_control() [all …]
|
H A D | ehci-platform.c | 3 * Generic platform ehci driver 12 * Derived from the EHCI-PCI driver 39 #include "ehci.h" 41 #define DRIVER_DESC "EHCI generic platform driver" 60 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_platform_reset() local 63 ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug; in ehci_platform_reset() 71 ehci->caps = hcd->regs + pdata->caps_offset; in ehci_platform_reset() 77 ehci->need_io_watchdog = 0; in ehci_platform_reset() 79 if (of_device_is_compatible(pdev->dev.of_node, "brcm,xgs-iproc-ehci")) in ehci_platform_reset() 80 ehci_writel(ehci, BCM_USB_FIFO_THRESHOLD, in ehci_platform_reset() [all …]
|
H A D | ehci.h | 9 /* definitions used for the EHCI driver */ 92 * ehci-timer.c) in parallel with this list. 270 static inline struct usb_hcd *ehci_to_hcd(struct ehci_hcd *ehci) in ehci_to_hcd() argument 272 return container_of((void *) ehci, struct usb_hcd, hcd_priv); in ehci_to_hcd() 281 #define QTD_NEXT(ehci, dma) cpu_to_hc32(ehci, (u32)dma) argument 284 * EHCI Specification 0.95 Section 3.5 292 /* first part defined by EHCI spec */ 293 __hc32 hw_next; /* see EHCI 3.5.1 */ 294 __hc32 hw_alt_next; /* see EHCI 3.5.2 */ 295 __hc32 hw_token; /* see EHCI 3.5.3 */ [all …]
|
H A D | Kconfig | 128 Enables support for XHCI, EHCI and OHCI host controllers 132 modules will be called ohci-platform.ko, ehci-brcm.ko and 139 tristate "EHCI HCD (USB 2.0) support" 142 The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 147 EHCI controllers are packaged with "companion" host controllers (OHCI 149 will connect to EHCI if the device is high speed, otherwise they 150 connect to a companion controller. If you configure EHCI, you should 155 You may want to read <file:Documentation/usb/ehci.rst>. 158 module will be called ehci-hcd. 164 Some EHCI chips have vendor-specific extensions to integrate [all …]
|
H A D | ehci-ppc-of.c | 3 * EHCI HCD (Host Controller Driver) for USB. 5 * Bus Glue for PPC On-Chip EHCI driver on the of_platform bus 10 * Based on "ehci-ppc-soc.c" by Stefan Roese <sr@denx.de> 27 .product_desc = "OF EHCI", 98 struct ehci_hcd *ehci = NULL; in ehci_hcd_ppc_of_probe() local 135 ehci = hcd_to_ehci(hcd); in ehci_hcd_ppc_of_probe() 140 ehci->ohci_hcctrl_reg = in ehci_hcd_ppc_of_probe() 146 if (!ehci->ohci_hcctrl_reg) { in ehci_hcd_ppc_of_probe() 149 ehci->has_amcc_usb23 = 1; in ehci_hcd_ppc_of_probe() 155 ehci->big_endian_mmio = 1; in ehci_hcd_ppc_of_probe() [all …]
|
H A D | ehci-grlib.c | 3 * Driver for Aeroflex Gaisler GRLIB GRUSBHC EHCI host controller 9 * Based on ehci-ppc-of.c which is: 11 * and in turn based on "ehci-ppc-soc.c" by Stefan Roese <sr@denx.de> 26 .product_desc = "GRLIB GRUSBHC EHCI", 76 struct ehci_hcd *ehci = NULL; in ehci_hcd_grlib_probe() local 85 dev_dbg(&op->dev, "initializing GRUSBHC EHCI USB Controller\n"); in ehci_hcd_grlib_probe() 94 "GRUSBHC EHCI USB"); in ehci_hcd_grlib_probe() 115 ehci = hcd_to_ehci(hcd); in ehci_hcd_grlib_probe() 117 ehci->caps = hcd->regs; in ehci_hcd_grlib_probe() 120 hc_capbase = ehci_readl(ehci, &ehci->caps->hc_capbase); in ehci_hcd_grlib_probe() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/usb/ |
H A D | generic-ehci.yaml | 4 $id: http://devicetree.org/schemas/usb/generic-ehci.yaml# 7 title: USB EHCI Controller 19 const: ibm,usb-ehci-440epx 30 - allwinner,sun4i-a10-ehci 31 - allwinner,sun50i-a64-ehci 32 - allwinner,sun50i-h6-ehci 33 - allwinner,sun50i-h616-ehci 34 - allwinner,sun5i-a13-ehci 35 - allwinner,sun6i-a31-ehci 36 - allwinner,sun7i-a20-ehci [all …]
|
/openbmc/u-boot/drivers/usb/host/ |
H A D | ehci-fsl.c | 14 #include <usb/ehci-ci.h> 20 #include "ehci.h" 30 struct ehci_ctrl ehci; member 38 static int ehci_fsl_init(struct ehci_fsl_priv *priv, struct usb_ehci *ehci, 41 static int ehci_fsl_init(int index, struct usb_ehci *ehci, 46 static int usb_phy_clk_valid(struct usb_ehci *ehci) in usb_phy_clk_valid() argument 48 if (!((in_be32(&ehci->control) & PHY_CLK_VALID) || in usb_phy_clk_valid() 49 in_be32(&ehci->prictrl))) { in usb_phy_clk_valid() 75 struct usb_ehci *ehci = NULL; in ehci_fsl_init_after_reset() local 77 ehci); in ehci_fsl_init_after_reset() [all …]
|
H A D | Makefile | 22 obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o 23 obj-$(CONFIG_USB_EHCI_ARMADA100) += ehci-armada100.o utmi-armada100.o 24 obj-$(CONFIG_USB_EHCI_ASPEED) += ehci-aspeed.o 25 obj-$(CONFIG_USB_EHCI_ATMEL) += ehci-atmel.o 26 obj-$(CONFIG_USB_EHCI_FSL) += ehci-fsl.o 27 obj-$(CONFIG_USB_EHCI_FARADAY) += ehci-faraday.o 28 obj-$(CONFIG_USB_EHCI_GENERIC) += ehci-generic.o 29 obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o 30 obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o 31 obj-$(CONFIG_USB_EHCI_MXS) += ehci-mxs.o [all …]
|
H A D | Kconfig | 100 bool "EHCI HCD (USB 2.0) support" 104 The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 109 EHCI controllers are packaged with "companion" host controllers (OHCI 111 will connect to EHCI if the device is high speed, otherwise they 112 connect to a companion controller. If you configure EHCI, you should 117 You may want to read <file:Documentation/usb/ehci.txt>. 122 bool "Support for Aspeed on-chip EHCI USB controller" 126 Enables support for the on-chip EHCI controller on ASPEED chips. 129 bool "Support for Atmel on-chip EHCI USB controller" 133 Enables support for the on-chip EHCI controller on Atmel chips. [all …]
|
H A D | ehci-msm.c | 3 * Qualcomm EHCI driver 16 #include <usb/ehci-ci.h> 22 #include "ehci.h" 25 struct ehci_ctrl ctrl; /* Needed by EHCI */ 26 struct usb_ehci *ehci; /* Start of IP core*/ member 34 struct usb_ehci *ehci = p->ehci; in msm_init_after_reset() local 39 writel(CM_HOST, &ehci->usbmode); in msm_init_after_reset() 51 struct usb_ehci *ehci = p->ehci; in ehci_usb_probe() local 57 hccr = (struct ehci_hccr *)((phys_addr_t)&ehci->caplength); in ehci_usb_probe() 76 struct usb_ehci *ehci = p->ehci; in ehci_usb_remove() local [all …]
|
H A D | ehci-vf.c | 6 * Based on ehci-mx6 driver 21 #include <usb/ehci-ci.h> 25 #include "ehci.h" 84 static void usb_phy_enable(int index, struct usb_ehci *ehci) in usb_phy_enable() argument 92 usb_cmd = (void __iomem *)&ehci->usbcmd; in usb_phy_enable() 139 int ehci_vf_common_init(struct usb_ehci *ehci, int index) in ehci_vf_common_init() argument 151 usb_phy_enable(index, ehci); in ehci_vf_common_init() 160 struct usb_ehci *ehci; in ehci_hcd_init() local 167 ehci = (struct usb_ehci *)nc_reg_bases[index]; in ehci_hcd_init() 173 *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); in ehci_hcd_init() [all …]
|
/openbmc/qemu/hw/usb/ |
H A D | hcd-ehci.c | 2 * QEMU USB EHCI Emulation 11 * EHCI project was started by Mark Burkley, with contributions by 32 #include "hw/usb/ehci-regs.h" 33 #include "hw/usb/hcd-ehci.h" 85 /* nifty macros from Arnon's EHCI version */ 373 static inline int get_dwords(EHCIState *ehci, uint32_t addr, in get_dwords() argument 378 if (!ehci->as) { in get_dwords() 379 ehci_raise_irq(ehci, USBSTS_HSE); in get_dwords() 380 ehci->usbcmd &= ~USBCMD_RUNSTOP; in get_dwords() 386 dma_memory_read(ehci->as, addr, buf, sizeof(*buf), in get_dwords() [all …]
|
/openbmc/qemu/tests/qtest/ |
H A D | usb-hcd-ehci-test.c | 2 * QTest testcase for USB EHCI 14 #include "hw/usb/ehci-regs.h" 98 /* hands over all ports from companion uhci to ehci */ in pci_ehci_config() 106 uhci_port_test(&uhci1, 0, 0); /* usb-tablet, @ehci */ in pci_uhci_port_2() 107 uhci_port_test(&uhci1, 1, 0); /* usb-storage, @ehci */ in pci_uhci_port_2() 142 usb_test_hotplug(global_qtest, "ich9-ehci-1", "3", pci_ehci_port_3_hotplug); in pci_ehci_port_hotplug() 157 qtest_add_func("/ehci/pci/uhci-port-1", pci_uhci_port_1); in main() 158 qtest_add_func("/ehci/pci/ehci-port-1", pci_ehci_port_1); in main() 159 qtest_add_func("/ehci/pci/ehci-config", pci_ehci_config); in main() 160 qtest_add_func("/ehci/pci/uhci-port-2", pci_uhci_port_2); in main() [all …]
|
/openbmc/linux/drivers/usb/chipidea/ |
H A D | host.c | 18 #include "../host/ehci.h" 39 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ci_portpower() local 40 struct ehci_ci_priv *priv = (struct ehci_ci_priv *)ehci->priv; in ehci_ci_portpower() 44 int port = HCS_N_PORTS(ehci->hcs_params); in ehci_ci_portpower() 87 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ci_reset() local 94 ehci->need_io_watchdog = 0; in ehci_ci_reset() 122 struct ehci_hcd *ehci; in host_start() local 148 ehci = hcd_to_ehci(hcd); in host_start() 149 ehci->caps = ci->hw_bank.cap; in host_start() 150 ehci->has_hostpc = ci->hw_bank.lpm; in host_start() [all …]
|