/Linux-v4.19/drivers/usb/host/ |
D | xhci.c | 89 void xhci_quiesce(struct xhci_hcd *xhci) in xhci_quiesce() argument 96 halted = readl(&xhci->op_regs->status) & STS_HALT; in xhci_quiesce() 100 cmd = readl(&xhci->op_regs->command); in xhci_quiesce() 102 writel(cmd, &xhci->op_regs->command); in xhci_quiesce() 113 int xhci_halt(struct xhci_hcd *xhci) in xhci_halt() argument 116 xhci_dbg_trace(xhci, trace_xhci_dbg_init, "// Halt the HC"); in xhci_halt() 117 xhci_quiesce(xhci); in xhci_halt() 119 ret = xhci_handshake(&xhci->op_regs->status, in xhci_halt() 122 xhci_warn(xhci, "Host halt failed, %d\n", ret); in xhci_halt() 125 xhci->xhc_state |= XHCI_STATE_HALTED; in xhci_halt() [all …]
|
D | xhci-mem.c | 28 static struct xhci_segment *xhci_segment_alloc(struct xhci_hcd *xhci, in xhci_segment_alloc() argument 36 struct device *dev = xhci_to_hcd(xhci)->self.sysdev; in xhci_segment_alloc() 42 seg->trbs = dma_pool_zalloc(xhci->segment_pool, flags, &dma); in xhci_segment_alloc() 52 dma_pool_free(xhci->segment_pool, seg->trbs, dma); in xhci_segment_alloc() 68 static void xhci_segment_free(struct xhci_hcd *xhci, struct xhci_segment *seg) in xhci_segment_free() argument 71 dma_pool_free(xhci->segment_pool, seg->trbs, seg->dma); in xhci_segment_free() 78 static void xhci_free_segments_for_ring(struct xhci_hcd *xhci, in xhci_free_segments_for_ring() argument 86 xhci_segment_free(xhci, seg); in xhci_free_segments_for_ring() 89 xhci_segment_free(xhci, first); in xhci_free_segments_for_ring() 99 static void xhci_link_segments(struct xhci_hcd *xhci, struct xhci_segment *prev, in xhci_link_segments() argument [all …]
|
D | xhci-ring.c | 139 static void next_trb(struct xhci_hcd *xhci, in next_trb() argument 156 void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) in inc_deq() argument 204 static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring, in inc_enq() argument 234 (xhci->quirks & XHCI_AMD_0x96_HOST)) && in inc_enq() 235 !xhci_link_trb_quirk(xhci)) { in inc_enq() 259 static inline int room_on_ring(struct xhci_hcd *xhci, struct xhci_ring *ring, in room_on_ring() argument 277 void xhci_ring_cmd_db(struct xhci_hcd *xhci) in xhci_ring_cmd_db() argument 279 if (!(xhci->cmd_ring_state & CMD_RING_STATE_RUNNING)) in xhci_ring_cmd_db() 282 xhci_dbg(xhci, "// Ding dong!\n"); in xhci_ring_cmd_db() 283 writel(DB_VALUE_HOST, &xhci->dba->doorbell[0]); in xhci_ring_cmd_db() [all …]
|
D | xhci-pci.c | 62 static int xhci_pci_reinit(struct xhci_hcd *xhci, struct pci_dev *pdev) in xhci_pci_reinit() argument 72 xhci_dbg(xhci, "MWI active\n"); in xhci_pci_reinit() 74 xhci_dbg(xhci, "Finished xhci_pci_reinit\n"); in xhci_pci_reinit() 78 static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_pci_quirks() argument 88 xhci->quirks |= XHCI_RESET_EP_QUIRK; in xhci_pci_quirks() 89 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, in xhci_pci_quirks() 95 xhci->quirks |= XHCI_SLOW_SUSPEND; in xhci_pci_quirks() 96 xhci_dbg_trace(xhci, trace_xhci_dbg_quirks, in xhci_pci_quirks() 102 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_pci_quirks() 107 xhci->quirks |= XHCI_BROKEN_MSI; in xhci_pci_quirks() [all …]
|
D | xhci-hub.c | 55 static int xhci_create_usb3_bos_desc(struct xhci_hcd *xhci, char *buf, in xhci_create_usb3_bos_desc() argument 67 if (xhci->usb3_rhub.min_rev >= 0x01) { in xhci_create_usb3_bos_desc() 69 if (xhci->usb3_rhub.psi_count) { in xhci_create_usb3_bos_desc() 71 ssa_count = xhci->usb3_rhub.psi_uid_count * 2; in xhci_create_usb3_bos_desc() 90 temp = readl(&xhci->cap_regs->hcc_params); in xhci_create_usb3_bos_desc() 95 if ((xhci->quirks & XHCI_LPM_SUPPORT)) { in xhci_create_usb3_bos_desc() 96 temp = readl(&xhci->cap_regs->hcs_params3); in xhci_create_usb3_bos_desc() 102 if (usb3_1 && xhci->usb3_rhub.psi_count) { in xhci_create_usb3_bos_desc() 114 bm_attrib |= (xhci->usb3_rhub.psi_uid_count - 1) << 5; in xhci_create_usb3_bos_desc() 127 for (i = 0; i < xhci->usb3_rhub.psi_count; i++) { in xhci_create_usb3_bos_desc() [all …]
|
D | xhci-dbgcap.c | 18 dbc_dma_alloc_coherent(struct xhci_hcd *xhci, size_t size, in dbc_dma_alloc_coherent() argument 23 vaddr = dma_alloc_coherent(xhci_to_hcd(xhci)->self.sysdev, in dbc_dma_alloc_coherent() 30 dbc_dma_free_coherent(struct xhci_hcd *xhci, size_t size, in dbc_dma_free_coherent() argument 34 dma_free_coherent(xhci_to_hcd(xhci)->self.sysdev, in dbc_dma_free_coherent() 87 static void xhci_dbc_init_contexts(struct xhci_hcd *xhci, u32 string_length) in xhci_dbc_init_contexts() argument 96 dbc = xhci->dbc; in xhci_dbc_init_contexts() 125 xhci_write_64(xhci, dbc->ctx->dma, &dbc->regs->dccp); in xhci_dbc_init_contexts() 140 struct xhci_hcd *xhci = dbc->xhci; in xhci_dbc_giveback() local 141 struct device *dev = xhci_to_hcd(dbc->xhci)->self.sysdev; in xhci_dbc_giveback() 159 req->complete(xhci, req); in xhci_dbc_giveback() [all …]
|
D | xhci-debugfs.c | 86 static struct xhci_regset *xhci_debugfs_alloc_regset(struct xhci_hcd *xhci) in xhci_debugfs_alloc_regset() argument 99 list_add_tail(®set->list, &xhci->regset_list); in xhci_debugfs_alloc_regset() 113 static void xhci_debugfs_regset(struct xhci_hcd *xhci, u32 base, in xhci_debugfs_regset() argument 121 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_debugfs_regset() 123 rgs = xhci_debugfs_alloc_regset(xhci); in xhci_debugfs_regset() 139 static void xhci_debugfs_extcap_regset(struct xhci_hcd *xhci, int cap_id, in xhci_debugfs_extcap_regset() argument 146 void __iomem *base = &xhci->cap_regs->hc_capbase; in xhci_debugfs_extcap_regset() 155 xhci_debugfs_regset(xhci, offset, regs, nregs, in xhci_debugfs_extcap_regset() 156 xhci->debugfs_root, "%s:%02d", in xhci_debugfs_extcap_regset() 258 struct xhci_hcd *xhci; in xhci_slot_context_show() local [all …]
|
D | Makefile | 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 23 xhci-hcd-y += xhci-mtk-sch.o 26 xhci-plat-hcd-y := xhci-plat.o 28 xhci-plat-hcd-y += xhci-mvebu.o 31 xhci-plat-hcd-y += xhci-rcar.o 35 xhci-hcd-y += xhci-debugfs.o 75 obj-$(CONFIG_USB_XHCI_HCD) += xhci-hcd.o [all …]
|
D | xhci-plat.c | 66 static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_plat_quirks() argument 73 xhci->quirks |= XHCI_PLAT; in xhci_plat_quirks() 157 struct xhci_hcd *xhci; in xhci_plat_probe() local 254 xhci = hcd_to_xhci(hcd); in xhci_plat_probe() 266 xhci->clk = clk; in xhci_plat_probe() 267 xhci->reg_clk = reg_clk; in xhci_plat_probe() 268 xhci->main_hcd = hcd; in xhci_plat_probe() 269 xhci->shared_hcd = __usb_create_hcd(driver, sysdev, &pdev->dev, in xhci_plat_probe() 271 if (!xhci->shared_hcd) { in xhci_plat_probe() 277 xhci->imod_interval = 40000; in xhci_plat_probe() [all …]
|
D | xhci-dbgcap.h | 91 void (*complete)(struct xhci_hcd *xhci, 136 struct xhci_hcd *xhci; member 181 static inline struct dbc_ep *get_in_ep(struct xhci_hcd *xhci) in get_in_ep() argument 183 struct xhci_dbc *dbc = xhci->dbc; in get_in_ep() 188 static inline struct dbc_ep *get_out_ep(struct xhci_hcd *xhci) in get_out_ep() argument 190 struct xhci_dbc *dbc = xhci->dbc; in get_out_ep() 196 int xhci_dbc_init(struct xhci_hcd *xhci); 197 void xhci_dbc_exit(struct xhci_hcd *xhci); 198 int xhci_dbc_tty_register_driver(struct xhci_hcd *xhci); 200 int xhci_dbc_tty_register_device(struct xhci_hcd *xhci); [all …]
|
D | xhci-histb.c | 167 static void xhci_histb_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_histb_quirks() argument 174 xhci->quirks |= XHCI_PLAT; in xhci_histb_quirks() 203 struct xhci_hcd *xhci; in xhci_histb_probe() local 263 xhci = hcd_to_xhci(hcd); in xhci_histb_probe() 267 xhci->main_hcd = hcd; in xhci_histb_probe() 268 xhci->shared_hcd = usb_create_shared_hcd(driver, dev, dev_name(dev), in xhci_histb_probe() 270 if (!xhci->shared_hcd) { in xhci_histb_probe() 276 xhci->quirks |= XHCI_HW_LPM_DISABLE; in xhci_histb_probe() 279 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_histb_probe() 282 xhci->imod_interval = 40000; in xhci_histb_probe() [all …]
|
D | xhci.h | 935 struct xhci_hcd *xhci; member 1902 static inline struct usb_hcd *xhci_to_hcd(struct xhci_hcd *xhci) in xhci_to_hcd() argument 1904 return xhci->main_hcd; in xhci_to_hcd() 1907 #define xhci_dbg(xhci, fmt, args...) \ argument 1908 dev_dbg(xhci_to_hcd(xhci)->self.controller , fmt , ## args) 1909 #define xhci_err(xhci, fmt, args...) \ argument 1910 dev_err(xhci_to_hcd(xhci)->self.controller , fmt , ## args) 1911 #define xhci_warn(xhci, fmt, args...) \ argument 1912 dev_warn(xhci_to_hcd(xhci)->self.controller , fmt , ## args) 1913 #define xhci_warn_ratelimited(xhci, fmt, args...) \ argument [all …]
|
D | xhci-debugfs.h | 105 void xhci_debugfs_init(struct xhci_hcd *xhci); 106 void xhci_debugfs_exit(struct xhci_hcd *xhci); 109 void xhci_debugfs_create_slot(struct xhci_hcd *xhci, int slot_id); 110 void xhci_debugfs_remove_slot(struct xhci_hcd *xhci, int slot_id); 111 void xhci_debugfs_create_endpoint(struct xhci_hcd *xhci, 114 void xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci, 118 static inline void xhci_debugfs_init(struct xhci_hcd *xhci) { } in xhci_debugfs_init() argument 119 static inline void xhci_debugfs_exit(struct xhci_hcd *xhci) { } in xhci_debugfs_exit() argument 125 xhci_debugfs_create_endpoint(struct xhci_hcd *xhci, in xhci_debugfs_create_endpoint() argument 129 xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci, in xhci_debugfs_remove_endpoint() argument
|
D | xhci-mtk-sch.c | 46 static int get_bw_index(struct xhci_hcd *xhci, struct usb_device *udev, in get_bw_index() argument 52 virt_dev = xhci->devs[udev->slot_id]; in get_bw_index() 61 bw_index = virt_dev->real_port + xhci->usb3_rhub.num_ports - 1; in get_bw_index() 281 struct xhci_hcd *xhci = hcd_to_xhci(mtk->hcd); in xhci_mtk_sch_init() local 287 num_usb_bus = xhci->usb3_rhub.num_ports * 2 + xhci->usb2_rhub.num_ports; in xhci_mtk_sch_init() 312 struct xhci_hcd *xhci; in xhci_mtk_add_ep_quirk() local 323 xhci = hcd_to_xhci(hcd); in xhci_mtk_add_ep_quirk() 324 virt_dev = xhci->devs[udev->slot_id]; in xhci_mtk_add_ep_quirk() 326 slot_ctx = xhci_get_slot_ctx(xhci, virt_dev->in_ctx); in xhci_mtk_add_ep_quirk() 327 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); in xhci_mtk_add_ep_quirk() [all …]
|
D | xhci-mtk.c | 379 static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_mtk_quirks() argument 381 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_mtk_quirks() 389 xhci->quirks |= XHCI_PLAT; in xhci_mtk_quirks() 390 xhci->quirks |= XHCI_MTK_HOST; in xhci_mtk_quirks() 395 xhci->quirks |= XHCI_SPURIOUS_SUCCESS; in xhci_mtk_quirks() 397 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_mtk_quirks() 431 struct xhci_hcd *xhci; in xhci_mtk_probe() local 532 xhci = hcd_to_xhci(hcd); in xhci_mtk_probe() 533 xhci->main_hcd = hcd; in xhci_mtk_probe() 540 xhci->imod_interval = 5000; in xhci_mtk_probe() [all …]
|
D | xhci-ext-caps.c | 19 static int xhci_create_intel_xhci_sw_pdev(struct xhci_hcd *xhci, u32 cap_offset) in xhci_create_intel_xhci_sw_pdev() argument 21 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_create_intel_xhci_sw_pdev() 29 xhci_err(xhci, "couldn't allocate %s platform device\n", in xhci_create_intel_xhci_sw_pdev() 64 int xhci_ext_cap_init(struct xhci_hcd *xhci) in xhci_ext_cap_init() argument 66 void __iomem *base = &xhci->cap_regs->hc_capbase; in xhci_ext_cap_init() 77 if (xhci->quirks & XHCI_INTEL_USB_ROLE_SW) { in xhci_ext_cap_init() 78 ret = xhci_create_intel_xhci_sw_pdev(xhci, in xhci_ext_cap_init()
|
D | xhci-dbgtty.c | 94 dbc_read_complete(struct xhci_hcd *xhci, struct dbc_request *req) in dbc_read_complete() argument 97 struct xhci_dbc *dbc = xhci->dbc; in dbc_read_complete() 106 static void dbc_write_complete(struct xhci_hcd *xhci, struct dbc_request *req) in dbc_write_complete() argument 109 struct xhci_dbc *dbc = xhci->dbc; in dbc_write_complete() 121 xhci_warn(xhci, "unexpected write complete status %d\n", in dbc_write_complete() 284 int xhci_dbc_tty_register_driver(struct xhci_hcd *xhci) in xhci_dbc_tty_register_driver() argument 287 struct xhci_dbc *dbc = xhci->dbc; in xhci_dbc_tty_register_driver() 313 xhci_err(xhci, in xhci_dbc_tty_register_driver() 421 xhci_dbc_tty_init_port(struct xhci_hcd *xhci, struct dbc_port *port) in xhci_dbc_tty_init_port() argument 430 port->in = get_in_ep(xhci); in xhci_dbc_tty_init_port() [all …]
|
D | xhci-dbg.c | 13 char *xhci_get_slot_state(struct xhci_hcd *xhci, in xhci_get_slot_state() argument 16 struct xhci_slot_ctx *slot_ctx = xhci_get_slot_ctx(xhci, ctx); in xhci_get_slot_state() 22 void xhci_dbg_trace(struct xhci_hcd *xhci, void (*trace)(struct va_format *), in xhci_dbg_trace() argument 31 xhci_dbg(xhci, "%pV\n", &vaf); in xhci_dbg_trace()
|
D | xhci-trace.h | 12 #define TRACE_SYSTEM xhci-hcd 76 TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, 78 TP_ARGS(xhci, ctx, ep_num), 87 ((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 8) * 93 udev = to_usb_device(xhci_to_hcd(xhci)->self.controller); 94 __entry->ctx_64 = HCC_64BYTE_CONTEXT(xhci->hcc_params); 101 ((HCC_64BYTE_CONTEXT(xhci->hcc_params) + 1) * 32) * 111 TP_PROTO(struct xhci_hcd *xhci, struct xhci_container_ctx *ctx, 113 TP_ARGS(xhci, ctx, ep_num) 584 #define TRACE_INCLUDE_FILE xhci-trace
|
D | xhci-tegra.c | 936 struct xhci_hcd *xhci; in tegra_xusb_probe() local 1169 xhci = hcd_to_xhci(tegra->hcd); in tegra_xusb_probe() 1171 xhci->shared_hcd = usb_create_shared_hcd(&tegra_xhci_hc_driver, in tegra_xusb_probe() 1175 if (!xhci->shared_hcd) { in tegra_xusb_probe() 1181 err = usb_add_hcd(xhci->shared_hcd, tegra->xhci_irq, IRQF_SHARED); in tegra_xusb_probe() 1214 usb_remove_hcd(xhci->shared_hcd); in tegra_xusb_probe() 1216 usb_put_hcd(xhci->shared_hcd); in tegra_xusb_probe() 1239 struct xhci_hcd *xhci = hcd_to_xhci(tegra->hcd); in tegra_xusb_remove() local 1241 usb_remove_hcd(xhci->shared_hcd); in tegra_xusb_remove() 1242 usb_put_hcd(xhci->shared_hcd); in tegra_xusb_remove() [all …]
|
/Linux-v4.19/Documentation/devicetree/bindings/usb/ |
D | usb-xhci.txt | 6 - "generic-xhci" for generic XHCI device 7 - "marvell,armada3700-xhci" for Armada 37xx SoCs 8 - "marvell,armada-375-xhci" for Armada 375 SoCs 9 - "marvell,armada-380-xhci" for Armada 38x SoCs 10 - "renesas,xhci-r8a7743" for r8a7743 SoC 11 - "renesas,xhci-r8a7790" for r8a7790 SoC 12 - "renesas,xhci-r8a7791" for r8a7791 SoC 13 - "renesas,xhci-r8a7793" for r8a7793 SoC 14 - "renesas,xhci-r8a7795" for r8a7795 SoC 15 - "renesas,xhci-r8a7796" for r8a7796 SoC [all …]
|
D | mediatek,mtk-xhci.txt | 14 - compatible : should be "mediatek,<soc-model>-xhci", "mediatek,mtk-xhci", 16 "mediatek,mtk-xhci" compatible string, you need SoC specific ones in 18 - "mediatek,mt8173-xhci" 60 compatible = "mediatek,mt8173-xhci"; 83 In the case, xhci is added as subnode to mtu3. An example and the DT binding 88 - compatible : should be "mediatek,<soc-model>-xhci", "mediatek,mtk-xhci", 90 "mediatek,mtk-xhci" compatible string, you need SoC specific ones in 92 - "mediatek,mt8173-xhci" 111 compatible = "mediatek,mt8173-xhci";
|
D | mediatek,mtu3.txt | 60 The xhci should be added as subnode to mtu3 as shown in the following example 61 if host mode is enabled. The DT binding details of xhci can be found in: 62 Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.txt 88 usb_host: xhci@11270000 { 89 compatible = "mediatek,mt8173-xhci";
|
D | dwc3-cavium.txt | 22 xhci@1690000000000 { 23 compatible = "cavium,octeon-7130-xhci", "synopsys,dwc3";
|
/Linux-v4.19/drivers/usb/dwc3/ |
D | host.c | 50 struct platform_device *xhci; in dwc3_host_init() local 74 xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); in dwc3_host_init() 75 if (!xhci) { in dwc3_host_init() 80 xhci->dev.parent = dwc->dev; in dwc3_host_init() 82 dwc->xhci = xhci; in dwc3_host_init() 84 ret = platform_device_add_resources(xhci, dwc->xhci_resources, in dwc3_host_init() 109 ret = platform_device_add_properties(xhci, props); in dwc3_host_init() 121 ret = platform_device_add(xhci); in dwc3_host_init() 134 platform_device_put(xhci); in dwc3_host_init() 144 platform_device_unregister(dwc->xhci); in dwc3_host_exit()
|