Changeset e7f21884 in mainline
- Timestamp:
- 2018-01-18T17:11:10Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fb28cde
- Parents:
- 05770666
- Location:
- uspace/drv/bus/usb/xhci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r05770666 re7f21884 43 43 #include "hw_struct/trb.h" 44 44 45 #define TRB_SET_T CS(trb, tcs) (trb).control |= host2xhci(32, ((tcs &0x1) << 9))45 #define TRB_SET_TSP(trb, tsp) (trb).control |= host2xhci(32, (((tsp) & 0x1) << 9)) 46 46 #define TRB_SET_TYPE(trb, type) (trb).control |= host2xhci(32, (type) << 10) 47 47 #define TRB_SET_DC(trb, dc) (trb).control |= host2xhci(32, (dc) << 9) … … 51 51 #define TRB_SET_SLOT(trb, slot) (trb).control |= host2xhci(32, (slot) << 24) 52 52 #define TRB_SET_DEV_SPEED(trb, speed) (trb).control |= host2xhci(32, (speed & 0xF) << 16) 53 54 /**55 * TODO: Not sure about SCT and DCS (see section 6.4.3.9).56 */57 53 #define TRB_SET_DEQUEUE_PTR(trb, dptr) (trb).parameter |= host2xhci(64, (dptr)) 58 54 #define TRB_SET_ICTX(trb, phys) (trb).parameter |= host2xhci(64, (phys) & (~0xF)) … … 512 508 assert(cmd); 513 509 514 /**515 * Note: TCS can have values 0 or 1. If it is set to 0, see sectuon 4.5.8 for516 * information about this flag.517 */518 510 xhci_trb_clean(&cmd->_header.trb); 519 511 520 512 TRB_SET_TYPE(cmd->_header.trb, XHCI_TRB_TYPE_RESET_ENDPOINT_CMD); 521 TRB_SET_T CS(cmd->_header.trb, cmd->tcs);513 TRB_SET_TSP(cmd->_header.trb, cmd->tsp); 522 514 TRB_SET_EP(cmd->_header.trb, cmd->endpoint_id); 523 515 TRB_SET_SLOT(cmd->_header.trb, cmd->slot_id); -
uspace/drv/bus/usb/xhci/commands.h
r05770666 re7f21884 117 117 uintptr_t dequeue_ptr; 118 118 119 uint8_t tcs;119 bool tsp; 120 120 uint8_t susp; 121 121 uint8_t device_speed;
Note:
See TracChangeset
for help on using the changeset viewer.