Lines Matching refs:dir_in
63 u32 ep_index, u32 dir_in) in index_to_ep() argument
65 if (dir_in) in index_to_ep()
190 unsigned int ep, unsigned int dir_in, in dwc2_hsotg_ctrl_epint() argument
197 if (!dir_in) in dwc2_hsotg_ctrl_epint()
425 usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_unmap_dma()
667 if (hs_ep->dir_in) in get_ep_limit()
720 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_chain_limit() local
723 maxsize = (hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_LIMIT : in dwc2_gadget_get_chain_limit()
731 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_chain_limit()
758 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_desc_params() local
761 if (!hs_ep->index && !dir_in) { in dwc2_gadget_get_desc_params()
765 if (dir_in) { in dwc2_gadget_get_desc_params()
782 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) { in dwc2_gadget_get_desc_params()
796 int dir_in = hs_ep->dir_in; in dwc2_gadget_fill_nonisoc_xfer_ddma_one() local
816 if (!hs_ep->index && !dir_in) in dwc2_gadget_fill_nonisoc_xfer_ddma_one()
829 if (dir_in) in dwc2_gadget_fill_nonisoc_xfer_ddma_one()
924 __func__, hs_ep->index, hs_ep->dir_in ? "in" : "out", index); in dwc2_gadget_fill_isoc_desc()
933 if (hs_ep->dir_in) { in dwc2_gadget_fill_isoc_desc()
951 if (hs_ep->dir_in) in dwc2_gadget_fill_isoc_desc()
1010 depctl = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_gadget_start_isoc_ddma()
1011 dma_reg = hs_ep->dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_gadget_start_isoc_ddma()
1038 int dir_in = hs_ep->dir_in; in dwc2_hsotg_start_req() local
1061 dma_reg = dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_hsotg_start_req()
1062 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_start_req()
1063 epsize_reg = dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_start_req()
1067 hs_ep->dir_in ? "in" : "out"); in dwc2_hsotg_start_req()
1104 if (dir_in && index != 0) in dwc2_hsotg_start_req()
1116 if (dir_in && ureq->zero && !continuing) { in dwc2_hsotg_start_req()
1137 if (!dir_in) { in dwc2_hsotg_start_req()
1202 if (dir_in && !using_dma(hsotg)) { in dwc2_hsotg_start_req()
1224 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 1); in dwc2_hsotg_start_req()
1245 ret = usb_gadget_map_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_map_dma()
1285 if (hs_ep->dir_in) in dwc2_hsotg_handle_unaligned_buf_start()
1303 if (!hs_ep->dir_in && !hs_req->req.status) in dwc2_hsotg_handle_unaligned_buf_complete()
1413 if (hs_ep->dir_in && req->length > maxsize) { in dwc2_hsotg_ep_queue()
1419 if (!hs_ep->dir_in && req->length > hs_ep->ep.maxpacket) { in dwc2_hsotg_ep_queue()
1467 if (!hs_ep->index && !req->length && !hs_ep->dir_in && in dwc2_hsotg_ep_queue()
1469 hs_ep->dir_in = 1; in dwc2_hsotg_ep_queue()
1558 if (idx && ep->dir_in != dir) in ep_from_windex()
1654 if (!ep0->dir_in) { in dwc2_hsotg_process_req_status()
1723 int dir_in = hs_ep->dir_in; in dwc2_gadget_start_next_request() local
1725 u32 epmsk_reg = dir_in ? DIEPMSK : DOEPMSK; in dwc2_gadget_start_next_request()
1735 if (dir_in) { in dwc2_gadget_start_next_request()
1876 dev_dbg(hsotg->dev, "ep0 stall (dir=%d)\n", ep0->dir_in); in dwc2_hsotg_stall_ep0()
1877 reg = (ep0->dir_in) ? DIEPCTL0 : DOEPCTL0; in dwc2_hsotg_stall_ep0()
1922 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1925 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1928 ep0->dir_in = 0; in dwc2_hsotg_process_control()
2033 hsotg->eps_out[0]->dir_in = 0; in dwc2_hsotg_enqueue_setup()
2052 u32 epctl_reg = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_program_zlp()
2053 u32 epsiz_reg = hs_ep->dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_program_zlp()
2055 if (hs_ep->dir_in) in dwc2_hsotg_program_zlp()
2182 mask = hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_MASK : in dwc2_gadget_complete_isoc_request_ddma()
2190 if (!hs_ep->dir_in && ureq->length & 0x3) in dwc2_gadget_complete_isoc_request_ddma()
2221 if (!hs_ep->dir_in) in dwc2_gadget_handle_isoc_bna()
2304 static void dwc2_hsotg_ep0_zlp(struct dwc2_hsotg *hsotg, bool dir_in) in dwc2_hsotg_ep0_zlp() argument
2307 hsotg->eps_out[0]->dir_in = dir_in; in dwc2_hsotg_ep0_zlp()
2308 hsotg->ep0_state = dir_in ? DWC2_EP0_STATUS_IN : DWC2_EP0_STATUS_OUT; in dwc2_hsotg_ep0_zlp()
2343 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_xfersize_ddma() local
2350 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_xfersize_ddma()
2582 unsigned int mc, unsigned int dir_in) in dwc2_hsotg_set_ep_maxpacket() argument
2587 hs_ep = index_to_ep(hsotg, ep, dir_in); in dwc2_hsotg_set_ep_maxpacket()
2609 if (dir_in) { in dwc2_hsotg_set_ep_maxpacket()
2656 if (!hs_ep->dir_in || !hs_req) { in dwc2_hsotg_trytx()
2663 hs_ep->dir_in, 0); in dwc2_hsotg_trytx()
2704 hs_ep->dir_in = 0; in dwc2_hsotg_complete_in()
2784 unsigned int idx, int dir_in) in dwc2_gadget_read_ep_interrupts() argument
2786 u32 epmsk_reg = dir_in ? DIEPMSK : DOEPMSK; in dwc2_gadget_read_ep_interrupts()
2787 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_gadget_read_ep_interrupts()
2820 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_ep_disabled() local
2821 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_gadget_handle_ep_disabled()
2826 if (dir_in) { in dwc2_gadget_handle_ep_disabled()
2886 int dir_in = ep->dir_in; in dwc2_gadget_handle_out_token_ep_disabled() local
2889 if (dir_in || !ep->isochronous) in dwc2_gadget_handle_out_token_ep_disabled()
2940 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_nak() local
2942 if (!dir_in || !hs_ep->isochronous) in dwc2_gadget_handle_nak()
3000 int dir_in) in dwc2_hsotg_epint() argument
3002 struct dwc2_hsotg_ep *hs_ep = index_to_ep(hsotg, idx, dir_in); in dwc2_hsotg_epint()
3003 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_hsotg_epint()
3004 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_hsotg_epint()
3005 u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx); in dwc2_hsotg_epint()
3008 ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in); in dwc2_hsotg_epint()
3015 __func__, idx, dir_in ? "in" : "out"); in dwc2_hsotg_epint()
3020 __func__, idx, dir_in ? "in" : "out", ints); in dwc2_hsotg_epint()
3032 if (using_desc_dma(hsotg) && idx == 0 && !hs_ep->dir_in && in dwc2_hsotg_epint()
3047 } else if (dir_in) { in dwc2_hsotg_epint()
3097 if (dir_in) in dwc2_hsotg_epint()
3137 if (dir_in && !hs_ep->isochronous) { in dwc2_hsotg_epint()
3326 if (!ep->dir_in) in dwc2_hsotg_irq_fifoempty()
3881 epctrl_reg = hs_ep->dir_in ? DIEPCTL(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3883 epint_reg = hs_ep->dir_in ? DIEPINT(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3889 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
3929 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
3969 unsigned int dir_in; in dwc2_hsotg_ep_enable() local
3986 dir_in = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? 1 : 0; in dwc2_hsotg_ep_enable()
3987 if (dir_in != hs_ep->dir_in) { in dwc2_hsotg_ep_enable()
3998 dir_in && desc->bInterval > 10) { in dwc2_hsotg_ep_enable()
4006 !dir_in && mc > 1) { in dwc2_hsotg_ep_enable()
4014 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_enable()
4048 dwc2_hsotg_set_ep_maxpacket(hsotg, hs_ep->index, mps, mc, dir_in); in dwc2_hsotg_ep_enable()
4065 if (dir_in) { in dwc2_hsotg_ep_enable()
4082 if (dir_in) in dwc2_hsotg_ep_enable()
4100 if (dir_in && hsotg->dedicated_fifos) { in dwc2_hsotg_ep_enable()
4143 hs_ep->isochronous && dir_in) { in dwc2_hsotg_ep_enable()
4165 dwc2_hsotg_ctrl_epint(hsotg, index, dir_in, 1); in dwc2_hsotg_ep_enable()
4189 int dir_in = hs_ep->dir_in; in dwc2_hsotg_ep_disable() local
4206 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_disable()
4221 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 0); in dwc2_hsotg_ep_disable()
4335 if (hs_ep->dir_in) { in dwc2_hsotg_ep_sethalt()
4688 bool dir_in) in dwc2_hsotg_initep() argument
4694 else if (dir_in) in dwc2_hsotg_initep()
4699 hs_ep->dir_in = dir_in; in dwc2_hsotg_initep()
4731 if (dir_in) in dwc2_hsotg_initep()
4732 hs_ep->ep.caps.dir_in = true; in dwc2_hsotg_initep()
4744 if (dir_in) in dwc2_hsotg_initep()