/drivers/usb/host/ |
D | ehci-hcd.c | 123 static unsigned ehci_moschip_read_frame_index(struct ehci_hcd *ehci) in ehci_moschip_read_frame_index() argument 127 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index() 129 uf = ehci_readl(ehci, &ehci->regs->frame_index); in ehci_moschip_read_frame_index() 133 static inline unsigned ehci_read_frame_index(struct ehci_hcd *ehci) in ehci_read_frame_index() argument 135 if (ehci->frame_index_bug) in ehci_read_frame_index() 136 return ehci_moschip_read_frame_index(ehci); in ehci_read_frame_index() 137 return ehci_readl(ehci, &ehci->regs->frame_index); in ehci_read_frame_index() 161 int ehci_handshake(struct ehci_hcd *ehci, void __iomem *ptr, in ehci_handshake() argument 167 result = ehci_readl(ehci, ptr); in ehci_handshake() 181 static int tdi_in_host_mode (struct ehci_hcd *ehci) in tdi_in_host_mode() argument [all …]
|
D | ehci-timer.c | 20 static void ehci_set_command_bit(struct ehci_hcd *ehci, u32 bit) in ehci_set_command_bit() argument 22 ehci->command |= bit; in ehci_set_command_bit() 23 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_set_command_bit() 26 ehci_readl(ehci, &ehci->regs->command); in ehci_set_command_bit() 30 static void ehci_clear_command_bit(struct ehci_hcd *ehci, u32 bit) in ehci_clear_command_bit() argument 32 ehci->command &= ~bit; in ehci_clear_command_bit() 33 ehci_writel(ehci, ehci->command, &ehci->regs->command); in ehci_clear_command_bit() 36 ehci_readl(ehci, &ehci->regs->command); in ehci_clear_command_bit() 84 static void ehci_enable_event(struct ehci_hcd *ehci, unsigned event, in ehci_enable_event() argument 87 ktime_t *timeout = &ehci->hr_timeouts[event]; in ehci_enable_event() [all …]
|
D | ehci-hub.c | 44 static void ehci_handover_companion_ports(struct ehci_hcd *ehci) in ehci_handover_companion_ports() argument 50 struct usb_hcd *hcd = ehci_to_hcd(ehci); in ehci_handover_companion_ports() 52 if (!ehci->owned_ports) in ehci_handover_companion_ports() 66 port = HCS_N_PORTS(ehci->hcs_params); in ehci_handover_companion_ports() 68 if (test_bit(port, &ehci->owned_ports)) { in ehci_handover_companion_ports() 69 reg = &ehci->regs->port_status[port]; in ehci_handover_companion_ports() 70 status = ehci_readl(ehci, reg) & ~PORT_RWC_BITS; in ehci_handover_companion_ports() 72 ehci_port_power(ehci, port, true); in ehci_handover_companion_ports() 79 spin_lock_irq(&ehci->lock); in ehci_handover_companion_ports() 80 port = HCS_N_PORTS(ehci->hcs_params); in ehci_handover_companion_ports() [all …]
|
D | ehci-mem.c | 38 static inline void ehci_qtd_init(struct ehci_hcd *ehci, struct ehci_qtd *qtd, in ehci_qtd_init() argument 43 qtd->hw_token = cpu_to_hc32(ehci, QTD_STS_HALT); in ehci_qtd_init() 44 qtd->hw_next = EHCI_LIST_END(ehci); in ehci_qtd_init() 45 qtd->hw_alt_next = EHCI_LIST_END(ehci); in ehci_qtd_init() 49 static struct ehci_qtd *ehci_qtd_alloc (struct ehci_hcd *ehci, gfp_t flags) in ehci_qtd_alloc() argument 54 qtd = dma_pool_alloc (ehci->qtd_pool, flags, &dma); in ehci_qtd_alloc() 56 ehci_qtd_init(ehci, qtd, dma); in ehci_qtd_alloc() 61 static inline void ehci_qtd_free (struct ehci_hcd *ehci, struct ehci_qtd *qtd) in ehci_qtd_free() argument 63 dma_pool_free (ehci->qtd_pool, qtd, qtd->qtd_dma); in ehci_qtd_free() 67 static void qh_destroy(struct ehci_hcd *ehci, struct ehci_qh *qh) in qh_destroy() argument [all …]
|
D | ehci-q.c | 50 qtd_fill(struct ehci_hcd *ehci, struct ehci_qtd *qtd, dma_addr_t buf, in qtd_fill() argument 57 qtd->hw_buf[0] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill() 58 qtd->hw_buf_hi[0] = cpu_to_hc32(ehci, (u32)(addr >> 32)); in qtd_fill() 69 qtd->hw_buf[i] = cpu_to_hc32(ehci, (u32)addr); in qtd_fill() 70 qtd->hw_buf_hi[i] = cpu_to_hc32(ehci, in qtd_fill() 83 qtd->hw_token = cpu_to_hc32(ehci, (count << 16) | token); in qtd_fill() 92 qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd) in qh_update() argument 99 hw->hw_qtd_next = QTD_NEXT(ehci, qtd->qtd_dma); in qh_update() 100 hw->hw_alt_next = EHCI_LIST_END(ehci); in qh_update() 107 if (!(hw->hw_info1 & cpu_to_hc32(ehci, QH_TOGGLE_CTL))) { in qh_update() [all …]
|
D | ehci-sched.c | 45 periodic_next_shadow(struct ehci_hcd *ehci, union ehci_shadow *periodic, in periodic_next_shadow() argument 48 switch (hc32_to_cpu(ehci, tag)) { in periodic_next_shadow() 62 shadow_next_periodic(struct ehci_hcd *ehci, union ehci_shadow *periodic, in shadow_next_periodic() argument 65 switch (hc32_to_cpu(ehci, tag)) { in shadow_next_periodic() 76 static void periodic_unlink (struct ehci_hcd *ehci, unsigned frame, void *ptr) in periodic_unlink() argument 78 union ehci_shadow *prev_p = &ehci->pshadow[frame]; in periodic_unlink() 79 __hc32 *hw_p = &ehci->periodic[frame]; in periodic_unlink() 84 prev_p = periodic_next_shadow(ehci, prev_p, in periodic_unlink() 85 Q_NEXT_TYPE(ehci, *hw_p)); in periodic_unlink() 86 hw_p = shadow_next_periodic(ehci, &here, in periodic_unlink() [all …]
|
D | ehci-dbg.c | 27 static void dbg_hcs_params (struct ehci_hcd *ehci, char *label) in dbg_hcs_params() argument 29 u32 params = ehci_readl(ehci, &ehci->caps->hcs_params); in dbg_hcs_params() 31 ehci_dbg (ehci, in dbg_hcs_params() 50 byte = readb (&ehci->caps->portroute[(i>>1)]); in dbg_hcs_params() 55 ehci_dbg (ehci, "%s portroute %s\n", in dbg_hcs_params() 61 static inline void dbg_hcs_params (struct ehci_hcd *ehci, char *label) {} in dbg_hcs_params() argument 71 static void dbg_hcc_params (struct ehci_hcd *ehci, char *label) in dbg_hcc_params() argument 73 u32 params = ehci_readl(ehci, &ehci->caps->hcc_params); in dbg_hcc_params() 76 ehci_dbg (ehci, in dbg_hcc_params() 83 ehci_dbg (ehci, in dbg_hcc_params() [all …]
|
D | ehci-pci.c | 73 static int ehci_pci_reinit(struct ehci_hcd *ehci, struct pci_dev *pdev) in ehci_pci_reinit() argument 84 ehci_dbg(ehci, "MWI active\n"); in ehci_pci_reinit() 92 ehci_writel(ehci, INTEL_QUARK_X1000_EHCI_MAX_THRESHOLD, in ehci_pci_reinit() 93 ehci->regs->intel_quark_x1000_insnreg01); in ehci_pci_reinit() 102 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_pci_setup() local 107 ehci->caps = hcd->regs; in ehci_pci_setup() 123 ehci->big_endian_mmio = 1; in ehci_pci_setup() 125 ehci_warn(ehci, in ehci_pci_setup() 142 ehci_warn(ehci, "can't enable NVidia " in ehci_pci_setup() 151 ehci->no_selective_suspend = 1; in ehci_pci_setup() [all …]
|
D | ehci-fsl.c | 152 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in fsl_ehci_drv_probe() local 156 hcd, ehci, hcd->usb_phy); in fsl_ehci_drv_probe() 160 &ehci_to_hcd(ehci)->self); in fsl_ehci_drv_probe() 188 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_fsl_setup_phy() local 198 portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy() 251 ehci_writel(ehci, portsc, &ehci->regs->port_status[port_offset]); in ehci_fsl_setup_phy() 260 static int ehci_fsl_usb_setup(struct ehci_hcd *ehci) in ehci_fsl_usb_setup() argument 262 struct usb_hcd *hcd = ehci_to_hcd(ehci); in ehci_fsl_usb_setup() 283 ehci->has_fsl_hs_errata = 1; in ehci_fsl_usb_setup() 299 ehci->has_fsl_port_bug = 1; in ehci_fsl_usb_setup() [all …]
|
D | ehci-sysfs.c | 27 struct ehci_hcd *ehci; in show_companion() local 32 ehci = hcd_to_ehci(dev_get_drvdata(dev)); in show_companion() 33 nports = HCS_N_PORTS(ehci->hcs_params); in show_companion() 36 if (test_bit(index, &ehci->companion_ports)) { in show_companion() 54 struct ehci_hcd *ehci; in store_companion() local 57 ehci = hcd_to_ehci(dev_get_drvdata(dev)); in store_companion() 65 if (portnum <= 0 || portnum > HCS_N_PORTS(ehci->hcs_params)) in store_companion() 69 set_bit(portnum, &ehci->companion_ports); in store_companion() 71 clear_bit(portnum, &ehci->companion_ports); in store_companion() 72 set_owner(ehci, portnum, new_owner); in store_companion() [all …]
|
D | ehci.h | 275 static inline struct usb_hcd *ehci_to_hcd (struct ehci_hcd *ehci) in ehci_to_hcd() argument 277 return container_of ((void *) ehci, struct usb_hcd, hcd_priv); in ehci_to_hcd() 286 #define QTD_NEXT(ehci, dma) cpu_to_hc32(ehci, (u32)dma) argument 315 #define ACTIVE_BIT(ehci) cpu_to_hc32(ehci, QTD_STS_ACTIVE) argument 316 #define HALT_BIT(ehci) cpu_to_hc32(ehci, QTD_STS_HALT) argument 317 #define STATUS_BIT(ehci) cpu_to_hc32(ehci, QTD_STS_STS) argument 330 #define QTD_MASK(ehci) cpu_to_hc32 (ehci, ~0x1f) argument 337 #define Q_NEXT_TYPE(ehci,dma) ((dma) & cpu_to_hc32(ehci, 3 << 1)) argument 353 #define QH_NEXT(ehci,dma) (cpu_to_hc32(ehci, (((u32)dma)&~0x01f)|Q_TYPE_QH)) argument 356 #define EHCI_LIST_END(ehci) cpu_to_hc32(ehci, 1) /* "null pointer" to hw */ argument [all …]
|
D | ehci-tegra.c | 120 struct ehci_hcd *ehci, in tegra_ehci_internal_port_reset() argument 130 spin_lock_irqsave(&ehci->lock, flags); in tegra_ehci_internal_port_reset() 131 saved_usbintr = ehci_readl(ehci, &ehci->regs->intr_enable); in tegra_ehci_internal_port_reset() 133 ehci_writel(ehci, 0, &ehci->regs->intr_enable); in tegra_ehci_internal_port_reset() 134 spin_unlock_irqrestore(&ehci->lock, flags); in tegra_ehci_internal_port_reset() 141 temp = ehci_readl(ehci, portsc_reg); in tegra_ehci_internal_port_reset() 143 ehci_writel(ehci, temp, portsc_reg); in tegra_ehci_internal_port_reset() 146 ehci_writel(ehci, temp, portsc_reg); in tegra_ehci_internal_port_reset() 157 temp = ehci_readl(ehci, portsc_reg); in tegra_ehci_internal_port_reset() 170 ehci_writel(ehci, PORT_CSC, portsc_reg); in tegra_ehci_internal_port_reset() [all …]
|
D | ehci-ppc-of.c | 97 struct ehci_hcd *ehci = NULL; in ehci_hcd_ppc_of_probe() local 134 ehci = hcd_to_ehci(hcd); in ehci_hcd_ppc_of_probe() 139 ehci->ohci_hcctrl_reg = in ehci_hcd_ppc_of_probe() 145 if (!ehci->ohci_hcctrl_reg) { in ehci_hcd_ppc_of_probe() 148 ehci->has_amcc_usb23 = 1; in ehci_hcd_ppc_of_probe() 153 ehci->big_endian_mmio = 1; in ehci_hcd_ppc_of_probe() 154 ehci->big_endian_desc = 1; in ehci_hcd_ppc_of_probe() 157 ehci->big_endian_mmio = 1; in ehci_hcd_ppc_of_probe() 159 ehci->big_endian_desc = 1; in ehci_hcd_ppc_of_probe() 161 ehci->caps = hcd->regs; in ehci_hcd_ppc_of_probe() [all …]
|
D | ehci-pmcmsp.c | 43 static void usb_hcd_tdi_set_mode(struct ehci_hcd *ehci) in usb_hcd_tdi_set_mode() argument 49 struct ehci_regs *reg_base = ehci->regs; in usb_hcd_tdi_set_mode() 57 val = ehci_readl(ehci, (u32 *)base); in usb_hcd_tdi_set_mode() 58 ehci_writel(ehci, (val | USB_CTRL_MODE_STREAM_DISABLE), in usb_hcd_tdi_set_mode() 62 val = ehci_readl(ehci, (u32 *)statreg); in usb_hcd_tdi_set_mode() 64 ehci_writel(ehci, val, (u32 *)statreg); in usb_hcd_tdi_set_mode() 67 ehci_writel(ehci, USB_CTRL_FIFO_THRESH, (u32 *)fiforeg); in usb_hcd_tdi_set_mode() 76 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_msp_setup() local 79 ehci->big_endian_mmio = 1; in ehci_msp_setup() 80 ehci->big_endian_desc = 1; in ehci_msp_setup() [all …]
|
D | ehci-w90x900.c | 40 struct ehci_hcd *ehci; in usb_w90x900_probe() local 60 ehci = hcd_to_ehci(hcd); in usb_w90x900_probe() 61 ehci->caps = hcd->regs; in usb_w90x900_probe() 62 ehci->regs = hcd->regs + in usb_w90x900_probe() 63 HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in usb_w90x900_probe() 69 val = __raw_readl(ehci->regs+PHY0_CTR); in usb_w90x900_probe() 71 __raw_writel(val, ehci->regs+PHY0_CTR); in usb_w90x900_probe() 73 val = __raw_readl(ehci->regs+PHY1_CTR); in usb_w90x900_probe() 75 __raw_writel(val, ehci->regs+PHY1_CTR); in usb_w90x900_probe()
|
D | Makefile | 31 obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o 32 obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o 33 obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o 34 obj-$(CONFIG_USB_EHCI_MXC) += ehci-mxc.o 35 obj-$(CONFIG_USB_EHCI_HCD_OMAP) += ehci-omap.o 36 obj-$(CONFIG_USB_EHCI_HCD_ORION) += ehci-orion.o 37 obj-$(CONFIG_USB_EHCI_HCD_SPEAR) += ehci-spear.o 38 obj-$(CONFIG_USB_EHCI_HCD_STI) += ehci-st.o 39 obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o 40 obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o [all …]
|
D | ehci-mxc.c | 58 struct ehci_hcd *ehci; in ehci_mxc_drv_probe() local 83 ehci = hcd_to_ehci(hcd); in ehci_mxc_drv_probe() 84 priv = (struct ehci_mxc_priv *) ehci->priv; in ehci_mxc_drv_probe() 121 ehci->caps = hcd->regs + 0x100; in ehci_mxc_drv_probe() 122 ehci->regs = hcd->regs + 0x100 + in ehci_mxc_drv_probe() 123 HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase)); in ehci_mxc_drv_probe() 126 ehci_writel(ehci, pdata->portsc, &ehci->regs->port_status[0]); in ehci_mxc_drv_probe() 175 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_mxc_drv_remove() local 176 struct ehci_mxc_priv *priv = (struct ehci_mxc_priv *) ehci->priv; in ehci_mxc_drv_remove()
|
D | ehci-grlib.c | 89 struct ehci_hcd *ehci = NULL; in ehci_hcd_grlib_probe() local 128 ehci = hcd_to_ehci(hcd); in ehci_hcd_grlib_probe() 130 ehci->caps = hcd->regs; in ehci_hcd_grlib_probe() 133 hc_capbase = ehci_readl(ehci, &ehci->caps->hc_capbase); in ehci_hcd_grlib_probe() 134 if (HC_VERSION(ehci, hc_capbase) != GRUSBHC_HCIVERSION) { in ehci_hcd_grlib_probe() 135 ehci->big_endian_mmio = 1; in ehci_hcd_grlib_probe() 136 ehci->big_endian_desc = 1; in ehci_hcd_grlib_probe() 137 ehci->big_endian_capbase = 1; in ehci_hcd_grlib_probe()
|
D | ehci-tilegx.c | 103 struct ehci_hcd *ehci; in ehci_hcd_tilegx_drv_probe() local 137 ehci = hcd_to_ehci(hcd); in ehci_hcd_tilegx_drv_probe() 138 ehci->caps = hcd->regs; in ehci_hcd_tilegx_drv_probe() 139 ehci->regs = in ehci_hcd_tilegx_drv_probe() 140 hcd->regs + HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); in ehci_hcd_tilegx_drv_probe() 142 ehci->hcs_params = readl(&ehci->caps->hcs_params); in ehci_hcd_tilegx_drv_probe()
|
D | ehci-platform.c | 58 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_platform_reset() local 61 ehci->has_synopsys_hc_bug = pdata->has_synopsys_hc_bug; in ehci_platform_reset() 69 ehci->caps = hcd->regs + pdata->caps_offset; in ehci_platform_reset() 75 ehci->need_io_watchdog = 0; in ehci_platform_reset() 151 struct ehci_hcd *ehci; in ehci_platform_probe() local 185 ehci = hcd_to_ehci(hcd); in ehci_platform_probe() 189 ehci->big_endian_mmio = 1; in ehci_platform_probe() 192 ehci->big_endian_desc = 1; in ehci_platform_probe() 195 ehci->big_endian_mmio = ehci->big_endian_desc = 1; in ehci_platform_probe() 250 ehci->big_endian_desc = 1; in ehci_platform_probe() [all …]
|
D | ehci-sead3.c | 28 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_sead3_setup() local 30 ehci->caps = hcd->regs + 0x100; in ehci_sead3_setup() 33 ehci->big_endian_mmio = 1; in ehci_sead3_setup() 34 ehci->big_endian_desc = 1; in ehci_sead3_setup() 41 ehci->need_io_watchdog = 0; in ehci_sead3_setup() 44 ehci_writel(ehci, 0x1010, &ehci->regs->reserved1[1]); in ehci_sead3_setup()
|
D | ehci-xilinx-of.c | 134 struct ehci_hcd *ehci; in ehci_hcd_xilinx_of_probe() local 171 ehci = hcd_to_ehci(hcd); in ehci_hcd_xilinx_of_probe() 176 ehci->big_endian_mmio = 1; in ehci_hcd_xilinx_of_probe() 177 ehci->big_endian_desc = 1; in ehci_hcd_xilinx_of_probe() 183 ehci_dbg(ehci, "USB host controller supports FS devices\n"); in ehci_hcd_xilinx_of_probe() 186 ehci_dbg(ehci, in ehci_hcd_xilinx_of_probe() 193 ehci->caps = hcd->regs + 0x100; in ehci_hcd_xilinx_of_probe()
|
D | ehci-ps3.c | 24 static void ps3_ehci_setup_insnreg(struct ehci_hcd *ehci) in ps3_ehci_setup_insnreg() argument 43 writel_be(0x01000020, (void __iomem *)ehci->regs + in ps3_ehci_setup_insnreg() 48 writel_be(0x00000001, (void __iomem *)ehci->regs + in ps3_ehci_setup_insnreg() 55 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ps3_ehci_hc_reset() local 57 ehci->big_endian_mmio = 1; in ps3_ehci_hc_reset() 58 ehci->caps = hcd->regs; in ps3_ehci_hc_reset() 64 ps3_ehci_setup_insnreg(ehci); in ps3_ehci_hc_reset()
|
/drivers/usb/chipidea/ |
D | host.c | 45 struct ehci_hcd *ehci = hcd_to_ehci(hcd); in ehci_ci_portpower() local 46 struct ehci_ci_priv *priv = (struct ehci_ci_priv *)ehci->priv; in ehci_ci_portpower() 50 int port = HCS_N_PORTS(ehci->hcs_params); in ehci_ci_portpower() 111 struct ehci_hcd *ehci; in host_start() local 135 ehci = hcd_to_ehci(hcd); in host_start() 136 ehci->caps = ci->hw_bank.cap; in host_start() 137 ehci->has_hostpc = ci->hw_bank.lpm; in host_start() 138 ehci->has_tdi_phy_lpm = ci->hw_bank.lpm; in host_start() 139 ehci->imx28_write_fix = ci->imx28_write_fix; in host_start() 141 priv = (struct ehci_ci_priv *)ehci->priv; in host_start() [all …]
|
/drivers/phy/ |
D | phy-exynos5250-usb2.c | 205 u32 ehci; in exynos5250_power_on() local 306 ehci = readl(drv->reg_phy + EXYNOS_5250_HOSTEHCICTRL); in exynos5250_power_on() 307 ehci |= EXYNOS_5250_HOSTEHCICTRL_ENAINCRXALIGN | in exynos5250_power_on() 311 writel(ehci, drv->reg_phy + EXYNOS_5250_HOSTEHCICTRL); in exynos5250_power_on()
|