Lines Matching refs:priv_ep

42 	struct cdns3_endpoint *priv_ep = priv_dev->eps[0];  in cdns3_ep0_run_transfer()  local
44 priv_ep->trb_pool[0].buffer = TRB_BUFFER(dma_addr); in cdns3_ep0_run_transfer()
45 priv_ep->trb_pool[0].length = TRB_LEN(length); in cdns3_ep0_run_transfer()
48 priv_ep->trb_pool[0].control = TRB_CYCLE | TRB_TYPE(TRB_NORMAL); in cdns3_ep0_run_transfer()
49 priv_ep->trb_pool[1].buffer = TRB_BUFFER(dma_addr); in cdns3_ep0_run_transfer()
50 priv_ep->trb_pool[1].length = TRB_LEN(0); in cdns3_ep0_run_transfer()
51 priv_ep->trb_pool[1].control = TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer()
54 priv_ep->trb_pool[0].control = TRB_CYCLE | TRB_IOC | in cdns3_ep0_run_transfer()
56 priv_ep->trb_pool[1].control = 0; in cdns3_ep0_run_transfer()
60 flush_dcache_range((unsigned long)priv_ep->trb_pool, in cdns3_ep0_run_transfer()
61 (unsigned long)priv_ep->trb_pool + in cdns3_ep0_run_transfer()
65 trace_cdns3_prepare_trb(priv_ep, priv_ep->trb_pool); in cdns3_ep0_run_transfer()
70 writel(EP_TRADDR_TRADDR(priv_ep->trb_pool_dma), &regs->ep_traddr); in cdns3_ep0_run_transfer()
116 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_ep0_complete_setup() local
119 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_ep0_complete_setup()
124 trace_cdns3_halt(priv_ep, send_stall, 0); in cdns3_ep0_complete_setup()
151 struct cdns3_endpoint *priv_ep; in cdns3_req_ep0_set_configuration() local
160 priv_ep = priv_dev->eps[i]; in cdns3_req_ep0_set_configuration()
161 if (!priv_ep) in cdns3_req_ep0_set_configuration()
164 if (priv_ep->flags & EP_CLAIMED) in cdns3_req_ep0_set_configuration()
165 cdns3_ep_config(priv_ep); in cdns3_req_ep0_set_configuration()
388 struct cdns3_endpoint *priv_ep; in cdns3_ep0_feature_handle_endpoint() local
399 priv_ep = priv_dev->eps[index]; in cdns3_ep0_feature_handle_endpoint()
404 __cdns3_gadget_ep_set_halt(priv_ep); in cdns3_ep0_feature_handle_endpoint()
405 else if (!(priv_ep->flags & EP_WEDGE)) in cdns3_ep0_feature_handle_endpoint()
406 ret = __cdns3_gadget_ep_clear_halt(priv_ep); in cdns3_ep0_feature_handle_endpoint()
562 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_ep0_setup_phase() local
569 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_ep0_setup_phase()
572 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_ep0_setup_phase()
573 priv_ep->dir = priv_dev->ep0_data_dir; in cdns3_ep0_setup_phase()
574 cdns3_gadget_giveback(priv_ep, to_cdns3_request(request), in cdns3_ep0_setup_phase()
599 struct cdns3_endpoint *priv_ep = priv_dev->eps[0]; in cdns3_transfer_completed() local
601 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_transfer_completed()
604 trace_cdns3_complete_trb(priv_ep, priv_ep->trb_pool); in cdns3_transfer_completed()
605 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_transfer_completed()
608 invalidate_dcache_range((unsigned long)priv_ep->trb_pool, in cdns3_transfer_completed()
609 (unsigned long)priv_ep->trb_pool + in cdns3_transfer_completed()
614 TRB_LEN(le32_to_cpu(priv_ep->trb_pool->length)); in cdns3_transfer_completed()
616 priv_ep->dir = priv_dev->ep0_data_dir; in cdns3_transfer_completed()
617 cdns3_gadget_giveback(priv_ep, to_cdns3_request(request), 0); in cdns3_transfer_completed()
721 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); in cdns3_gadget_ep0_queue() local
722 struct cdns3_device *priv_dev = priv_ep->cdns3_dev; in cdns3_gadget_ep0_queue()
766 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_gadget_ep0_queue()
782 list_add_tail(&request->list, &priv_ep->pending_req_list); in cdns3_gadget_ep0_queue()
803 struct cdns3_endpoint *priv_ep = ep_to_cdns3_ep(ep); in cdns3_gadget_ep_set_wedge() local
807 priv_ep->flags |= EP_WEDGE; in cdns3_gadget_ep_set_wedge()
832 struct cdns3_endpoint *priv_ep; in cdns3_ep0_config() local
840 priv_ep = priv_dev->eps[0]; in cdns3_ep0_config()
842 if (!list_empty(&priv_ep->pending_req_list)) { in cdns3_ep0_config()
845 request = cdns3_next_request(&priv_ep->pending_req_list); in cdns3_ep0_config()
890 struct cdns3_endpoint *priv_ep) in cdns3_init_ep0() argument
892 sprintf(priv_ep->name, "ep0"); in cdns3_init_ep0()
895 priv_ep->endpoint.ops = &cdns3_gadget_ep0_ops; in cdns3_init_ep0()
896 priv_ep->endpoint.maxburst = 1; in cdns3_init_ep0()
897 usb_ep_set_maxpacket_limit(&priv_ep->endpoint, in cdns3_init_ep0()
900 priv_ep->endpoint.address = 0; in cdns3_init_ep0()
902 priv_ep->endpoint.caps.type_control = 1; in cdns3_init_ep0()
903 priv_ep->endpoint.caps.dir_in = 1; in cdns3_init_ep0()
904 priv_ep->endpoint.caps.dir_out = 1; in cdns3_init_ep0()
905 priv_ep->endpoint.name = priv_ep->name; in cdns3_init_ep0()
906 priv_ep->endpoint.desc = &cdns3_gadget_ep0_desc; in cdns3_init_ep0()
907 priv_dev->gadget.ep0 = &priv_ep->endpoint; in cdns3_init_ep0()
908 priv_ep->type = USB_ENDPOINT_XFER_CONTROL; in cdns3_init_ep0()
910 return cdns3_allocate_trb_pool(priv_ep); in cdns3_init_ep0()