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()
202 unsigned int ep, unsigned int dir_in, in dwc2_hsotg_ctrl_epint() argument
209 if (!dir_in) in dwc2_hsotg_ctrl_epint()
679 if (hs_ep->dir_in) in get_ep_limit()
732 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_chain_limit() local
735 maxsize = (hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_LIMIT : in dwc2_gadget_get_chain_limit()
743 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_chain_limit()
770 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_desc_params() local
773 if (!hs_ep->index && !dir_in) { in dwc2_gadget_get_desc_params()
777 if (dir_in) { in dwc2_gadget_get_desc_params()
794 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) { in dwc2_gadget_get_desc_params()
808 int dir_in = hs_ep->dir_in; in dwc2_gadget_fill_nonisoc_xfer_ddma_one() local
828 if (!hs_ep->index && !dir_in) in dwc2_gadget_fill_nonisoc_xfer_ddma_one()
841 if (dir_in) in dwc2_gadget_fill_nonisoc_xfer_ddma_one()
936 __func__, hs_ep->index, hs_ep->dir_in ? "in" : "out", index); in dwc2_gadget_fill_isoc_desc()
945 if (hs_ep->dir_in) { in dwc2_gadget_fill_isoc_desc()
963 if (hs_ep->dir_in) in dwc2_gadget_fill_isoc_desc()
1022 depctl = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_gadget_start_isoc_ddma()
1023 dma_reg = hs_ep->dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_gadget_start_isoc_ddma()
1056 int dir_in = hs_ep->dir_in; in dwc2_hsotg_start_req() local
1079 dma_reg = dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_hsotg_start_req()
1080 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_start_req()
1081 epsize_reg = dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_start_req()
1085 hs_ep->dir_in ? "in" : "out"); in dwc2_hsotg_start_req()
1122 if (dir_in && index != 0) in dwc2_hsotg_start_req()
1134 if (dir_in && ureq->zero && !continuing) { in dwc2_hsotg_start_req()
1155 if (!dir_in) { in dwc2_hsotg_start_req()
1225 if (dir_in && !using_dma(hsotg)) { in dwc2_hsotg_start_req()
1247 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 1); in dwc2_hsotg_start_req()
1268 hs_ep->map_dir = hs_ep->dir_in; in dwc2_hsotg_map_dma()
1269 ret = usb_gadget_map_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_map_dma()
1309 if (hs_ep->dir_in) in dwc2_hsotg_handle_unaligned_buf_start()
1327 if (!hs_ep->dir_in && !hs_req->req.status) in dwc2_hsotg_handle_unaligned_buf_complete()
1441 if (hs_ep->dir_in && req->length > maxsize) { in dwc2_hsotg_ep_queue()
1447 if (!hs_ep->dir_in && req->length > hs_ep->ep.maxpacket) { in dwc2_hsotg_ep_queue()
1495 if (!hs_ep->index && !req->length && !hs_ep->dir_in && in dwc2_hsotg_ep_queue()
1497 hs_ep->dir_in = 1; in dwc2_hsotg_ep_queue()
1676 if (!ep0->dir_in) { in dwc2_hsotg_process_req_status()
1744 int dir_in = hs_ep->dir_in; in dwc2_gadget_start_next_request() local
1755 if (dir_in) { in dwc2_gadget_start_next_request()
1894 dev_dbg(hsotg->dev, "ep0 stall (dir=%d)\n", ep0->dir_in); in dwc2_hsotg_stall_ep0()
1895 reg = (ep0->dir_in) ? DIEPCTL0 : DOEPCTL0; in dwc2_hsotg_stall_ep0()
1940 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1943 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1946 ep0->dir_in = 0; in dwc2_hsotg_process_control()
2051 hsotg->eps_out[0]->dir_in = 0; in dwc2_hsotg_enqueue_setup()
2070 u32 epctl_reg = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_program_zlp()
2071 u32 epsiz_reg = hs_ep->dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_program_zlp()
2073 if (hs_ep->dir_in) in dwc2_hsotg_program_zlp()
2200 mask = hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_MASK : in dwc2_gadget_complete_isoc_request_ddma()
2208 if (!hs_ep->dir_in && ureq->length & 0x3) in dwc2_gadget_complete_isoc_request_ddma()
2239 if (!hs_ep->dir_in) in dwc2_gadget_handle_isoc_bna()
2322 static void dwc2_hsotg_ep0_zlp(struct dwc2_hsotg *hsotg, bool dir_in) in dwc2_hsotg_ep0_zlp() argument
2325 hsotg->eps_out[0]->dir_in = dir_in; in dwc2_hsotg_ep0_zlp()
2326 hsotg->ep0_state = dir_in ? DWC2_EP0_STATUS_IN : DWC2_EP0_STATUS_OUT; in dwc2_hsotg_ep0_zlp()
2348 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_xfersize_ddma() local
2355 if (usb_endpoint_xfer_int(ep_desc) && !dir_in && (mps % 4)) in dwc2_gadget_get_xfersize_ddma()
2578 unsigned int mc, unsigned int dir_in) in dwc2_hsotg_set_ep_maxpacket() argument
2583 hs_ep = index_to_ep(hsotg, ep, dir_in); in dwc2_hsotg_set_ep_maxpacket()
2605 if (dir_in) { in dwc2_hsotg_set_ep_maxpacket()
2652 if (!hs_ep->dir_in || !hs_req) { in dwc2_hsotg_trytx()
2659 hs_ep->dir_in, 0); in dwc2_hsotg_trytx()
2700 hs_ep->dir_in = 0; in dwc2_hsotg_complete_in()
2788 unsigned int idx, int dir_in) in dwc2_gadget_read_ep_interrupts() argument
2790 u32 epmsk_reg = dir_in ? DIEPMSK : DOEPMSK; in dwc2_gadget_read_ep_interrupts()
2791 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_gadget_read_ep_interrupts()
2824 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_ep_disabled() local
2825 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_gadget_handle_ep_disabled()
2830 if (dir_in) { in dwc2_gadget_handle_ep_disabled()
2884 int dir_in = ep->dir_in; in dwc2_gadget_handle_out_token_ep_disabled() local
2886 if (dir_in || !ep->isochronous) in dwc2_gadget_handle_out_token_ep_disabled()
2949 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_nak() local
2952 if (!dir_in || !hs_ep->isochronous) in dwc2_gadget_handle_nak()
3026 int dir_in) in dwc2_hsotg_epint() argument
3028 struct dwc2_hsotg_ep *hs_ep = index_to_ep(hsotg, idx, dir_in); in dwc2_hsotg_epint()
3029 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_hsotg_epint()
3030 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_hsotg_epint()
3031 u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx); in dwc2_hsotg_epint()
3034 ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in); in dwc2_hsotg_epint()
3041 __func__, idx, dir_in ? "in" : "out"); in dwc2_hsotg_epint()
3046 __func__, idx, dir_in ? "in" : "out", ints); in dwc2_hsotg_epint()
3058 if (using_desc_dma(hsotg) && idx == 0 && !hs_ep->dir_in && in dwc2_hsotg_epint()
3071 } else if (dir_in) { in dwc2_hsotg_epint()
3115 if (dir_in) in dwc2_hsotg_epint()
3155 if (dir_in && !hs_ep->isochronous) { in dwc2_hsotg_epint()
3344 if (!ep->dir_in) in dwc2_hsotg_irq_fifoempty()
3899 epctrl_reg = hs_ep->dir_in ? DIEPCTL(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3901 epint_reg = hs_ep->dir_in ? DIEPINT(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3907 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
3965 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
4005 unsigned int dir_in; in dwc2_hsotg_ep_enable() local
4022 dir_in = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? 1 : 0; in dwc2_hsotg_ep_enable()
4023 if (dir_in != hs_ep->dir_in) { in dwc2_hsotg_ep_enable()
4034 dir_in && desc->bInterval > 10) { in dwc2_hsotg_ep_enable()
4042 !dir_in && mc > 1) { in dwc2_hsotg_ep_enable()
4050 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_enable()
4084 dwc2_hsotg_set_ep_maxpacket(hsotg, hs_ep->index, mps, mc, dir_in); in dwc2_hsotg_ep_enable()
4102 if (dir_in) { in dwc2_hsotg_ep_enable()
4120 if (dir_in) in dwc2_hsotg_ep_enable()
4138 if (dir_in && hsotg->dedicated_fifos) { in dwc2_hsotg_ep_enable()
4181 hs_ep->isochronous && dir_in) { in dwc2_hsotg_ep_enable()
4203 dwc2_hsotg_ctrl_epint(hsotg, index, dir_in, 1); in dwc2_hsotg_ep_enable()
4227 int dir_in = hs_ep->dir_in; in dwc2_hsotg_ep_disable() local
4244 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_disable()
4259 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 0); in dwc2_hsotg_ep_disable()
4394 if (hs_ep->dir_in) { in dwc2_hsotg_ep_sethalt()
4780 bool dir_in) in dwc2_hsotg_initep() argument
4786 else if (dir_in) in dwc2_hsotg_initep()
4791 hs_ep->dir_in = dir_in; in dwc2_hsotg_initep()
4823 if (dir_in) in dwc2_hsotg_initep()
4824 hs_ep->ep.caps.dir_in = true; in dwc2_hsotg_initep()
4836 if (dir_in) in dwc2_hsotg_initep()