Changeset b724494 in mainline for uspace/drv/bus/usb/xhci/commands.c
- Timestamp:
- 2017-10-23T21:26:22Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ec700c7
- Parents:
- 327f147
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/xhci/commands.c
r327f147 rb724494 46 46 #define TRB_SET_TCS(trb, tcs) (trb).control |= host2xhci(32, ((tcs &0x1) << 9)) 47 47 #define TRB_SET_TYPE(trb, type) (trb).control |= host2xhci(32, (type) << 10) 48 #define TRB_SET_DC(trb, dc) (trb).control |= host2xhci(32, (dc) << 9) 48 49 #define TRB_SET_EP(trb, ep) (trb).control |= host2xhci(32, ((ep) & 0x5) << 16) 49 50 #define TRB_SET_STREAM(trb, st) (trb).control |= host2xhci(32, ((st) & 0xFFFF) << 16) … … 323 324 assert(hc); 324 325 assert(cmd); 325 assert(ictx); 326 327 xhci_trb_clean(&cmd->trb); 328 329 uint64_t phys_addr = (uint64_t) addr_to_phys(ictx); 330 TRB_SET_ICTX(cmd->trb, phys_addr); 326 327 xhci_trb_clean(&cmd->trb); 328 329 if (!cmd->deconfigure) { 330 /* If the DC flag is on, input context is not evaluated. */ 331 assert(ictx); 332 333 uint64_t phys_addr = (uint64_t) addr_to_phys(ictx); 334 TRB_SET_ICTX(cmd->trb, phys_addr); 335 } 331 336 332 337 TRB_SET_TYPE(cmd->trb, XHCI_TRB_TYPE_CONFIGURE_ENDPOINT_CMD); 333 338 TRB_SET_SLOT(cmd->trb, cmd->slot_id); 339 TRB_SET_DC(cmd->trb, cmd->deconfigure); 334 340 335 341 return enqueue_command(hc, cmd, 0, 0);
Note:
See TracChangeset
for help on using the changeset viewer.