#include "dwc_otg_hcd.h"
#include "dwc_otg_regs.h"
Go to the source code of this file.
Defines | |
| #define | BitStuffTime(bytecount) ((8 * 7* bytecount) / 6) |
| #define | HS_HOST_DELAY 5 |
| #define | FS_LS_HOST_DELAY 1000 |
| #define | HUB_LS_SETUP 333 |
| #define | NS_TO_US(ns) ((ns + 500) / 1000) |
| #define | SCHEDULE_SLOP 10 |
| Initializes a QH structure. | |
Functions | |
| void | dwc_otg_hcd_qh_free (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) |
| Free each QTD in the QH's QTD-list then free the QH. | |
| uint32_t | calc_bus_time (int speed, int is_in, int is_isoc, int bytecount) |
| void | qh_init (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh, dwc_otg_hcd_urb_t *urb) |
| dwc_otg_qh_t * | dwc_otg_hcd_qh_create (dwc_otg_hcd_t *hcd, dwc_otg_hcd_urb_t *urb, int atomic_alloc) |
| This function allocates and initializes a QH. | |
| int | periodic_channel_available (dwc_otg_hcd_t *hcd) |
| Checks that a channel is available for a periodic transfer. | |
| int | check_periodic_bandwidth (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) |
| Checks that there is sufficient bandwidth for the specified QH in the periodic schedule. | |
| int | check_max_xfer_size (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) |
| Checks that the max transfer size allowed in a host channel is large enough to handle the maximum data transfer in a single (micro)frame for a periodic transfer. | |
| int | schedule_periodic (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) |
| Schedules an interrupt or isochronous transfer in the periodic schedule. | |
| int | dwc_otg_hcd_qh_add (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) |
| This function adds a QH to either the non periodic or periodic schedule if it is not already in the schedule. | |
| void | deschedule_periodic (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) |
| Removes an interrupt or isochronous transfer from the periodic schedule. | |
| void | dwc_otg_hcd_qh_remove (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh) |
| Removes a QH from either the non-periodic or periodic schedule. | |
| void | dwc_otg_hcd_qh_deactivate (dwc_otg_hcd_t *hcd, dwc_otg_qh_t *qh, int sched_next_periodic_split) |
| Deactivates a QH. | |
| dwc_otg_qtd_t * | dwc_otg_hcd_qtd_create (dwc_otg_hcd_urb_t *urb, int atomic_alloc) |
| This function allocates and initializes a QTD. | |
| void | dwc_otg_hcd_qtd_init (dwc_otg_qtd_t *qtd, dwc_otg_hcd_urb_t *urb) |
| Initializes a QTD structure. | |
| int | dwc_otg_hcd_qtd_add (dwc_otg_qtd_t *qtd, dwc_otg_hcd_t *hcd, dwc_otg_qh_t **qh, int atomic_alloc) |
| This function adds a QTD to the QTD-list of a QH. | |
Definition in file dwc_otg_hcd_queue.c.
|
|
Initializes a QH structure.
Definition at line 154 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
Free each QTD in the QH's QTD-list then free the QH. QH should already be removed from a list. QTD list should already be empty if called from URB Dequeue.
Definition at line 53 of file dwc_otg_hcd_queue.c. |
|
||||||||||||||||
|
Definition at line 155 of file dwc_otg_hcd_queue.c. |
|
||||||||||||||||
|
This function allocates and initializes a QH.
Definition at line 290 of file dwc_otg_hcd_queue.c. |
|
|
Checks that a channel is available for a periodic transfer.
Definition at line 319 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
Checks that there is sufficient bandwidth for the specified QH in the periodic schedule. For simplicity, this calculation assumes that all the transfers in the periodic schedule may occur in the same (micro)frame.
Definition at line 352 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
Checks that the max transfer size allowed in a host channel is large enough to handle the maximum data transfer in a single (micro)frame for a periodic transfer.
Definition at line 392 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
Schedules an interrupt or isochronous transfer in the periodic schedule.
Definition at line 421 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
This function adds a QH to either the non periodic or periodic schedule if it is not already in the schedule. If the QH is already in the schedule, no action is taken.
Definition at line 468 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
Removes an interrupt or isochronous transfer from the periodic schedule.
Definition at line 502 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
Removes a QH from either the non-periodic or periodic schedule. Memory is not freed.
Definition at line 519 of file dwc_otg_hcd_queue.c. |
|
||||||||||||||||
|
Deactivates a QH. For non-periodic QHs, removes the QH from the active non-periodic schedule. The QH is added to the inactive non-periodic schedule if any QTDs are still attached to the QH. For periodic QHs, the QH is removed from the periodic queued schedule. If there are any QTDs still attached to the QH, the QH is added to either the periodic inactive schedule or the periodic ready schedule and its next scheduled frame is calculated. The QH is placed in the ready schedule if the scheduled frame has been reached already. Otherwise it's placed in the inactive schedule. If there are no QTDs attached to the QH, the QH is completely removed from the periodic schedule. Definition at line 558 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
This function allocates and initializes a QTD.
Definition at line 638 of file dwc_otg_hcd_queue.c. |
|
||||||||||||
|
Initializes a QTD structure.
Definition at line 656 of file dwc_otg_hcd_queue.c. |
|
||||||||||||||||||||
|
This function adds a QTD to the QTD-list of a QH. It will find the correct QH to place the QTD into. If it does not find a QH, then it will create a new QH. If the QH to which the QTD is added is not currently scheduled, it is placed into the proper schedule based on its EP type.
Definition at line 694 of file dwc_otg_hcd_queue.c. |
1.3.9.1