Lines Matching refs:ctrl

454 	struct xhci_ctrl *ctrl = xhci_get_ctrl(udev);  in xhci_configure_endpoints()  local
457 virt_dev = ctrl->devs[udev->slot_id]; in xhci_configure_endpoints()
461 xhci_queue_command(ctrl, in_ctx->bytes, udev->slot_id, 0, in xhci_configure_endpoints()
463 event = xhci_wait_for_event(ctrl, TRB_COMPLETION); in xhci_configure_endpoints()
482 xhci_acknowledge_event(ctrl); in xhci_configure_endpoints()
505 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in xhci_set_configuration() local
510 struct xhci_virt_device *virt_dev = ctrl->devs[slot_id]; in xhci_set_configuration()
541 xhci_slot_copy(ctrl, in_ctx, out_ctx); in xhci_set_configuration()
542 slot_ctx = xhci_get_slot_ctx(ctrl, in_ctx); in xhci_set_configuration()
546 xhci_endpoint_copy(ctrl, in_ctx, out_ctx, 0); in xhci_set_configuration()
574 ep_ctx[ep_index] = xhci_get_ep_ctx(ctrl, in_ctx, ep_index); in xhci_set_configuration()
631 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in xhci_address_device() local
638 virt_dev = ctrl->devs[slot_id]; in xhci_address_device()
644 debug("Setting up addressable devices %p\n", ctrl->dcbaa); in xhci_address_device()
645 xhci_setup_addressable_virt_dev(ctrl, udev, root_portnr); in xhci_address_device()
651 xhci_queue_command(ctrl, (void *)ctrl_ctx, slot_id, 0, TRB_ADDR_DEV); in xhci_address_device()
652 event = xhci_wait_for_event(ctrl, TRB_COMPLETION); in xhci_address_device()
685 xhci_acknowledge_event(ctrl); in xhci_address_device()
696 slot_ctx = xhci_get_slot_ctx(ctrl, virt_dev->out_ctx); in xhci_address_device()
715 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in _xhci_alloc_device() local
724 if (ctrl->rootdev == 0) { in _xhci_alloc_device()
729 xhci_queue_command(ctrl, NULL, 0, 0, TRB_ENABLE_SLOT); in _xhci_alloc_device()
730 event = xhci_wait_for_event(ctrl, TRB_COMPLETION); in _xhci_alloc_device()
739 xhci_acknowledge_event(ctrl); in _xhci_alloc_device()
741 ret = xhci_alloc_virt_device(ctrl, udev->slot_id); in _xhci_alloc_device()
772 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in xhci_check_maxpacket() local
783 out_ctx = ctrl->devs[slot_id]->out_ctx; in xhci_check_maxpacket()
786 ep_ctx = xhci_get_ep_ctx(ctrl, out_ctx, ep_index); in xhci_check_maxpacket()
796 xhci_endpoint_copy(ctrl, ctrl->devs[slot_id]->in_ctx, in xhci_check_maxpacket()
797 ctrl->devs[slot_id]->out_ctx, ep_index); in xhci_check_maxpacket()
798 in_ctx = ctrl->devs[slot_id]->in_ctx; in xhci_check_maxpacket()
799 ep_ctx = xhci_get_ep_ctx(ctrl, in_ctx, ep_index); in xhci_check_maxpacket()
900 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in xhci_submit_root() local
901 struct xhci_hccr *hccr = ctrl->hccr; in xhci_submit_root()
902 struct xhci_hcor *hcor = ctrl->hcor; in xhci_submit_root()
964 srcptr = &ctrl->hub; in xhci_submit_root()
974 ctrl->rootdev = le16_to_cpu(req->value); in xhci_submit_root()
1174 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in _xhci_submit_control_msg() local
1182 if (usb_pipedevice(pipe) == ctrl->rootdev) in _xhci_submit_control_msg()
1201 static int xhci_lowlevel_init(struct xhci_ctrl *ctrl) in xhci_lowlevel_init() argument
1209 hccr = ctrl->hccr; in xhci_lowlevel_init()
1210 hcor = ctrl->hcor; in xhci_lowlevel_init()
1221 if (xhci_mem_init(ctrl, hccr, hcor) < 0) in xhci_lowlevel_init()
1240 memcpy(&ctrl->hub, &descriptor, sizeof(struct usb_hub_descriptor)); in xhci_lowlevel_init()
1248 xhci_writel(&ctrl->ir_set->irq_control, 0x0); in xhci_lowlevel_init()
1249 xhci_writel(&ctrl->ir_set->irq_pending, 0x0); in xhci_lowlevel_init()
1257 static int xhci_lowlevel_stop(struct xhci_ctrl *ctrl) in xhci_lowlevel_stop() argument
1261 xhci_reset(ctrl->hcor); in xhci_lowlevel_stop()
1264 temp = xhci_readl(&ctrl->hcor->or_usbsts); in xhci_lowlevel_stop()
1265 xhci_writel(&ctrl->hcor->or_usbsts, temp & ~STS_EINT); in xhci_lowlevel_stop()
1266 temp = xhci_readl(&ctrl->ir_set->irq_pending); in xhci_lowlevel_stop()
1267 xhci_writel(&ctrl->ir_set->irq_pending, ER_IRQ_DISABLE(temp)); in xhci_lowlevel_stop()
1310 struct xhci_ctrl *ctrl; in usb_lowlevel_init() local
1321 ctrl = &xhcic[index]; in usb_lowlevel_init()
1323 ctrl->hccr = hccr; in usb_lowlevel_init()
1324 ctrl->hcor = hcor; in usb_lowlevel_init()
1326 ret = xhci_lowlevel_init(ctrl); in usb_lowlevel_init()
1329 ctrl->hccr = NULL; in usb_lowlevel_init()
1330 ctrl->hcor = NULL; in usb_lowlevel_init()
1347 struct xhci_ctrl *ctrl = (xhcic + index); in usb_lowlevel_stop() local
1349 if (ctrl->hcor) { in usb_lowlevel_stop()
1350 xhci_lowlevel_stop(ctrl); in usb_lowlevel_stop()
1352 xhci_cleanup(ctrl); in usb_lowlevel_stop()
1418 struct xhci_ctrl *ctrl = dev_get_priv(dev); in xhci_update_hub_device() local
1434 virt_dev = ctrl->devs[slot_id]; in xhci_update_hub_device()
1448 xhci_slot_copy(ctrl, in_ctx, out_ctx); in xhci_update_hub_device()
1449 slot_ctx = xhci_get_slot_ctx(ctrl, in_ctx); in xhci_update_hub_device()
1499 struct xhci_ctrl *ctrl = dev_get_priv(dev); in xhci_register() local
1504 ctrl, hccr, hcor); in xhci_register()
1506 ctrl->dev = dev; in xhci_register()
1520 ctrl->hccr = hccr; in xhci_register()
1521 ctrl->hcor = hcor; in xhci_register()
1522 ret = xhci_lowlevel_init(ctrl); in xhci_register()
1528 free(ctrl); in xhci_register()
1535 struct xhci_ctrl *ctrl = dev_get_priv(dev); in xhci_deregister() local
1537 xhci_lowlevel_stop(ctrl); in xhci_deregister()
1538 xhci_cleanup(ctrl); in xhci_deregister()