/Linux-v5.10/drivers/usb/host/ |
D | ehci-hcd.c | 3 * Enhanced Host Controller Interface (EHCI) driver for USB. 43 * EHCI hc_driver implementation ... experimental, incomplete. 57 #define DRIVER_DESC "USB 2.0 'Enhanced' Host Controller (EHCI) Driver" 97 #include "ehci.h" 110 static unsigned ehci_moschip_read_frame_index(struct ehci_hcd *ehci) in ehci_moschip_read_frame_index() argument 114 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index() 116 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index() 120 static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci) in ehci_read_frame_index() argument 122 if (ehci->frame_index_bug) in ehci_read_frame_index() 123 return ehci_moschip_read_frame_index(ehci); in ehci_read_frame_index() [all …]
|
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 …]
|
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 …]
|
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 …]
|
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 …]
|
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 …]
|
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 "ehci-fsl" 153 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in fsl_ehci_drv_probe() local 156 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", in fsl_ehci_drv_probe() 157 hcd, ehci, hcd->usb_phy); in fsl_ehci_drv_probe() 161 &ehci_to_hcd(ehci)->self); in fsl_ehci_drv_probe() 202 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_setup_phy() local 212 portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy() [all …]
|
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 …]
|
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 44 qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill() 45 qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32)); in qtd_fill() 56 qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill() 57 qtd->hw_buf_hi[i] = cpu_to_hc32(ehci, in qtd_fill() 70 qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token); in qtd_fill() [all …]
|
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"; 33 * This is the list of PCI IDs for the devices that have EHCI USB class and 60 static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) in ehci_pci_reinit() argument 65 * (currently just BIOS handoff) allowed starting with EHCI 0.96 in ehci_pci_reinit() 71 ehci_dbg(ehci, "MWI active\n"); in ehci_pci_reinit() 79 ehci_writel(ehci, INTEL_QUARK_X1000_EHCI_MAX_THRESHOLD, in ehci_pci_reinit() 80 ehci->regs->intel_quark_x1000_insnreg01); in ehci_pci_reinit() [all …]
|
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() 66 status_reg = &ehci->regs->port_status[(wIndex & 0xff) - 1]; in ehci_brcm_hub_control() 74 ehci->reset_done[wIndex-1] && in ehci_brcm_hub_control() [all …]
|
D | ehci-tegra.c | 3 * EHCI-compliant USB host controller driver for NVIDIA Tegra SoCs 29 #include "ehci.h" 35 #define DRIVER_DESC "Tegra EHCI driver" 36 #define DRV_NAME "tegra-ehci" 104 struct ehci_hcd *ehci, in tegra_ehci_internal_port_reset() argument 114 spin_lock_irqsave(&ehci->lock, flags); in tegra_ehci_internal_port_reset() 115 saved_usbintr = ehci_readl(ehci, &ehci->regs->intr_enable); in tegra_ehci_internal_port_reset() 117 ehci_writel(ehci, 0, &ehci->regs->intr_enable); in tegra_ehci_internal_port_reset() 118 spin_unlock_irqrestore(&ehci->lock, flags); in tegra_ehci_internal_port_reset() 125 temp = ehci_readl(ehci, portsc_reg); in tegra_ehci_internal_port_reset() [all …]
|
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" 57 static const char hcd_name[] = "ehci-platform"; 63 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_platform_reset() local 66 ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug; in ehci_platform_reset() 74 ehci->caps = hcd->regs + pdata->caps_offset; in ehci_platform_reset() 80 ehci->need_io_watchdog = 0; in ehci_platform_reset() 82 if (of_device_is_compatible(pdev->dev.of_node, "brcm,xgs-iproc-ehci")) in ehci_platform_reset() [all …]
|
D | ehci.h | 9 /* definitions used for the EHCI driver */ 92 * ehci-timer.c) in parallel with this list. 266 static inline struct usb_hcd *ehci_to_hcd(struct ehci_hcd *ehci) in ehci_to_hcd() argument 268 return container_of((void *) ehci, struct usb_hcd, hcd_priv); in ehci_to_hcd() 277 #define QTD_NEXT(ehci, dma) cpu_to_hc32(ehci, (u32)dma) argument 280 * EHCI Specification 0.95 Section 3.5 288 /* first part defined by EHCI spec */ 289 __hc32 hw_next; /* see EHCI 3.5.1 */ 290 __hc32 hw_alt_next; /* see EHCI 3.5.2 */ 291 __hc32 hw_token; /* see EHCI 3.5.3 */ [all …]
|
D | Kconfig | 119 Enables support for XHCI, EHCI and OHCI host controllers 123 modules will be called ohci-platform.ko, ehci-brcm.ko and 130 tristate "EHCI HCD (USB 2.0) support" 133 The Enhanced Host Controller Interface (EHCI) is standard for USB 2.0 138 EHCI controllers are packaged with "companion" host controllers (OHCI 140 will connect to EHCI if the device is high speed, otherwise they 141 connect to a companion controller. If you configure EHCI, you should 146 You may want to read <file:Documentation/usb/ehci.rst>. 149 module will be called ehci-hcd. 155 Some EHCI chips have vendor-specific extensions to integrate [all …]
|
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() 154 ehci->big_endian_mmio = 1; in ehci_hcd_ppc_of_probe() [all …]
|
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 …]
|
D | ehci-mxc.c | 18 #include <linux/platform_data/usb-ehci-mxc.h> 19 #include "ehci.h" 21 #define DRIVER_DESC "Freescale On-Chip EHCI Host driver" 23 static const char hcd_name[] = "ehci-mxc"; 45 struct ehci_hcd *ehci; in ehci_mxc_drv_probe() local 70 ehci = hcd_to_ehci(hcd); in ehci_mxc_drv_probe() 71 priv = (struct ehci_mxc_priv *) ehci->priv; in ehci_mxc_drv_probe() 106 /* EHCI registers start at offset 0x100 */ in ehci_mxc_drv_probe() 107 ehci->caps = hcd->regs + 0x100; in ehci_mxc_drv_probe() 108 ehci->regs = hcd->regs + 0x100 + in ehci_mxc_drv_probe() [all …]
|
D | ehci-pmcmsp.c | 3 * PMC MSP EHCI (Host Controller Driver) for USB. 39 static void usb_hcd_tdi_set_mode(struct ehci_hcd *ehci) in usb_hcd_tdi_set_mode() argument 45 struct ehci_regs *reg_base = ehci->regs; in usb_hcd_tdi_set_mode() 53 val = ehci_readl(ehci, (u32 *)base); in usb_hcd_tdi_set_mode() 54 ehci_writel(ehci, (val | USB_CTRL_MODE_STREAM_DISABLE), in usb_hcd_tdi_set_mode() 58 val = ehci_readl(ehci, (u32 *)statreg); in usb_hcd_tdi_set_mode() 60 ehci_writel(ehci, val, (u32 *)statreg); in usb_hcd_tdi_set_mode() 63 ehci_writel(ehci, USB_CTRL_FIFO_THRESH, (u32 *)fiforeg); in usb_hcd_tdi_set_mode() 72 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_msp_setup() local 75 ehci->big_endian_mmio = 1; in ehci_msp_setup() [all …]
|
D | ehci-mv.c | 20 #include "ehci.h" 30 /* Which mode does this ehci running OTG/Host ? */ 71 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in mv_ehci_reset() local 76 dev_err(dev, "Can not find private ehci data\n"); in mv_ehci_reset() 87 status = ehci_readl(ehci, &ehci->regs->port_status[0]); in mv_ehci_reset() 89 ehci_writel(ehci, status, &ehci->regs->port_status[0]); in mv_ehci_reset() 91 ehci_writel(ehci, status, &ehci->regs->port_status[0]); in mv_ehci_reset() 108 struct ehci_hcd *ehci; in mv_ehci_probe() local 174 ehci = hcd_to_ehci(hcd); in mv_ehci_probe() 175 ehci->caps = (struct ehci_caps __iomem *) ehci_mv->cap_regs; in mv_ehci_probe() [all …]
|
D | Makefile | 40 obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o 41 obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o 42 obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o 43 obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o 44 obj-$(CONFIG_USB_EHCI_HCD_NPCM7XX) += ehci-npcm7xx.o 45 obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o 46 obj-$(CONFIG_USB_EHCI_HCD_ORION) += ehci-orion.o 47 obj-$(CONFIG_USB_EHCI_HCD_SPEAR) += ehci-spear.o 48 obj-$(CONFIG_USB_EHCI_HCD_STI) += ehci-st.o 49 obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o [all …]
|
/Linux-v5.10/drivers/usb/chipidea/ |
D | host.c | 18 #include "../host/ehci.h" 34 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ci_portpower() local 35 struct ehci_ci_priv *priv = (struct ehci_ci_priv *)ehci->priv; in ehci_ci_portpower() 39 int port = HCS_N_PORTS(ehci->hcs_params); in ehci_ci_portpower() 75 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ci_reset() local 82 ehci->need_io_watchdog = 0; in ehci_ci_reset() 110 struct ehci_hcd *ehci; in host_start() local 136 ehci = hcd_to_ehci(hcd); in host_start() 137 ehci->caps = ci->hw_bank.cap; in host_start() 138 ehci->has_hostpc = ci->hw_bank.lpm; in host_start() [all …]
|
/Linux-v5.10/Documentation/usb/ |
D | ehci.rst | 2 EHCI driver 7 The EHCI driver is used to talk to high speed USB 2.0 devices using 19 into an EHCI controller, they are given to a USB 1.1 "companion" 22 interact with the EHCI controller through a "Transaction Translator" 27 of EHCI from (in alphabetical order): Intel, NEC, Philips, and VIA. 28 Other EHCI implementations are becoming available from other vendors; 38 Note that USB 2.0 support involves more than just EHCI. It requires 68 since EHCI represents these with a different data structure. So for now, 79 The EHCI root hub code hands off USB 1.1 devices to its companion 82 just because the EHCI driver is also present. [all …]
|
/Linux-v5.10/Documentation/devicetree/bindings/usb/ |
D | generic-ehci.yaml | 4 $id: http://devicetree.org/schemas/usb/generic-ehci.yaml# 7 title: USB EHCI Controller Device Tree Bindings 19 const: ibm,usb-ehci-440epx 28 const: generic-ehci 72 Set this flag if EHCI has a Transaction Translator built into 78 Set this flag to force EHCI reset after resume. 104 compatible = "ibm,usb-ehci-440epx", "generic-ehci"; 113 compatible = "allwinner,sun4i-a10-ehci", "generic-ehci";
|
/Linux-v5.10/Documentation/devicetree/bindings/mfd/ |
D | omap-usb-host.txt | 18 "ehci-phy", 19 "ehci-tll", 20 "ehci-hsic", 66 The OMAP HS USB Host subsystem contains EHCI and OHCI controllers. 67 See Documentation/devicetree/bindings/usb/ehci-omap.txt and 87 usbhsehci: ehci@4a064c00 { 88 compatible = "ti,ehci-omap", "usb-ehci"; 96 port1-mode = "ehci-phy"; 97 port2-mode = "ehci-tll"; 98 port3-mode = "ehci-phy";
|