Lines Matching refs:priv_ep

39 	struct cdns3_endpoint *priv_ep = priv_dev->eps[0];  in cdns3_ep0_run_transfer()  local
41 priv_ep->trb_pool[0].buffer = cpu_to_le32(TRB_BUFFER(dma_addr)); in cdns3_ep0_run_transfer()
42 priv_ep->trb_pool[0].length = cpu_to_le32(TRB_LEN(length)); in cdns3_ep0_run_transfer()
45 priv_ep->trb_pool[0].control = cpu_to_le32(TRB_CYCLE | TRB_TYPE(TRB_NORMAL)); in cdns3_ep0_run_transfer()
46 priv_ep->trb_pool[1].buffer = cpu_to_le32(TRB_BUFFER(dma_addr)); in cdns3_ep0_run_transfer()
47 priv_ep->trb_pool[1].length = cpu_to_le32(TRB_LEN(0)); in cdns3_ep0_run_transfer()
48 priv_ep->trb_pool[1].control = cpu_to_le32(TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer()
51 priv_ep->trb_pool[0].control = cpu_to_le32(TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer()
53 priv_ep->trb_pool[1].control = 0; in cdns3_ep0_run_transfer()
56 trace_cdns3_prepare_trb(priv_ep, priv_ep->trb_pool); in cdns3_ep0_run_transfer()
61 writel(EP_TRADDR_TRADDR(priv_ep->trb_pool_dma), &regs->ep_traddr); in cdns3_ep0_run_transfer()
107 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_ep0_complete_setup() local
110 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_ep0_complete_setup()
115 trace_cdns3_halt(priv_ep, send_stall, 0); in cdns3_ep0_complete_setup()
223 struct cdns3_endpoint *priv_ep; in cdns3_req_ep0_get_status() local
254 priv_ep = priv_dev->eps[index]; in cdns3_req_ep0_get_status()
259 (priv_ep->flags & EP_STALL_PENDING)) in cdns3_req_ep0_get_status()
360 struct cdns3_endpoint *priv_ep; in cdns3_ep0_feature_handle_endpoint() local
371 priv_ep = priv_dev->eps[index]; in cdns3_ep0_feature_handle_endpoint()
376 __cdns3_gadget_ep_set_halt(priv_ep); in cdns3_ep0_feature_handle_endpoint()
377 else if (!(priv_ep->flags & EP_WEDGE)) in cdns3_ep0_feature_handle_endpoint()
378 ret = __cdns3_gadget_ep_clear_halt(priv_ep); in cdns3_ep0_feature_handle_endpoint()
534 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_ep0_setup_phase() local
541 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_ep0_setup_phase()
544 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_ep0_setup_phase()
545 priv_ep->dir = priv_dev->ep0_data_dir; in cdns3_ep0_setup_phase()
546 cdns3_gadget_giveback(priv_ep, to_cdns3_request(request), in cdns3_ep0_setup_phase()
571 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_transfer_completed() local
573 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_transfer_completed()
576 trace_cdns3_complete_trb(priv_ep, priv_ep->trb_pool); in cdns3_transfer_completed()
577 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_transfer_completed()
580 TRB_LEN(le32_to_cpu(priv_ep->trb_pool->length)); in cdns3_transfer_completed()
582 priv_ep->dir = priv_dev->ep0_data_dir; in cdns3_transfer_completed()
583 cdns3_gadget_giveback(priv_ep, to_cdns3_request(request), 0); in cdns3_transfer_completed()
691 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); in cdns3_gadget_ep0_queue() local
692 struct cdns3_device *priv_dev = priv_ep->cdns3_dev; in cdns3_gadget_ep0_queue()
717 priv_ep = priv_dev->eps[i]; in cdns3_gadget_ep0_queue()
718 if (priv_ep && priv_ep->flags & EP_CLAIMED && in cdns3_gadget_ep0_queue()
719 !(priv_ep->flags & EP_ENABLED)) in cdns3_gadget_ep0_queue()
720 cdns3_ep_config(priv_ep, 0); in cdns3_gadget_ep0_queue()
746 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_gadget_ep0_queue()
762 list_add_tail(&request->list, &priv_ep->pending_req_list); in cdns3_gadget_ep0_queue()
783 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); in cdns3_gadget_ep_set_wedge() local
784 struct cdns3_device *priv_dev = priv_ep->cdns3_dev; in cdns3_gadget_ep_set_wedge()
788 priv_ep->flags |= EP_WEDGE; in cdns3_gadget_ep_set_wedge()
813 struct cdns3_endpoint *priv_ep; in cdns3_ep0_config() local
822 priv_ep = priv_dev->eps[0]; in cdns3_ep0_config()
824 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_ep0_config()
827 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_ep0_config()
849 if (!(priv_ep->flags & EP_CONFIGURED)) in cdns3_ep0_config()
858 if (!(priv_ep->flags & EP_CONFIGURED)) in cdns3_ep0_config()
861 priv_ep->flags |= EP_CONFIGURED; in cdns3_ep0_config()
876 struct cdns3_endpoint *priv_ep) in cdns3_init_ep0() argument
878 sprintf(priv_ep->name, "ep0"); in cdns3_init_ep0()
881 priv_ep->endpoint.ops = &cdns3_gadget_ep0_ops; in cdns3_init_ep0()
882 priv_ep->endpoint.maxburst = 1; in cdns3_init_ep0()
883 usb_ep_set_maxpacket_limit(&priv_ep->endpoint, in cdns3_init_ep0()
885 priv_ep->endpoint.address = 0; in cdns3_init_ep0()
886 priv_ep->endpoint.caps.type_control = 1; in cdns3_init_ep0()
887 priv_ep->endpoint.caps.dir_in = 1; in cdns3_init_ep0()
888 priv_ep->endpoint.caps.dir_out = 1; in cdns3_init_ep0()
889 priv_ep->endpoint.name = priv_ep->name; in cdns3_init_ep0()
890 priv_ep->endpoint.desc = &cdns3_gadget_ep0_desc; in cdns3_init_ep0()
891 priv_dev->gadget.ep0 = &priv_ep->endpoint; in cdns3_init_ep0()
892 priv_ep->type = USB_ENDPOINT_XFER_CONTROL; in cdns3_init_ep0()
894 return cdns3_allocate_trb_pool(priv_ep); in cdns3_init_ep0()