• Home
  • Raw
  • Download

Lines Matching refs:dir

60 static inline int hw_ep_bit(int num, int dir)  in hw_ep_bit()  argument
62 return num + ((dir == TX) ? 16 : 0); in hw_ep_bit()
101 static int hw_ep_flush(struct ci_hdrc *ci, int num, int dir) in hw_ep_flush() argument
103 int n = hw_ep_bit(num, dir); in hw_ep_flush()
122 static int hw_ep_disable(struct ci_hdrc *ci, int num, int dir) in hw_ep_disable() argument
125 (dir == TX) ? ENDPTCTRL_TXE : ENDPTCTRL_RXE, 0); in hw_ep_disable()
137 static int hw_ep_enable(struct ci_hdrc *ci, int num, int dir, int type) in hw_ep_enable() argument
141 if (dir == TX) { in hw_ep_enable()
171 static int hw_ep_get_halt(struct ci_hdrc *ci, int num, int dir) in hw_ep_get_halt() argument
173 u32 mask = (dir == TX) ? ENDPTCTRL_TXS : ENDPTCTRL_RXS; in hw_ep_get_halt()
186 static int hw_ep_prime(struct ci_hdrc *ci, int num, int dir, int is_ctrl) in hw_ep_prime() argument
188 int n = hw_ep_bit(num, dir); in hw_ep_prime()
193 if (is_ctrl && dir == RX && hw_read(ci, OP_ENDPTSETUPSTAT, BIT(num))) in hw_ep_prime()
200 if (is_ctrl && dir == RX && hw_read(ci, OP_ENDPTSETUPSTAT, BIT(num))) in hw_ep_prime()
216 static int hw_ep_set_halt(struct ci_hdrc *ci, int num, int dir, int value) in hw_ep_set_halt() argument
223 u32 mask_xs = (dir == TX) ? ENDPTCTRL_TXS : ENDPTCTRL_RXS; in hw_ep_set_halt()
224 u32 mask_xr = (dir == TX) ? ENDPTCTRL_TXR : ENDPTCTRL_RXR; in hw_ep_set_halt()
229 } while (value != hw_ep_get_halt(ci, num, dir)); in hw_ep_set_halt()
362 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == TX) { in add_td_to_list()
402 return ((ep->dir == TX) ? USB_ENDPOINT_DIR_MASK : 0) | ep->num; in _usb_addr()
427 &hwreq->req, hwep->dir); in _hardware_enqueue()
454 if (hwreq->req.zero && hwreq->req.length && hwep->dir == TX in _hardware_enqueue()
474 int n = hw_ep_bit(hwep->num, hwep->dir); in _hardware_enqueue()
502 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == RX) { in _hardware_enqueue()
511 ret = hw_ep_prime(ci, hwep->num, hwep->dir, in _hardware_enqueue()
537 return hw_ep_prime(ci, hwep->num, hwep->dir, in reprime_dtd()
564 int n = hw_ep_bit(hwep->num, hwep->dir); in _hardware_dequeue()
590 if (hwep->dir == TX) { in _hardware_dequeue()
608 &hwreq->req, hwep->dir); in _hardware_dequeue()
633 hw_ep_flush(hwep->ci, hwep->num, hwep->dir); in _ep_nuke()
678 if (value && hwep->dir == TX && check_transfer && in _ep_set_halt()
685 direction = hwep->dir; in _ep_set_halt()
687 retval |= hw_ep_set_halt(hwep->ci, hwep->num, hwep->dir, value); in _ep_set_halt()
693 hwep->dir = (hwep->dir == TX) ? RX : TX; in _ep_set_halt()
695 } while (hwep->dir != direction); in _ep_set_halt()
866 int dir, num, retval; in isr_get_status_response() local
890 dir = (le16_to_cpu(setup->wIndex) & USB_ENDPOINT_DIR_MASK) ? in isr_get_status_response()
893 *(u16 *)req->buf = hw_ep_get_halt(ci, num, dir); in isr_get_status_response()
1021 int type, num, dir, err = -EINVAL; in isr_setup_packet_handler() local
1049 dir = (num & USB_ENDPOINT_DIR_MASK) ? TX : RX; in isr_setup_packet_handler()
1051 if (dir == TX) in isr_setup_packet_handler()
1101 dir = (num & USB_ENDPOINT_DIR_MASK) ? TX : RX; in isr_setup_packet_handler()
1103 if (dir == TX) in isr_setup_packet_handler()
1251 hwep->dir = usb_endpoint_dir_in(desc) ? TX : RX; in ep_enable()
1267 if (hwep->type == USB_ENDPOINT_XFER_ISOC && hwep->dir == TX) in ep_enable()
1284 retval |= hw_ep_enable(hwep->ci, hwep->num, hwep->dir, in ep_enable()
1315 direction = hwep->dir; in ep_disable()
1318 retval |= hw_ep_disable(hwep->ci, hwep->num, hwep->dir); in ep_disable()
1321 hwep->dir = (hwep->dir == TX) ? RX : TX; in ep_disable()
1323 } while (hwep->dir != direction); in ep_disable()
1429 hw_ep_flush(hwep->ci, hwep->num, hwep->dir); in ep_dequeue()
1440 usb_gadget_unmap_request(&hwep->ci->gadget, req, hwep->dir); in ep_dequeue()
1505 hw_ep_flush(hwep->ci, hwep->num, hwep->dir); in ep_fifo_flush()