• Home
  • Raw
  • Download

Lines Matching refs:xhci

86 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()
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
263 xhci = hcd_to_xhci(bus_to_hcd(dev->udev->bus)); in xhci_slot_context_show()
264 slot_ctx = xhci_get_slot_ctx(xhci, dev->out_ctx); in xhci_slot_context_show()
278 struct xhci_hcd *xhci; in xhci_endpoint_context_show() local
283 xhci = hcd_to_xhci(bus_to_hcd(dev->udev->bus)); in xhci_endpoint_context_show()
286 ep_ctx = xhci_get_ep_ctx(xhci, dev->out_ctx, dci); in xhci_endpoint_context_show()
287 dma = dev->out_ctx->dma + dci * CTX_SIZE(xhci->hcc_params); in xhci_endpoint_context_show()
360 struct xhci_hcd *xhci = hcd_to_xhci(port->rhub->hcd); in xhci_port_write() local
370 if (!HCC2_CTC(xhci->hcc_params2)) in xhci_port_write()
372 spin_lock_irqsave(&xhci->lock, flags); in xhci_port_write()
376 spin_unlock_irqrestore(&xhci->lock, flags); in xhci_port_write()
383 spin_unlock_irqrestore(&xhci->lock, flags); in xhci_port_write()
398 static void xhci_debugfs_create_files(struct xhci_hcd *xhci, in xhci_debugfs_create_files() argument
410 static struct dentry *xhci_debugfs_create_ring_dir(struct xhci_hcd *xhci, in xhci_debugfs_create_ring_dir() argument
418 xhci_debugfs_create_files(xhci, ring_files, ARRAY_SIZE(ring_files), in xhci_debugfs_create_ring_dir()
424 static void xhci_debugfs_create_context_files(struct xhci_hcd *xhci, in xhci_debugfs_create_context_files() argument
428 struct xhci_virt_device *dev = xhci->devs[slot_id]; in xhci_debugfs_create_context_files()
430 xhci_debugfs_create_files(xhci, context_files, in xhci_debugfs_create_context_files()
436 void xhci_debugfs_create_endpoint(struct xhci_hcd *xhci, in xhci_debugfs_create_endpoint() argument
454 epriv->root = xhci_debugfs_create_ring_dir(xhci, in xhci_debugfs_create_endpoint()
461 void xhci_debugfs_remove_endpoint(struct xhci_hcd *xhci, in xhci_debugfs_remove_endpoint() argument
477 void xhci_debugfs_create_slot(struct xhci_hcd *xhci, int slot_id) in xhci_debugfs_create_slot() argument
480 struct xhci_virt_device *dev = xhci->devs[slot_id]; in xhci_debugfs_create_slot()
487 priv->root = debugfs_create_dir(priv->name, xhci->debugfs_slots); in xhci_debugfs_create_slot()
491 xhci_debugfs_create_ring_dir(xhci, &dev->eps[0].ring, in xhci_debugfs_create_slot()
494 xhci_debugfs_create_context_files(xhci, priv->root, slot_id); in xhci_debugfs_create_slot()
497 void xhci_debugfs_remove_slot(struct xhci_hcd *xhci, int slot_id) in xhci_debugfs_remove_slot() argument
501 struct xhci_virt_device *dev = xhci->devs[slot_id]; in xhci_debugfs_remove_slot()
517 static void xhci_debugfs_create_ports(struct xhci_hcd *xhci, in xhci_debugfs_create_ports() argument
525 num_ports = HCS_MAX_PORTS(xhci->hcs_params1); in xhci_debugfs_create_ports()
533 port = &xhci->hw_ports[num_ports]; in xhci_debugfs_create_ports()
538 void xhci_debugfs_init(struct xhci_hcd *xhci) in xhci_debugfs_init() argument
540 struct device *dev = xhci_to_hcd(xhci)->self.controller; in xhci_debugfs_init()
542 xhci->debugfs_root = debugfs_create_dir(dev_name(dev), in xhci_debugfs_init()
545 INIT_LIST_HEAD(&xhci->regset_list); in xhci_debugfs_init()
547 xhci_debugfs_regset(xhci, in xhci_debugfs_init()
550 xhci->debugfs_root, "reg-cap"); in xhci_debugfs_init()
552 xhci_debugfs_regset(xhci, in xhci_debugfs_init()
553 HC_LENGTH(readl(&xhci->cap_regs->hc_capbase)), in xhci_debugfs_init()
555 xhci->debugfs_root, "reg-op"); in xhci_debugfs_init()
557 xhci_debugfs_regset(xhci, in xhci_debugfs_init()
558 readl(&xhci->cap_regs->run_regs_off) & RTSOFF_MASK, in xhci_debugfs_init()
560 xhci->debugfs_root, "reg-runtime"); in xhci_debugfs_init()
562 xhci_debugfs_extcap_regset(xhci, XHCI_EXT_CAPS_LEGACY, in xhci_debugfs_init()
567 xhci_debugfs_extcap_regset(xhci, XHCI_EXT_CAPS_PROTOCOL, in xhci_debugfs_init()
572 xhci_debugfs_extcap_regset(xhci, XHCI_EXT_CAPS_DEBUG, in xhci_debugfs_init()
577 xhci_debugfs_create_ring_dir(xhci, &xhci->cmd_ring, in xhci_debugfs_init()
579 xhci->debugfs_root); in xhci_debugfs_init()
581 xhci_debugfs_create_ring_dir(xhci, &xhci->event_ring, in xhci_debugfs_init()
583 xhci->debugfs_root); in xhci_debugfs_init()
585 xhci->debugfs_slots = debugfs_create_dir("devices", xhci->debugfs_root); in xhci_debugfs_init()
587 xhci_debugfs_create_ports(xhci, xhci->debugfs_root); in xhci_debugfs_init()
590 void xhci_debugfs_exit(struct xhci_hcd *xhci) in xhci_debugfs_exit() argument
594 debugfs_remove_recursive(xhci->debugfs_root); in xhci_debugfs_exit()
595 xhci->debugfs_root = NULL; in xhci_debugfs_exit()
596 xhci->debugfs_slots = NULL; in xhci_debugfs_exit()
598 list_for_each_entry_safe(rgs, tmp, &xhci->regset_list, list) in xhci_debugfs_exit()