• Home
  • Raw
  • Download

Lines Matching +full:full +full:- +full:frame

1 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
3 * hcd.h - DesignWare HS OTG Controller host-mode declarations
5 * Copyright (C) 2004-2013 Synopsys, Inc.
16 * 3. The names of the above-listed copyright holders may not be used
53 * struct dwc2_host_chan - Software host channel descriptor
60 * - USB_SPEED_LOW
61 * - USB_SPEED_FULL
62 * - USB_SPEED_HIGH
64 * - USB_ENDPOINT_XFER_CONTROL: 0
65 * - USB_ENDPOINT_XFER_ISOC: 1
66 * - USB_ENDPOINT_XFER_BULK: 2
67 * - USB_ENDPOINT_XFER_INTR: 3
73 * 3: MDATA (non-Control EP),
76 * (micro)frame
86 * @error_state: True if the error count for this transaction is non-zero
96 * @hub_port: Port of the low/full speed device for the split
98 * - DWC2_HCSPLT_XACTPOS_MID
99 * - DWC2_HCSPLT_XACTPOS_BEGIN
100 * - DWC2_HCSPLT_XACTPOS_END
101 * - DWC2_HCSPLT_XACTPOS_ALL
104 * @schinfo: Scheduling micro-frame bitmap
225 * struct dwc2_tt - dwc2 data associated with a usb_tt
229 * @periodic_bitmaps: Bitmap for which parts of the 1ms frame are accounted
242 * struct dwc2_hs_transfer_time - Info about a transfer on the high speed bus.
258 * struct dwc2_qh - Software queue head structure
262 * - USB_ENDPOINT_XFER_CONTROL
263 * - USB_ENDPOINT_XFER_BULK
264 * - USB_ENDPOINT_XFER_INT
265 * - USB_ENDPOINT_XFER_ISOC
270 * - USB_SPEED_LOW
271 * - USB_SPEED_FULL
272 * - USB_SPEED_HIGH
274 * non-controltransfers. Ignored for control transfers.
276 * - DWC2_HC_PID_DATA0
277 * - DWC2_HC_PID_DATA1
279 * @do_split: Full/low speed endpoint on high-speed hub requires split
289 * @next_active_frame: (Micro)frame _before_ we next need to put something on
292 * the host is in low speed mode this will be a full frame.
298 * Always >= 1 unless the host is in low/full speed mode.
300 * bus. Not used if host is in low or full speed mode (but
301 * note that it IS USED if the device is low or full speed
311 * is not dword-aligned
315 * @qh_list_entry: Entry for QH in either the periodic or non-periodic
324 * @wait_timer: Timer used to wait before re-queuing.
329 * @schedule_low_speed: True if we have a low/full speed component (either the
330 * host is in low/full speed mode or do_split).
331 * @want_wait: We should wait before re-queuing; only matters for non-
338 * be entered in either the non-periodic or periodic schedule.
383 * struct dwc2_qtd - Software queue transfer descriptor (QTD)
391 * - DWC2_HC_PID_DATA0
392 * - DWC2_HC_PID_DATA1
395 * @isoc_split_pos: Position of the ISOC split in full/low speed
396 * @isoc_frame_index: Index of the next frame descriptor for an isochronous
397 * transfer. A frame descriptor describes the buffer
399 * next scheduled (micro)frame of an isochronous transfer.
400 * It also holds status for that transaction. The frame
403 * current frame
408 * @isoc_frame_index_last: Last activated frame (packet) index, used in
425 * non-periodic or periodic schedule for execution. When a QTD is chosen for
463 return (struct usb_hcd *)hsotg->priv; in dwc2_hsotg_to_hcd()
470 * channel is re-assigned. In fact, subsequent handling may cause crashes
501 return pipe->ep_num; in dwc2_hcd_get_ep_num()
506 return pipe->pipe_type; in dwc2_hcd_get_pipe_type()
511 return pipe->maxp; in dwc2_hcd_get_maxp()
516 return pipe->maxp_mult; in dwc2_hcd_get_maxp_mult()
521 return pipe->dev_addr; in dwc2_hcd_get_dev_addr()
526 return pipe->pipe_type == USB_ENDPOINT_XFER_ISOC; in dwc2_hcd_is_pipe_isoc()
531 return pipe->pipe_type == USB_ENDPOINT_XFER_INT; in dwc2_hcd_is_pipe_int()
536 return pipe->pipe_type == USB_ENDPOINT_XFER_BULK; in dwc2_hcd_is_pipe_bulk()
541 return pipe->pipe_type == USB_ENDPOINT_XFER_CONTROL; in dwc2_hcd_is_pipe_control()
546 return pipe->pipe_dir == USB_DIR_IN; in dwc2_hcd_is_pipe_in()
583 list_del(&qtd->qtd_list_entry); in dwc2_hcd_qtd_unlink_and_free()
599 /* Check if QH is non-periodic */
601 ((_qh_ptr_)->ep_type == USB_ENDPOINT_XFER_BULK || \
602 (_qh_ptr_)->ep_type == USB_ENDPOINT_XFER_CONTROL)
612 return hc->ep_type == USB_ENDPOINT_XFER_BULK || in dbg_hc()
613 hc->ep_type == USB_ENDPOINT_XFER_CONTROL; in dbg_hc()
618 return qh->ep_type == USB_ENDPOINT_XFER_BULK || in dbg_qh()
619 qh->ep_type == USB_ENDPOINT_XFER_CONTROL; in dbg_qh()
624 return usb_pipetype(urb->pipe) == PIPE_BULK || in dbg_urb()
625 usb_pipetype(urb->pipe) == PIPE_CONTROL; in dbg_urb()
634 * frame number when the max index frame number is reached.
638 u16 diff = fr_idx1 - fr_idx2; in dwc2_frame_idx_num_gt()
647 * frame number when the max frame number is reached.
651 return ((frame2 - frame1) & HFNUM_MAX_FRNUM) <= (HFNUM_MAX_FRNUM >> 1); in dwc2_frame_num_le()
656 * modulo HFNUM_MAX_FRNUM. This accounts for the rollover of the frame
657 * number when the max frame number is reached.
662 ((frame1 - frame2) & HFNUM_MAX_FRNUM) < (HFNUM_MAX_FRNUM >> 1); in dwc2_frame_num_gt()
666 * Increments frame by the amount specified by inc. The addition is done
669 static inline u16 dwc2_frame_num_inc(u16 frame, u16 inc) in dwc2_frame_num_inc() argument
671 return (frame + inc) & HFNUM_MAX_FRNUM; in dwc2_frame_num_inc()
674 static inline u16 dwc2_frame_num_dec(u16 frame, u16 dec) in dwc2_frame_num_dec() argument
676 return (frame + HFNUM_MAX_FRNUM + 1 - dec) & HFNUM_MAX_FRNUM; in dwc2_frame_num_dec()
679 static inline u16 dwc2_full_frame_num(u16 frame) in dwc2_full_frame_num() argument
681 return (frame & HFNUM_MAX_FRNUM) >> 3; in dwc2_full_frame_num()
684 static inline u16 dwc2_micro_frame_num(u16 frame) in dwc2_micro_frame_num() argument
686 return frame & 0x7; in dwc2_micro_frame_num()
701 return dwc2_urb->status; in dwc2_hcd_urb_get_status()
707 return dwc2_urb->actual_length; in dwc2_hcd_urb_get_actual_length()
712 return dwc2_urb->error_count; in dwc2_hcd_urb_get_error_count()
719 dwc2_urb->iso_descs[desc_num].offset = offset; in dwc2_hcd_urb_set_iso_desc_params()
720 dwc2_urb->iso_descs[desc_num].length = length; in dwc2_hcd_urb_set_iso_desc_params()
726 return dwc2_urb->iso_descs[desc_num].status; in dwc2_hcd_urb_get_iso_desc_status()
732 return dwc2_urb->iso_descs[desc_num].actual_length; in dwc2_hcd_urb_get_iso_desc_actual_length()
738 struct dwc2_qh *qh = ep->hcpriv; in dwc2_hcd_is_bandwidth_allocated()
740 if (qh && !list_empty(&qh->qh_list_entry)) in dwc2_hcd_is_bandwidth_allocated()
749 struct dwc2_qh *qh = ep->hcpriv; in dwc2_hcd_get_ep_bandwidth()
756 return qh->host_us; in dwc2_hcd_get_ep_bandwidth()
766 * dwc2_handle_hcd_intr() - Called on every hardware interrupt
776 * dwc2_hcd_stop() - Halts the DWC_otg host mode operation
783 * dwc2_hcd_is_b_host() - Returns 1 if core currently is acting as B host,
791 * dwc2_hcd_dump_state() - Dumps hsotg state