Lines Matching refs:dir_in
64 u32 ep_index, u32 dir_in) in index_to_ep() argument
66 if (dir_in) in index_to_ep()
144 unsigned int ep, unsigned int dir_in, in dwc2_hsotg_ctrl_epint() argument
151 if (!dir_in) in dwc2_hsotg_ctrl_epint()
292 usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_unmap_dma()
485 if (hs_ep->dir_in) in get_ep_limit()
523 int dir_in = hs_ep->dir_in; in dwc2_hsotg_start_req() local
545 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_start_req()
546 epsize_reg = dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_start_req()
550 hs_ep->dir_in ? "in" : "out"); in dwc2_hsotg_start_req()
588 if (dir_in && index != 0) in dwc2_hsotg_start_req()
600 if (dir_in && ureq->zero && !continuing) { in dwc2_hsotg_start_req()
627 dma_reg = dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_hsotg_start_req()
654 if (dir_in && !using_dma(hsotg)) { in dwc2_hsotg_start_req()
665 if (dir_in) in dwc2_hsotg_start_req()
684 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 1); in dwc2_hsotg_start_req()
710 ret = usb_gadget_map_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_map_dma()
749 if (hs_ep->dir_in) in dwc2_hsotg_handle_unaligned_buf_start()
765 if (!hs_ep->dir_in && !hs_req->req.status) in dwc2_hsotg_handle_unaligned_buf_complete()
886 if (idx && ep->dir_in != dir) in ep_from_windex()
981 if (!ep0->dir_in) { in dwc2_hsotg_process_req_status()
1165 dev_dbg(hsotg->dev, "ep0 stall (dir=%d)\n", ep0->dir_in); in dwc2_hsotg_stall_ep0()
1166 reg = (ep0->dir_in) ? DIEPCTL0 : DOEPCTL0; in dwc2_hsotg_stall_ep0()
1211 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1214 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1217 ep0->dir_in = 0; in dwc2_hsotg_process_control()
1318 hsotg->eps_out[0]->dir_in = 0; in dwc2_hsotg_enqueue_setup()
1337 u32 epctl_reg = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_program_zlp()
1338 u32 epsiz_reg = hs_ep->dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_program_zlp()
1340 if (hs_ep->dir_in) in dwc2_hsotg_program_zlp()
1503 static void dwc2_hsotg_ep0_zlp(struct dwc2_hsotg *hsotg, bool dir_in) in dwc2_hsotg_ep0_zlp() argument
1506 hsotg->eps_out[0]->dir_in = dir_in; in dwc2_hsotg_ep0_zlp()
1507 hsotg->ep0_state = dir_in ? DWC2_EP0_STATUS_IN : DWC2_EP0_STATUS_OUT; in dwc2_hsotg_ep0_zlp()
1740 unsigned int ep, unsigned int mps, unsigned int dir_in) in dwc2_hsotg_set_ep_maxpacket() argument
1748 hs_ep = index_to_ep(hsotg, ep, dir_in); in dwc2_hsotg_set_ep_maxpacket()
1770 if (dir_in) { in dwc2_hsotg_set_ep_maxpacket()
1834 if (!hs_ep->dir_in || !hs_req) { in dwc2_hsotg_trytx()
1841 hs_ep->dir_in, 0); in dwc2_hsotg_trytx()
1948 int dir_in) in dwc2_hsotg_epint() argument
1950 struct dwc2_hsotg_ep *hs_ep = index_to_ep(hsotg, idx, dir_in); in dwc2_hsotg_epint()
1951 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_hsotg_epint()
1952 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_hsotg_epint()
1953 u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx); in dwc2_hsotg_epint()
1965 __func__, idx, dir_in ? "in" : "out"); in dwc2_hsotg_epint()
1970 __func__, idx, dir_in ? "in" : "out", ints); in dwc2_hsotg_epint()
1990 if (dir_in) { in dwc2_hsotg_epint()
2008 if (dir_in) { in dwc2_hsotg_epint()
2037 if (dir_in) in dwc2_hsotg_epint()
2047 if (dir_in && !hs_ep->isochronous) { in dwc2_hsotg_epint()
2228 if (!ep->dir_in) in dwc2_hsotg_irq_fifoempty()
2665 unsigned int dir_in; in dwc2_hsotg_ep_enable() local
2677 dir_in = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? 1 : 0; in dwc2_hsotg_ep_enable()
2678 if (dir_in != hs_ep->dir_in) { in dwc2_hsotg_ep_enable()
2687 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_enable()
2714 dwc2_hsotg_set_ep_maxpacket(hsotg, hs_ep->index, mps, dir_in); in dwc2_hsotg_ep_enable()
2731 if (dir_in) in dwc2_hsotg_ep_enable()
2740 if (dir_in) in dwc2_hsotg_ep_enable()
2766 if (dir_in && hsotg->dedicated_fifos && !hs_ep->fifo_index) { in dwc2_hsotg_ep_enable()
2807 dwc2_hsotg_ctrl_epint(hsotg, index, dir_in, 1); in dwc2_hsotg_ep_enable()
2822 int dir_in = hs_ep->dir_in; in dwc2_hsotg_ep_disable() local
2835 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_disable()
2852 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 0); in dwc2_hsotg_ep_disable()
2898 epctrl_reg = hs_ep->dir_in ? DIEPCTL(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
2900 epint_reg = hs_ep->dir_in ? DIEPINT(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
2905 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
2933 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
3007 if (hs_ep->dir_in) { in dwc2_hsotg_ep_sethalt()
3337 bool dir_in) in dwc2_hsotg_initep() argument
3343 else if (dir_in) in dwc2_hsotg_initep()
3348 hs_ep->dir_in = dir_in; in dwc2_hsotg_initep()
3373 if (dir_in) in dwc2_hsotg_initep()
3374 hs_ep->ep.caps.dir_in = true; in dwc2_hsotg_initep()
3385 if (dir_in) in dwc2_hsotg_initep()