Lines Matching refs:dir_in
61 u32 ep_index, u32 dir_in) in index_to_ep() argument
63 if (dir_in) in index_to_ep()
170 unsigned int ep, unsigned int dir_in, in dwc2_hsotg_ctrl_epint() argument
177 if (!dir_in) in dwc2_hsotg_ctrl_epint()
383 usb_gadget_unmap_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_unmap_dma()
625 if (hs_ep->dir_in) in get_ep_limit()
678 maxsize = hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_LIMIT : in dwc2_gadget_get_chain_limit()
707 int dir_in = hs_ep->dir_in; in dwc2_gadget_get_desc_params() local
710 if (!hs_ep->index && !dir_in) { in dwc2_gadget_get_desc_params()
714 if (dir_in) { in dwc2_gadget_get_desc_params()
746 int dir_in = hs_ep->dir_in; in dwc2_gadget_config_nonisoc_xfer_ddma() local
767 if (!hs_ep->index && !dir_in) in dwc2_gadget_config_nonisoc_xfer_ddma()
779 if (dir_in) in dwc2_gadget_config_nonisoc_xfer_ddma()
835 __func__, hs_ep->index, hs_ep->dir_in ? "in" : "out", index); in dwc2_gadget_fill_isoc_desc()
844 if (hs_ep->dir_in) { in dwc2_gadget_fill_isoc_desc()
862 if (hs_ep->dir_in) in dwc2_gadget_fill_isoc_desc()
915 depctl = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_gadget_start_isoc_ddma()
916 dma_reg = hs_ep->dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_gadget_start_isoc_ddma()
943 int dir_in = hs_ep->dir_in; in dwc2_hsotg_start_req() local
966 dma_reg = dir_in ? DIEPDMA(index) : DOEPDMA(index); in dwc2_hsotg_start_req()
967 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_start_req()
968 epsize_reg = dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_start_req()
972 hs_ep->dir_in ? "in" : "out"); in dwc2_hsotg_start_req()
1014 if (dir_in && index != 0) in dwc2_hsotg_start_req()
1026 if (dir_in && ureq->zero && !continuing) { in dwc2_hsotg_start_req()
1047 if (!dir_in) { in dwc2_hsotg_start_req()
1118 if (dir_in && !using_dma(hsotg)) { in dwc2_hsotg_start_req()
1140 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 1); in dwc2_hsotg_start_req()
1161 ret = usb_gadget_map_request(&hsotg->gadget, req, hs_ep->dir_in); in dwc2_hsotg_map_dma()
1201 if (hs_ep->dir_in) in dwc2_hsotg_handle_unaligned_buf_start()
1219 if (!hs_ep->dir_in && !hs_req->req.status) in dwc2_hsotg_handle_unaligned_buf_complete()
1322 if (hs_ep->dir_in && req->length > maxsize) { in dwc2_hsotg_ep_queue()
1328 if (!hs_ep->dir_in && req->length > hs_ep->ep.maxpacket) { in dwc2_hsotg_ep_queue()
1456 if (idx && ep->dir_in != dir) in ep_from_windex()
1551 if (!ep0->dir_in) { in dwc2_hsotg_process_req_status()
1620 int dir_in = hs_ep->dir_in; in dwc2_gadget_start_next_request() local
1622 u32 epmsk_reg = dir_in ? DIEPMSK : DOEPMSK; in dwc2_gadget_start_next_request()
1632 if (dir_in) { in dwc2_gadget_start_next_request()
1769 dev_dbg(hsotg->dev, "ep0 stall (dir=%d)\n", ep0->dir_in); in dwc2_hsotg_stall_ep0()
1770 reg = (ep0->dir_in) ? DIEPCTL0 : DOEPCTL0; in dwc2_hsotg_stall_ep0()
1815 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1818 ep0->dir_in = 1; in dwc2_hsotg_process_control()
1821 ep0->dir_in = 0; in dwc2_hsotg_process_control()
1922 hsotg->eps_out[0]->dir_in = 0; in dwc2_hsotg_enqueue_setup()
1941 u32 epctl_reg = hs_ep->dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_program_zlp()
1942 u32 epsiz_reg = hs_ep->dir_in ? DIEPTSIZ(index) : DOEPTSIZ(index); in dwc2_hsotg_program_zlp()
1944 if (hs_ep->dir_in) in dwc2_hsotg_program_zlp()
2071 mask = hs_ep->dir_in ? DEV_DMA_ISOC_TX_NBYTES_MASK : in dwc2_gadget_complete_isoc_request_ddma()
2079 if (!hs_ep->dir_in && ureq->length & 0x3) in dwc2_gadget_complete_isoc_request_ddma()
2105 if (!hs_ep->dir_in) in dwc2_gadget_handle_isoc_bna()
2188 static void dwc2_hsotg_ep0_zlp(struct dwc2_hsotg *hsotg, bool dir_in) in dwc2_hsotg_ep0_zlp() argument
2191 hsotg->eps_out[0]->dir_in = dir_in; in dwc2_hsotg_ep0_zlp()
2192 hsotg->ep0_state = dir_in ? DWC2_EP0_STATUS_IN : DWC2_EP0_STATUS_OUT; in dwc2_hsotg_ep0_zlp()
2447 unsigned int mc, unsigned int dir_in) in dwc2_hsotg_set_ep_maxpacket() argument
2452 hs_ep = index_to_ep(hsotg, ep, dir_in); in dwc2_hsotg_set_ep_maxpacket()
2474 if (dir_in) { in dwc2_hsotg_set_ep_maxpacket()
2521 if (!hs_ep->dir_in || !hs_req) { in dwc2_hsotg_trytx()
2528 hs_ep->dir_in, 0); in dwc2_hsotg_trytx()
2569 hs_ep->dir_in = 0; in dwc2_hsotg_complete_in()
2649 unsigned int idx, int dir_in) in dwc2_gadget_read_ep_interrupts() argument
2651 u32 epmsk_reg = dir_in ? DIEPMSK : DOEPMSK; in dwc2_gadget_read_ep_interrupts()
2652 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_gadget_read_ep_interrupts()
2685 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_ep_disabled() local
2686 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_gadget_handle_ep_disabled()
2691 if (dir_in) { in dwc2_gadget_handle_ep_disabled()
2751 int dir_in = ep->dir_in; in dwc2_gadget_handle_out_token_ep_disabled() local
2754 if (dir_in || !ep->isochronous) in dwc2_gadget_handle_out_token_ep_disabled()
2805 int dir_in = hs_ep->dir_in; in dwc2_gadget_handle_nak() local
2807 if (!dir_in || !hs_ep->isochronous) in dwc2_gadget_handle_nak()
2848 int dir_in) in dwc2_hsotg_epint() argument
2850 struct dwc2_hsotg_ep *hs_ep = index_to_ep(hsotg, idx, dir_in); in dwc2_hsotg_epint()
2851 u32 epint_reg = dir_in ? DIEPINT(idx) : DOEPINT(idx); in dwc2_hsotg_epint()
2852 u32 epctl_reg = dir_in ? DIEPCTL(idx) : DOEPCTL(idx); in dwc2_hsotg_epint()
2853 u32 epsiz_reg = dir_in ? DIEPTSIZ(idx) : DOEPTSIZ(idx); in dwc2_hsotg_epint()
2857 ints = dwc2_gadget_read_ep_interrupts(hsotg, idx, dir_in); in dwc2_hsotg_epint()
2865 __func__, idx, dir_in ? "in" : "out"); in dwc2_hsotg_epint()
2870 __func__, idx, dir_in ? "in" : "out", ints); in dwc2_hsotg_epint()
2882 if (using_desc_dma(hsotg) && idx == 0 && !hs_ep->dir_in && in dwc2_hsotg_epint()
2897 } else if (dir_in) { in dwc2_hsotg_epint()
2947 if (dir_in) in dwc2_hsotg_epint()
2975 if (dir_in && !hs_ep->isochronous) { in dwc2_hsotg_epint()
3162 if (!ep->dir_in) in dwc2_hsotg_irq_fifoempty()
3690 epctrl_reg = hs_ep->dir_in ? DIEPCTL(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3692 epint_reg = hs_ep->dir_in ? DIEPINT(hs_ep->index) : in dwc2_hsotg_ep_stop_xfr()
3698 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
3738 if (hs_ep->dir_in) { in dwc2_hsotg_ep_stop_xfr()
3778 unsigned int dir_in; in dwc2_hsotg_ep_enable() local
3794 dir_in = (desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK) ? 1 : 0; in dwc2_hsotg_ep_enable()
3795 if (dir_in != hs_ep->dir_in) { in dwc2_hsotg_ep_enable()
3806 dir_in && desc->bInterval > 10) { in dwc2_hsotg_ep_enable()
3814 !dir_in && mc > 1) { in dwc2_hsotg_ep_enable()
3822 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_enable()
3852 dwc2_hsotg_set_ep_maxpacket(hsotg, hs_ep->index, mps, mc, dir_in); in dwc2_hsotg_ep_enable()
3869 if (dir_in) { in dwc2_hsotg_ep_enable()
3886 if (dir_in) in dwc2_hsotg_ep_enable()
3904 if (dir_in && hsotg->dedicated_fifos) { in dwc2_hsotg_ep_enable()
3945 hs_ep->isochronous && dir_in) { in dwc2_hsotg_ep_enable()
3967 dwc2_hsotg_ctrl_epint(hsotg, index, dir_in, 1); in dwc2_hsotg_ep_enable()
3991 int dir_in = hs_ep->dir_in; in dwc2_hsotg_ep_disable() local
4009 epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index); in dwc2_hsotg_ep_disable()
4026 dwc2_hsotg_ctrl_epint(hsotg, hs_ep->index, hs_ep->dir_in, 0); in dwc2_hsotg_ep_disable()
4128 if (hs_ep->dir_in) { in dwc2_hsotg_ep_sethalt()
4471 bool dir_in) in dwc2_hsotg_initep() argument
4477 else if (dir_in) in dwc2_hsotg_initep()
4482 hs_ep->dir_in = dir_in; in dwc2_hsotg_initep()
4514 if (dir_in) in dwc2_hsotg_initep()
4515 hs_ep->ep.caps.dir_in = true; in dwc2_hsotg_initep()
4527 if (dir_in) in dwc2_hsotg_initep()