Changes in uspace/drv/uhci-hcd/hw_struct/transfer_descriptor.h [9d2d444:c61338a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/hw_struct/transfer_descriptor.h
r9d2d444 rc61338a 40 40 #include "link_pointer.h" 41 41 42 /** Transfer Descriptor, defined in UHCI design guide p. 26*/42 /** UHCI Transfer Descriptor */ 43 43 typedef struct transfer_descriptor { 44 /** Pointer to the next entity (TD or QH) */45 44 link_pointer_t next; 46 45 47 /** Status doubleword */48 46 volatile uint32_t status; 49 47 #define TD_STATUS_RESERVED_MASK 0xc000f800 50 #define TD_STATUS_SPD_FLAG (1 << 29)51 #define TD_STATUS_ERROR_COUNT_POS 2752 #define TD_STATUS_ERROR_COUNT_MASK 0x353 #define TD_STATUS_LOW_SPEED_FLAG (1 << 26)54 #define TD_STATUS_ISOCHRONOUS_FLAG ( 1 << 25)55 #define TD_STATUS_IOC_FLAG (1 << 24)48 #define TD_STATUS_SPD_FLAG ( 1 << 29 ) 49 #define TD_STATUS_ERROR_COUNT_POS ( 27 ) 50 #define TD_STATUS_ERROR_COUNT_MASK ( 0x3 ) 51 #define TD_STATUS_LOW_SPEED_FLAG ( 1 << 26 ) 52 #define TD_STATUS_ISOCHRONOUS_FLAG ( 1 << 25 ) 53 #define TD_STATUS_IOC_FLAG ( 1 << 24 ) 56 54 57 #define TD_STATUS_ERROR_ACTIVE (1 << 23)58 #define TD_STATUS_ERROR_STALLED (1 << 22)59 #define TD_STATUS_ERROR_BUFFER (1 << 21)60 #define TD_STATUS_ERROR_BABBLE (1 << 20)61 #define TD_STATUS_ERROR_NAK (1 << 19)62 #define TD_STATUS_ERROR_CRC (1 << 18)63 #define TD_STATUS_ERROR_BIT_STUFF ( 1 << 17)64 #define TD_STATUS_ERROR_RESERVED (1 << 16)55 #define TD_STATUS_ERROR_ACTIVE ( 1 << 23 ) 56 #define TD_STATUS_ERROR_STALLED ( 1 << 22 ) 57 #define TD_STATUS_ERROR_BUFFER ( 1 << 21 ) 58 #define TD_STATUS_ERROR_BABBLE ( 1 << 20 ) 59 #define TD_STATUS_ERROR_NAK ( 1 << 19 ) 60 #define TD_STATUS_ERROR_CRC ( 1 << 18 ) 61 #define TD_STATUS_ERROR_BIT_STUFF ( 1 << 17 ) 62 #define TD_STATUS_ERROR_RESERVED ( 1 << 16 ) 65 63 #define TD_STATUS_ERROR_POS 16 66 #define TD_STATUS_ERROR_MASK 0xff64 #define TD_STATUS_ERROR_MASK ( 0xff ) 67 65 68 66 #define TD_STATUS_ACTLEN_POS 0 69 67 #define TD_STATUS_ACTLEN_MASK 0x7ff 70 68 71 /* double word with USB device specific info */72 69 volatile uint32_t device; 73 70 #define TD_DEVICE_MAXLEN_POS 21 74 #define TD_DEVICE_MAXLEN_MASK 0x7ff75 #define TD_DEVICE_RESERVED_FLAG (1 << 20)76 #define TD_DEVICE_DATA_TOGGLE_ONE_FLAG ( 1 << 19)71 #define TD_DEVICE_MAXLEN_MASK ( 0x7ff ) 72 #define TD_DEVICE_RESERVED_FLAG ( 1 << 20 ) 73 #define TD_DEVICE_DATA_TOGGLE_ONE_FLAG ( 1 << 19 ) 77 74 #define TD_DEVICE_ENDPOINT_POS 15 78 #define TD_DEVICE_ENDPOINT_MASK 0xf75 #define TD_DEVICE_ENDPOINT_MASK ( 0xf ) 79 76 #define TD_DEVICE_ADDRESS_POS 8 80 #define TD_DEVICE_ADDRESS_MASK 0x7f77 #define TD_DEVICE_ADDRESS_MASK ( 0x7f ) 81 78 #define TD_DEVICE_PID_POS 0 82 #define TD_DEVICE_PID_MASK 0xff79 #define TD_DEVICE_PID_MASK ( 0xff ) 83 80 84 /** Pointer(physical) to the beginning of the transaction's buffer */85 81 volatile uint32_t buffer_ptr; 86 82 87 /* According to UHCI design guide, there is 16 bytes of 88 * data available here. 89 * According to linux kernel the hardware does not care, 90 * it just needs to be aligned. We don't use it anyway. 83 /* there is 16 bytes of data available here, according to UHCI 84 * Design guide, according to linux kernel the hardware does not care, 85 * it just needs to be aligned, we don't use it anyway 91 86 */ 92 87 } __attribute__((packed)) td_t;
Note:
See TracChangeset
for help on using the changeset viewer.