Changes in uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c [65eac7b:9515f674] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c
r65eac7b r9515f674 58 58 /* Mark as dead, used for dummy EDs at the beginning of 59 59 * endpoint lists. */ 60 OHCI_WR(instance->status, ED_STATUS_K_FLAG);60 instance->status = ED_STATUS_K_FLAG; 61 61 return; 62 62 } … … 65 65 66 66 /* Status: address, endpoint nr, direction mask and max packet size. */ 67 OHCI_WR(instance->status,68 ((ep->address & ED_STATUS_FA_MASK) << ED_STATUS_FA_SHIFT)67 instance->status = 0 68 | ((ep->address & ED_STATUS_FA_MASK) << ED_STATUS_FA_SHIFT) 69 69 | ((ep->endpoint & ED_STATUS_EN_MASK) << ED_STATUS_EN_SHIFT) 70 70 | ((dir[ep->direction] & ED_STATUS_D_MASK) << ED_STATUS_D_SHIFT) 71 71 | ((ep->max_packet_size & ED_STATUS_MPS_MASK) 72 << ED_STATUS_MPS_SHIFT) );72 << ED_STATUS_MPS_SHIFT); 73 73 74 74 /* Low speed flag */ 75 75 if (ep->speed == USB_SPEED_LOW) 76 OHCI_SET(instance->status, ED_STATUS_S_FLAG);76 instance->status |= ED_STATUS_S_FLAG; 77 77 78 78 /* Isochronous format flag */ 79 79 if (ep->transfer_type == USB_TRANSFER_ISOCHRONOUS) 80 OHCI_SET(instance->status, ED_STATUS_F_FLAG);80 instance->status |= ED_STATUS_F_FLAG; 81 81 82 82 /* Set TD to the list */ 83 83 const uintptr_t pa = addr_to_phys(td); 84 OHCI_WR(instance->td_head, pa & ED_TDHEAD_PTR_MASK);85 OHCI_WR(instance->td_tail, pa & ED_TDTAIL_PTR_MASK);84 instance->td_head = pa & ED_TDHEAD_PTR_MASK; 85 instance->td_tail = pa & ED_TDTAIL_PTR_MASK; 86 86 87 87 /* Set toggle bit */ 88 88 if (ep->toggle) 89 OHCI_SET(instance->td_head, ED_TDHEAD_TOGGLE_CARRY);89 instance->td_head |= ED_TDHEAD_TOGGLE_CARRY; 90 90 91 91 }
Note:
See TracChangeset
for help on using the changeset viewer.