Lines Matching refs:dir

61 static inline int hw_ep_bit(int num, int dir)  in hw_ep_bit()  argument
63 return num + ((dir == TX) ? 16 : 0); in hw_ep_bit()
104 static int hw_ep_flush(struct ci_hdrc *ci, int num, int dir) in hw_ep_flush() argument
106 int n = hw_ep_bit(num, dir); in hw_ep_flush()
126 static int hw_ep_disable(struct ci_hdrc *ci, int num, int dir) in hw_ep_disable() argument
129 (dir == TX) ? ENDPTCTRL_TXE : ENDPTCTRL_RXE, 0); in hw_ep_disable()
142 static int hw_ep_enable(struct ci_hdrc *ci, int num, int dir, int type) in hw_ep_enable() argument
146 if (dir == TX) { in hw_ep_enable()
177 static int hw_ep_get_halt(struct ci_hdrc *ci, int num, int dir) in hw_ep_get_halt() argument
179 u32 mask = (dir == TX) ? ENDPTCTRL_TXS : ENDPTCTRL_RXS; in hw_ep_get_halt()
193 static int hw_ep_prime(struct ci_hdrc *ci, int num, int dir, int is_ctrl) in hw_ep_prime() argument
195 int n = hw_ep_bit(num, dir); in hw_ep_prime()
200 if (is_ctrl && dir == RX && hw_read(ci, OP_ENDPTSETUPSTAT, BIT(num))) in hw_ep_prime()
207 if (is_ctrl && dir == RX && hw_read(ci, OP_ENDPTSETUPSTAT, BIT(num))) in hw_ep_prime()
224 static int hw_ep_set_halt(struct ci_hdrc *ci, int num, int dir, int value) in hw_ep_set_halt() argument
231 u32 mask_xs = (dir == TX) ? ENDPTCTRL_TXS : ENDPTCTRL_RXS; in hw_ep_set_halt()
232 u32 mask_xr = (dir == TX) ? ENDPTCTRL_TXR : ENDPTCTRL_RXR; in hw_ep_set_halt()
237 } while (value != hw_ep_get_halt(ci, num, dir)); in hw_ep_set_halt()
377 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == TX) { in add_td_to_list()
423 return ((ep->dir == TX) ? USB_ENDPOINT_DIR_MASK : 0) | ep->num; in _usb_addr()
457 if (hwreq->req.zero && hwreq->req.length && hwep->dir == TX in prepare_td_for_non_sg()
563 &hwreq->req, hwep->dir); in _hardware_enqueue()
592 int n = hw_ep_bit(hwep->num, hwep->dir); in _hardware_enqueue()
626 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == RX) { in _hardware_enqueue()
635 ret = hw_ep_prime(ci, hwep->num, hwep->dir, in _hardware_enqueue()
661 return hw_ep_prime(ci, hwep->num, hwep->dir, in reprime_dtd()
689 int n = hw_ep_bit(hwep->num, hwep->dir); in _hardware_dequeue()
715 if (hwep->dir == TX) { in _hardware_dequeue()
733 &hwreq->req, hwep->dir); in _hardware_dequeue()
758 hw_ep_flush(hwep->ci, hwep->num, hwep->dir); in _ep_nuke()
803 if (value && hwep->dir == TX && check_transfer && in _ep_set_halt()
810 direction = hwep->dir; in _ep_set_halt()
812 retval |= hw_ep_set_halt(hwep->ci, hwep->num, hwep->dir, value); in _ep_set_halt()
818 hwep->dir = (hwep->dir == TX) ? RX : TX; in _ep_set_halt()
820 } while (hwep->dir != direction); in _ep_set_halt()
991 int dir, num, retval; in isr_get_status_response() local
1015 dir = (le16_to_cpu(setup->wIndex) & USB_ENDPOINT_DIR_MASK) ? in isr_get_status_response()
1018 *(u16 *)req->buf = hw_ep_get_halt(ci, num, dir); in isr_get_status_response()
1149 int type, num, dir, err = -EINVAL; in isr_setup_packet_handler() local
1177 dir = (num & USB_ENDPOINT_DIR_MASK) ? TX : RX; in isr_setup_packet_handler()
1179 if (dir == TX) in isr_setup_packet_handler()
1229 dir = (num & USB_ENDPOINT_DIR_MASK) ? TX : RX; in isr_setup_packet_handler()
1231 if (dir == TX) in isr_setup_packet_handler()
1379 hwep->dir = usb_endpoint_dir_in(desc) ? TX : RX; in ep_enable()
1395 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == TX) in ep_enable()
1412 retval |= hw_ep_enable(hwep->ci, hwep->num, hwep->dir, in ep_enable()
1443 direction = hwep->dir; in ep_disable()
1446 retval |= hw_ep_disable(hwep->ci, hwep->num, hwep->dir); in ep_disable()
1449 hwep->dir = (hwep->dir == TX) ? RX : TX; in ep_disable()
1451 } while (hwep->dir != direction); in ep_disable()
1557 hw_ep_flush(hwep->ci, hwep->num, hwep->dir); in ep_dequeue()
1568 usb_gadget_unmap_request(&hwep->ci->gadget, req, hwep->dir); in ep_dequeue()
1633 hw_ep_flush(hwep->ci, hwep->num, hwep->dir); in ep_fifo_flush()