Changeset 45f4f19 in mainline for uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.c
- Timestamp:
- 2012-03-05T20:33:48Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b90e90
- Parents:
- d1ca752
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.c
rd1ca752 r45f4f19 60 60 bzero(instance, sizeof(td_t)); 61 61 /* Set PID and Error code */ 62 OHCI_ WR(instance->status,62 OHCI_MEM32_WR(instance->status, 63 63 ((dir[direction] & TD_STATUS_DP_MASK) << TD_STATUS_DP_SHIFT) 64 64 | ((CC_NOACCESS2 & TD_STATUS_CC_MASK) << TD_STATUS_CC_SHIFT)); … … 66 66 if (toggle == 0 || toggle == 1) { 67 67 /* Set explicit toggle bit */ 68 OHCI_ SET(instance->status, TD_STATUS_T_USE_TD_FLAG);69 OHCI_ SET(instance->status, toggle ? TD_STATUS_T_FLAG : 0);68 OHCI_MEM32_SET(instance->status, TD_STATUS_T_USE_TD_FLAG); 69 OHCI_MEM32_SET(instance->status, toggle ? TD_STATUS_T_FLAG : 0); 70 70 } 71 71 72 72 /* Alow less data on input. */ 73 73 if (dir == USB_DIRECTION_IN) { 74 OHCI_ SET(instance->status, TD_STATUS_ROUND_FLAG);74 OHCI_MEM32_SET(instance->status, TD_STATUS_ROUND_FLAG); 75 75 } 76 76 77 77 if (buffer != NULL) { 78 78 assert(size != 0); 79 OHCI_ WR(instance->cbp, addr_to_phys(buffer));80 OHCI_ WR(instance->be, addr_to_phys(buffer + size - 1));79 OHCI_MEM32_WR(instance->cbp, addr_to_phys(buffer)); 80 OHCI_MEM32_WR(instance->be, addr_to_phys(buffer + size - 1)); 81 81 } 82 82 83 OHCI_ WR(instance->next, addr_to_phys(next) & TD_NEXT_PTR_MASK);83 OHCI_MEM32_WR(instance->next, addr_to_phys(next) & TD_NEXT_PTR_MASK); 84 84 85 85 }
Note:
See TracChangeset
for help on using the changeset viewer.