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()
221 unsigned int ep, unsigned int dir_in, in dwc2_hsotg_ctrl_epint() argument
228 if (!dir_in) in dwc2_hsotg_ctrl_epint()
698 if (hs_ep->dir_in) in get_ep_limit()
734 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_chain_limit() local
737 maxsize = (hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_LIMIT : in dwc2_gadget_get_chain_limit()
745 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_chain_limit()
772 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_desc_params() local
775 if (!hs_ep->index && !dir_in) { in dwc2_gadget_get_desc_params()
779 if (dir_in) { in dwc2_gadget_get_desc_params()
796 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) { in dwc2_gadget_get_desc_params()
810 int dir_in = hs_ep->dir_in; in dwc2_gadget_fill_nonisoc_xfer_ddma_one() local
830 if (!hs_ep->index && !dir_in) in dwc2_gadget_fill_nonisoc_xfer_ddma_one()
843 if (dir_in) in dwc2_gadget_fill_nonisoc_xfer_ddma_one()
938 __func__, hs_ep->index, hs_ep->dir_in ? "in" : "out", index); in dwc2_gadget_fill_isoc_desc()
947 if (hs_ep->dir_in) { in dwc2_gadget_fill_isoc_desc()
965 if (hs_ep->dir_in) in dwc2_gadget_fill_isoc_desc()
1024 depctl = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_gadget_start_isoc_ddma()
1025 dma_reg = hs_ep->dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_gadget_start_isoc_ddma()
1058 int dir_in = hs_ep->dir_in; in dwc2_hsotg_start_req() local
1081 dma_reg = dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_hsotg_start_req()
1082 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_start_req()
1083 epsize_reg = dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_start_req()
1087 hs_ep->dir_in ? "in" : "out"); in dwc2_hsotg_start_req()
1124 if (dir_in && index != 0) in dwc2_hsotg_start_req()
1136 if (dir_in && ureq->zero && !continuing) { in dwc2_hsotg_start_req()
1157 if (!dir_in) { in dwc2_hsotg_start_req()
1229 if (dir_in && !using_dma(hsotg)) { in dwc2_hsotg_start_req()
1251 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 1); in dwc2_hsotg_start_req()
1272 hs_ep->map_dir = hs_ep->dir_in; in dwc2_hsotg_map_dma()
1273 ret = usb_gadget_map_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_map_dma()
1313 if (hs_ep->dir_in) in dwc2_hsotg_handle_unaligned_buf_start()
1331 if (!hs_ep->dir_in && !hs_req->req.status) in dwc2_hsotg_handle_unaligned_buf_complete()
1447 if (hs_ep->dir_in && req->length > maxsize) { in dwc2_hsotg_ep_queue()
1453 if (!hs_ep->dir_in && req->length > hs_ep->ep.maxpacket) { in dwc2_hsotg_ep_queue()
1501 if (!hs_ep->index && !req->length && !hs_ep->dir_in && in dwc2_hsotg_ep_queue()
1503 hs_ep->dir_in = 1; in dwc2_hsotg_ep_queue()
1523 } else if (hs_ep->isochronous && hs_ep->dir_in && !hs_ep->req && in dwc2_hsotg_ep_queue()
1696 if (!ep0->dir_in) { in dwc2_hsotg_process_req_status()
1764 int dir_in = hs_ep->dir_in; in dwc2_gadget_start_next_request() local
1775 if (dir_in) { in dwc2_gadget_start_next_request()
1913 dev_dbg(hsotg->dev, "ep0 stall (dir=%d)\n", ep0->dir_in); in dwc2_hsotg_stall_ep0()
1914 reg = (ep0->dir_in) ? DIEPCTL0 : DOEPCTL0; in dwc2_hsotg_stall_ep0()
1959 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1962 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1965 ep0->dir_in = 0; in dwc2_hsotg_process_control()
2070 hsotg->eps_out[0]->dir_in = 0; in dwc2_hsotg_enqueue_setup()
2089 u32 epctl_reg = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_program_zlp()
2090 u32 epsiz_reg = hs_ep->dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_program_zlp()
2092 if (hs_ep->dir_in) in dwc2_hsotg_program_zlp()
2219 mask = hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_MASK : in dwc2_gadget_complete_isoc_request_ddma()
2227 if (!hs_ep->dir_in && ureq->length & 0x3) in dwc2_gadget_complete_isoc_request_ddma()
2258 if (!hs_ep->dir_in) in dwc2_gadget_handle_isoc_bna()
2341 static void dwc2_hsotg_ep0_zlp(struct dwc2_hsotg *hsotg, bool dir_in) in dwc2_hsotg_ep0_zlp() argument
2344 hsotg->eps_out[0]->dir_in = dir_in; in dwc2_hsotg_ep0_zlp()
2345 hsotg->ep0_state = dir_in ? DWC2_EP0_STATUS_IN : DWC2_EP0_STATUS_OUT; in dwc2_hsotg_ep0_zlp()
2367 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_xfersize_ddma() local
2374 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_xfersize_ddma()
2597 unsigned int mc, unsigned int dir_in) in dwc2_hsotg_set_ep_maxpacket() argument
2602 hs_ep = index_to_ep(hsotg, ep, dir_in); in dwc2_hsotg_set_ep_maxpacket()
2624 if (dir_in) { in dwc2_hsotg_set_ep_maxpacket()
2671 if (!hs_ep->dir_in || !hs_req) { in dwc2_hsotg_trytx()
2678 hs_ep->dir_in, 0); in dwc2_hsotg_trytx()
2719 hs_ep->dir_in = 0; in dwc2_hsotg_complete_in()
2807 unsigned int idx, int dir_in) in dwc2_gadget_read_ep_interrupts() argument
2809 u32 epmsk_reg = dir_in ? DIEPMSK : DOEPMSK; in dwc2_gadget_read_ep_interrupts()
2810 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_gadget_read_ep_interrupts()
2843 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_ep_disabled() local
2844 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_gadget_handle_ep_disabled()
2849 if (dir_in) { in dwc2_gadget_handle_ep_disabled()
2906 int dir_in = ep->dir_in; in dwc2_gadget_handle_out_token_ep_disabled() local
2908 if (dir_in || !ep->isochronous) in dwc2_gadget_handle_out_token_ep_disabled()
2974 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_nak() local
2977 if (!dir_in || !hs_ep->isochronous) in dwc2_gadget_handle_nak()
3071 int dir_in) in dwc2_hsotg_epint() argument
3073 struct dwc2_hsotg_ep *hs_ep = index_to_ep(hsotg, idx, dir_in); in dwc2_hsotg_epint()
3074 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_hsotg_epint()
3075 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_hsotg_epint()
3076 u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx); in dwc2_hsotg_epint()
3079 ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in); in dwc2_hsotg_epint()
3086 __func__, idx, dir_in ? "in" : "out"); in dwc2_hsotg_epint()
3091 __func__, idx, dir_in ? "in" : "out", ints); in dwc2_hsotg_epint()
3103 if (using_desc_dma(hsotg) && idx == 0 && !hs_ep->dir_in && in dwc2_hsotg_epint()
3116 } else if (dir_in) { in dwc2_hsotg_epint()
3160 if (dir_in) in dwc2_hsotg_epint()
3200 if (dir_in && !hs_ep->isochronous) { in dwc2_hsotg_epint()
3389 if (!ep->dir_in) in dwc2_hsotg_irq_fifoempty()
3945 epctrl_reg = hs_ep->dir_in ? DIEPCTL(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3947 epint_reg = hs_ep->dir_in ? DIEPINT(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3953 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
4011 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
4051 unsigned int dir_in; in dwc2_hsotg_ep_enable() local
4068 dir_in = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? 1 : 0; in dwc2_hsotg_ep_enable()
4069 if (dir_in != hs_ep->dir_in) { in dwc2_hsotg_ep_enable()
4080 dir_in && desc->bInterval > 10) { in dwc2_hsotg_ep_enable()
4088 !dir_in && mc > 1) { in dwc2_hsotg_ep_enable()
4096 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_enable()
4130 dwc2_hsotg_set_ep_maxpacket(hsotg, hs_ep->index, mps, mc, dir_in); in dwc2_hsotg_ep_enable()
4147 if (dir_in) { in dwc2_hsotg_ep_enable()
4165 if (dir_in) in dwc2_hsotg_ep_enable()
4183 if (dir_in && hsotg->dedicated_fifos) { in dwc2_hsotg_ep_enable()
4226 hs_ep->isochronous && dir_in) { in dwc2_hsotg_ep_enable()
4248 dwc2_hsotg_ctrl_epint(hsotg, index, dir_in, 1); in dwc2_hsotg_ep_enable()
4272 int dir_in = hs_ep->dir_in; in dwc2_hsotg_ep_disable() local
4289 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_disable()
4304 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 0); in dwc2_hsotg_ep_disable()
4418 if (hs_ep->dir_in) { in dwc2_hsotg_ep_sethalt()
4786 bool dir_in) in dwc2_hsotg_initep() argument
4792 else if (dir_in) in dwc2_hsotg_initep()
4797 hs_ep->dir_in = dir_in; in dwc2_hsotg_initep()
4829 if (dir_in) in dwc2_hsotg_initep()
4830 hs_ep->ep.caps.dir_in = true; in dwc2_hsotg_initep()
4842 if (dir_in) in dwc2_hsotg_initep()