Home
last modified time | relevance | path

Searched refs:xhci (Results 1 – 25 of 159) sorted by relevance

1234567

/openbmc/linux/drivers/usb/host/
H A Dxhci.c88 void xhci_quiesce(struct xhci_hcd *xhci) in xhci_quiesce() argument
95 halted = readl(&xhci->op_regs->status) & STS_HALT; in xhci_quiesce()
99 cmd = readl(&xhci->op_regs->command); in xhci_quiesce()
101 writel(cmd, &xhci->op_regs->command); in xhci_quiesce()
112 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()
126 xhci->xhc_state |= XHCI_STATE_HALTED; in xhci_halt()
[all …]
H A Dxhci-mem.c29 static struct xhci_segment *xhci_segment_alloc(struct xhci_hcd *xhci, in xhci_segment_alloc() argument
37 struct device *dev = xhci_to_hcd(xhci)->self.sysdev; in xhci_segment_alloc()
43 seg->trbs = dma_pool_zalloc(xhci->segment_pool, flags, &dma); in xhci_segment_alloc()
53 dma_pool_free(xhci->segment_pool, seg->trbs, dma); in xhci_segment_alloc()
69 static void xhci_segment_free(struct xhci_hcd *xhci, struct xhci_segment *seg) in xhci_segment_free() argument
72 dma_pool_free(xhci->segment_pool, seg->trbs, seg->dma); in xhci_segment_free()
79 static void xhci_free_segments_for_ring(struct xhci_hcd *xhci, in xhci_free_segments_for_ring() argument
87 xhci_segment_free(xhci, seg); in xhci_free_segments_for_ring()
90 xhci_segment_free(xhci, first); in xhci_free_segments_for_ring()
127 static void xhci_link_rings(struct xhci_hcd *xhci, struct xhci_ring *ring, in xhci_link_rings() argument
[all …]
H A Dxhci-pci.c97 static void xhci_msix_sync_irqs(struct xhci_hcd *xhci) in xhci_msix_sync_irqs() argument
99 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_msix_sync_irqs()
105 for (i = 0; i < xhci->msix_count; i++) in xhci_msix_sync_irqs()
111 static void xhci_cleanup_msix(struct xhci_hcd *xhci) in xhci_cleanup_msix() argument
113 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_cleanup_msix()
123 for (i = 0; i < xhci->msix_count; i++) in xhci_cleanup_msix()
124 free_irq(pci_irq_vector(pdev, i), xhci_to_hcd(xhci)); in xhci_cleanup_msix()
126 free_irq(pci_irq_vector(pdev, 0), xhci_to_hcd(xhci)); in xhci_cleanup_msix()
136 static int xhci_setup_msi(struct xhci_hcd *xhci) in xhci_setup_msi() argument
142 struct pci_dev *pdev = to_pci_dev(xhci_to_hcd(xhci)->self.controller); in xhci_setup_msi()
[all …]
H A Dxhci-ring.c62 static int queue_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
143 static void next_trb(struct xhci_hcd *xhci, in next_trb() argument
159 void inc_deq(struct xhci_hcd *xhci, struct xhci_ring *ring) in inc_deq() argument
179 xhci_warn(xhci, "Missing link TRB at end of segment\n"); in inc_deq()
189 xhci_warn(xhci, "Ring is an endless link TRB loop\n"); in inc_deq()
215 static void inc_enq(struct xhci_hcd *xhci, struct xhci_ring *ring, in inc_enq() argument
225 xhci_err(xhci, "Tried to move enqueue past ring segment\n"); in inc_enq()
249 (xhci->quirks & XHCI_AMD_0x96_HOST)) && in inc_enq()
250 !xhci_link_trb_quirk(xhci)) { in inc_enq()
267 xhci_warn(xhci, "%s: Ring link TRB loop\n", __func__); in inc_enq()
[all …]
H A Dxhci-hub.c35 static int xhci_create_usb3x_bos_desc(struct xhci_hcd *xhci, char *buf, in xhci_create_usb3x_bos_desc() argument
60 for (i = 0; i < xhci->num_port_caps; i++) { in xhci_create_usb3x_bos_desc()
61 u8 major = xhci->port_caps[i].maj_rev; in xhci_create_usb3x_bos_desc()
62 u8 minor = xhci->port_caps[i].min_rev; in xhci_create_usb3x_bos_desc()
67 port_cap = &xhci->port_caps[i]; in xhci_create_usb3x_bos_desc()
111 reg = readl(&xhci->cap_regs->hcc_params); in xhci_create_usb3x_bos_desc()
115 if ((xhci->quirks & XHCI_LPM_SUPPORT)) { in xhci_create_usb3x_bos_desc()
116 reg = readl(&xhci->cap_regs->hcs_params3); in xhci_create_usb3x_bos_desc()
255 static void xhci_common_hub_descriptor(struct xhci_hcd *xhci, in xhci_common_hub_descriptor() argument
265 if (HCC_PPC(xhci->hcc_params)) in xhci_common_hub_descriptor()
[all …]
H A Dxhci-plat.c77 static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_plat_quirks() argument
79 struct xhci_plat_priv *priv = xhci_to_priv(xhci); in xhci_plat_quirks()
81 xhci->quirks |= priv->quirks; in xhci_plat_quirks()
146 struct xhci_hcd *xhci; in xhci_plat_probe() local
190 xhci = hcd_to_xhci(hcd); in xhci_plat_probe()
192 xhci->allow_single_roothub = 1; in xhci_plat_probe()
198 xhci->reg_clk = devm_clk_get_optional(&pdev->dev, "reg"); in xhci_plat_probe()
199 if (IS_ERR(xhci->reg_clk)) { in xhci_plat_probe()
200 ret = PTR_ERR(xhci->reg_clk); in xhci_plat_probe()
204 xhci->clk = devm_clk_get_optional(&pdev->dev, NULL); in xhci_plat_probe()
[all …]
H A DMakefile14 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
33 xhci-rcar-hcd-$(CONFIG_USB_XHCI_RZV2M) += xhci-rzv2m.o
[all …]
H A Dxhci-debugfs.c86 static struct xhci_regset *xhci_debugfs_alloc_regset(struct xhci_hcd *xhci) in xhci_debugfs_alloc_regset() argument
99 list_add_tail(&regset->list, &xhci->regset_list); in xhci_debugfs_alloc_regset()
114 static void xhci_debugfs_regset(struct xhci_hcd *xhci, u32 base, in xhci_debugfs_regset() argument
122 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_debugfs_regset()
124 rgs = xhci_debugfs_alloc_regset(xhci); in xhci_debugfs_regset()
141 static void xhci_debugfs_extcap_regset(struct xhci_hcd *xhci, int cap_id, in xhci_debugfs_extcap_regset() argument
148 void __iomem *base = &xhci->cap_regs->hc_capbase; in xhci_debugfs_extcap_regset()
157 xhci_debugfs_regset(xhci, offset, regs, nregs, in xhci_debugfs_extcap_regset()
158 xhci->debugfs_root, "%s:%02d", in xhci_debugfs_extcap_regset()
261 struct xhci_hcd *xhci; in xhci_slot_context_show() local
[all …]
H A Dxhci.h702 struct xhci_hcd *xhci; member
1731 static inline struct usb_hcd *xhci_to_hcd(struct xhci_hcd *xhci) in xhci_to_hcd() argument
1733 return xhci->main_hcd; in xhci_to_hcd()
1736 static inline struct usb_hcd *xhci_get_usb3_hcd(struct xhci_hcd *xhci) in xhci_get_usb3_hcd() argument
1738 if (xhci->shared_hcd) in xhci_get_usb3_hcd()
1739 return xhci->shared_hcd; in xhci_get_usb3_hcd()
1741 if (!xhci->usb2_rhub.num_ports) in xhci_get_usb3_hcd()
1742 return xhci->main_hcd; in xhci_get_usb3_hcd()
1749 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_hcd_is_usb3() local
1751 return hcd == xhci_get_usb3_hcd(xhci); in xhci_hcd_is_usb3()
[all …]
H A Dxhci-debugfs.h107 void xhci_debugfs_init(struct xhci_hcd *xhci);
108 void xhci_debugfs_exit(struct xhci_hcd *xhci);
111 void xhci_debugfs_create_slot(struct xhci_hcd *xhci, int slot_id);
112 void xhci_debugfs_remove_slot(struct xhci_hcd *xhci, int slot_id);
113 void xhci_debugfs_create_endpoint(struct xhci_hcd *xhci,
116 void xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci,
119 void xhci_debugfs_create_stream_files(struct xhci_hcd *xhci,
123 static inline void xhci_debugfs_init(struct xhci_hcd *xhci) { } in xhci_debugfs_init() argument
124 static inline void xhci_debugfs_exit(struct xhci_hcd *xhci) { } in xhci_debugfs_exit() argument
130 xhci_debugfs_create_endpoint(struct xhci_hcd *xhci, in xhci_debugfs_create_endpoint() argument
[all …]
H A Dxhci-histb.c193 struct xhci_hcd *xhci; in xhci_histb_probe() local
252 xhci = hcd_to_xhci(hcd); in xhci_histb_probe()
256 xhci->main_hcd = hcd; in xhci_histb_probe()
257 xhci->shared_hcd = usb_create_shared_hcd(driver, dev, dev_name(dev), in xhci_histb_probe()
259 if (!xhci->shared_hcd) { in xhci_histb_probe()
265 xhci->quirks |= XHCI_HW_LPM_DISABLE; in xhci_histb_probe()
268 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_histb_probe()
271 xhci->imod_interval = 40000; in xhci_histb_probe()
273 &xhci->imod_interval); in xhci_histb_probe()
279 if (HCC_MAX_PSA(xhci->hcc_params) >= 4) in xhci_histb_probe()
[all …]
H A Dxhci-mtk.c451 static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) in xhci_mtk_quirks() argument
453 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_mtk_quirks()
456 xhci->quirks |= XHCI_MTK_HOST; in xhci_mtk_quirks()
461 xhci->quirks |= XHCI_SPURIOUS_SUCCESS; in xhci_mtk_quirks()
463 xhci->quirks |= XHCI_LPM_SUPPORT; in xhci_mtk_quirks()
465 xhci->quirks |= XHCI_HW_LPM_DISABLE; in xhci_mtk_quirks()
471 if (xhci->hci_version < 0x100 && HCC_MAX_PSA(xhci->hcc_params) == 4) in xhci_mtk_quirks()
472 xhci->quirks |= XHCI_BROKEN_STREAMS; in xhci_mtk_quirks()
515 struct xhci_hcd *xhci; in xhci_mtk_probe() local
627 xhci = hcd_to_xhci(hcd); in xhci_mtk_probe()
[all …]
H A Dxhci-dbgcap.c955 struct xhci_hcd *xhci; in dbc_show() local
957 xhci = hcd_to_xhci(dev_get_drvdata(dev)); in dbc_show()
958 dbc = xhci->dbc; in dbc_show()
987 struct xhci_hcd *xhci; in dbc_store() local
990 xhci = hcd_to_xhci(dev_get_drvdata(dev)); in dbc_store()
991 dbc = xhci->dbc; in dbc_store()
1008 struct xhci_hcd *xhci; in dbc_idVendor_show() local
1010 xhci = hcd_to_xhci(dev_get_drvdata(dev)); in dbc_idVendor_show()
1011 dbc = xhci->dbc; in dbc_idVendor_show()
1021 struct xhci_hcd *xhci; in dbc_idVendor_store() local
[all …]
H A Dxhci-ext-caps.c28 static int xhci_create_intel_xhci_sw_pdev(struct xhci_hcd *xhci, u32 cap_offset) in xhci_create_intel_xhci_sw_pdev() argument
30 struct usb_hcd *hcd = xhci_to_hcd(xhci); in xhci_create_intel_xhci_sw_pdev()
39 xhci_err(xhci, "couldn't allocate %s platform device\n", in xhci_create_intel_xhci_sw_pdev()
84 int xhci_ext_cap_init(struct xhci_hcd *xhci) in xhci_ext_cap_init() argument
86 void __iomem *base = &xhci->cap_regs->hc_capbase; in xhci_ext_cap_init()
97 if (xhci->quirks & XHCI_INTEL_USB_ROLE_SW) { in xhci_ext_cap_init()
98 ret = xhci_create_intel_xhci_sw_pdev(xhci, in xhci_ext_cap_init()
H A Dxhci-dbgcap.h124 struct xhci_hcd *xhci; member
202 int xhci_create_dbc_dev(struct xhci_hcd *xhci);
203 void xhci_remove_dbc_dev(struct xhci_hcd *xhci);
208 int xhci_dbc_tty_probe(struct device *dev, void __iomem *res, struct xhci_hcd *xhci);
219 int xhci_dbc_suspend(struct xhci_hcd *xhci);
220 int xhci_dbc_resume(struct xhci_hcd *xhci);
223 static inline int xhci_create_dbc_dev(struct xhci_hcd *xhci) in xhci_create_dbc_dev() argument
228 static inline void xhci_remove_dbc_dev(struct xhci_hcd *xhci) in xhci_remove_dbc_dev() argument
238 static inline int xhci_dbc_suspend(struct xhci_hcd *xhci) in xhci_dbc_suspend() argument
243 static inline int xhci_dbc_resume(struct xhci_hcd *xhci) in xhci_dbc_resume() argument
H A Dxhci-mtk-sch.c122 struct xhci_hcd *xhci = hcd_to_xhci(mtk->hcd); in get_bw_info() local
126 virt_dev = xhci->devs[udev->slot_id]; in get_bw_info()
139 bw_index = virt_dev->real_port + xhci->usb3_rhub.num_ports - 1; in get_bw_info()
602 struct xhci_hcd *xhci = hcd_to_xhci(mtk->hcd); in xhci_mtk_sch_init() local
607 num_usb_bus = xhci->usb3_rhub.num_ports * 2 + xhci->usb2_rhub.num_ports; in xhci_mtk_sch_init()
630 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in add_ep_quirk() local
636 virt_dev = xhci->devs[udev->slot_id]; in add_ep_quirk()
638 ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index); in add_ep_quirk()
652 xhci_dbg(xhci, "%s %s\n", __func__, decode_ep(ep, udev->speed)); in add_ep_quirk()
670 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in drop_ep_quirk() local
[all …]
H A Dxhci-dbg.c13 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()
H A Dxhci-tegra.c1292 struct xhci_hcd *xhci = hcd_to_xhci(tegra->hcd); in tegra_xhci_set_port_power() local
1293 struct usb_hcd *hcd = main ? xhci->main_hcd : xhci->shared_hcd; in tegra_xhci_set_port_power()
1345 struct xhci_hcd *xhci = hcd_to_xhci(tegra->hcd); in tegra_xhci_id_work() local
1372 xhci->shared_hcd, GetPortStatus, in tegra_xhci_id_work()
1541 struct xhci_hcd *xhci; in tegra_xusb_probe() local
1819 xhci = hcd_to_xhci(tegra->hcd); in tegra_xusb_probe()
1821 xhci->shared_hcd = usb_create_shared_hcd(&tegra_xhci_hc_driver, in tegra_xusb_probe()
1825 if (!xhci->shared_hcd) { in tegra_xusb_probe()
1831 if (HCC_MAX_PSA(xhci->hcc_params) >= 4) in tegra_xusb_probe()
1832 xhci->shared_hcd->can_do_streams = 1; in tegra_xusb_probe()
[all …]
/openbmc/qemu/hw/usb/
H A Dhcd-xhci.c272 XHCIState *xhci; member
305 static void xhci_kick_ep(XHCIState *xhci, unsigned int slotid,
308 static TRBCCode xhci_disable_ep(XHCIState *xhci, unsigned int slotid,
311 static void xhci_event(XHCIState *xhci, XHCIEvent *event, int v);
312 static void xhci_write_event(XHCIState *xhci, XHCIEvent *event, int v);
425 bool xhci_get_flag(XHCIState *xhci, enum xhci_flags bit) in xhci_get_flag() argument
427 return xhci->flags & (1 << bit); in xhci_get_flag()
430 void xhci_set_flag(XHCIState *xhci, enum xhci_flags bit) in xhci_set_flag() argument
432 xhci->flags |= (1 << bit); in xhci_set_flag()
435 static uint64_t xhci_mfindex_get(XHCIState *xhci) in xhci_mfindex_get() argument
[all …]
H A Dhcd-xhci-pci.c38 static void xhci_pci_intr_update(XHCIState *xhci, int n, bool enable) in xhci_pci_intr_update() argument
40 XHCIPciState *s = container_of(xhci, XHCIPciState, xhci); in xhci_pci_intr_update()
46 if (enable == !!xhci->intr[n].msix_used) { in xhci_pci_intr_update()
52 xhci->intr[n].msix_used = true; in xhci_pci_intr_update()
56 xhci->intr[n].msix_used = false; in xhci_pci_intr_update()
60 static bool xhci_pci_intr_raise(XHCIState *xhci, int n, bool level) in xhci_pci_intr_raise() argument
62 XHCIPciState *s = container_of(xhci, XHCIPciState, xhci); in xhci_pci_intr_raise()
89 device_cold_reset(DEVICE(&s->xhci)); in xhci_pci_reset()
98 for (intr = 0; intr < s->xhci.numintrs; intr++) { in xhci_pci_vmstate_post_load()
99 if (s->xhci.intr[intr].msix_used) { in xhci_pci_vmstate_post_load()
[all …]
H A Dhcd-xhci-sysbus.c19 static bool xhci_sysbus_intr_raise(XHCIState *xhci, int n, bool level) in xhci_sysbus_intr_raise() argument
21 XHCISysbusState *s = container_of(xhci, XHCISysbusState, xhci); in xhci_sysbus_intr_raise()
32 device_cold_reset(DEVICE(&s->xhci)); in xhci_sysbus_reset()
39 object_property_set_link(OBJECT(&s->xhci), "host", OBJECT(s), NULL); in xhci_sysbus_realize()
40 if (!qdev_realize(DEVICE(&s->xhci), NULL, errp)) { in xhci_sysbus_realize()
43 s->irq = g_new0(qemu_irq, s->xhci.numintrs); in xhci_sysbus_realize()
45 s->xhci.numintrs); in xhci_sysbus_realize()
46 if (s->xhci.dma_mr) { in xhci_sysbus_realize()
47 s->xhci.as = g_malloc0(sizeof(AddressSpace)); in xhci_sysbus_realize()
48 address_space_init(s->xhci.as, s->xhci.dma_mr, NULL); in xhci_sysbus_realize()
[all …]
/openbmc/linux/drivers/usb/dwc3/
H A Dhost.c86 struct platform_device *xhci; in dwc3_host_init() local
94 xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); in dwc3_host_init()
95 if (!xhci) { in dwc3_host_init()
100 xhci->dev.parent = dwc->dev; in dwc3_host_init()
102 dwc->xhci = xhci; in dwc3_host_init()
104 ret = platform_device_add_resources(xhci, dwc->xhci_resources, in dwc3_host_init()
134 ret = device_create_managed_software_node(&xhci->dev, props, NULL); in dwc3_host_init()
141 ret = platform_device_add_data(xhci, &dwc3_xhci_plat_quirk, in dwc3_host_init()
146 ret = platform_device_add(xhci); in dwc3_host_init()
157 device_init_wakeup(&xhci->dev, true); in dwc3_host_init()
[all …]
/openbmc/linux/drivers/usb/cdns3/
H A Dhost.c34 struct xhci_hcd *xhci = hcd_to_xhci(hcd); in xhci_cdns3_plat_start() local
38 value = readl(&xhci->op_regs->command); in xhci_cdns3_plat_start()
40 writel(value, &xhci->op_regs->command); in xhci_cdns3_plat_start()
71 struct platform_device *xhci; in __cdns_host_init() local
77 xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); in __cdns_host_init()
78 if (!xhci) { in __cdns_host_init()
83 xhci->dev.parent = cdns->dev; in __cdns_host_init()
84 cdns->host_dev = xhci; in __cdns_host_init()
86 ret = platform_device_add_resources(xhci, cdns->xhci_res, in __cdns_host_init()
108 ret = platform_device_add_data(xhci, cdns->xhci_plat_data, in __cdns_host_init()
[all …]
/openbmc/u-boot/drivers/usb/host/
H A DMakefile47 obj-$(CONFIG_USB_XHCI_HCD) += xhci.o xhci-mem.o xhci-ring.o
48 obj-$(CONFIG_USB_XHCI_DWC3) += xhci-dwc3.o
50 obj-$(CONFIG_USB_XHCI_ROCKCHIP) += xhci-rockchip.o
51 obj-$(CONFIG_USB_XHCI_ZYNQMP) += xhci-zynqmp.o
52 obj-$(CONFIG_USB_XHCI_EXYNOS) += xhci-exynos5.o
53 obj-$(CONFIG_USB_XHCI_FSL) += xhci-fsl.o
54 obj-$(CONFIG_USB_XHCI_MVEBU) += xhci-mvebu.o
55 obj-$(CONFIG_USB_XHCI_OMAP) += xhci-omap.o
56 obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o
57 obj-$(CONFIG_USB_XHCI_RCAR) += xhci-rcar.o
/openbmc/u-boot/doc/device-tree-bindings/usb/
H A Dmarvell.xhci-usb.txt8 - "marvell,armada3700-xhci", "generic-xhci" for Armada 37xx SoCs
9 - "marvell,armada-8k-xhci", "generic-xhci" for Armada A8K SoCs
21 compatible = "marvell,armada-8k-xhci",
22 "generic-xhci";

1234567