Changeset 708da59e in mainline
- Timestamp:
- 2015-06-29T04:42:30Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e9e80a9
- Parents:
- a996402e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
ra996402e r708da59e 39 39 40 40 #include "mem_access.h" 41 42 41 #include "queue_head.h" 43 42 44 const uint32_t speed[] = {43 static const uint32_t speed[] = { 45 44 [USB_SPEED_LOW] = QH_EP_CHAR_EPS_LS, 46 45 [USB_SPEED_FULL] = QH_EP_CHAR_EPS_FS, … … 54 53 55 54 EHCI_MEM32_WR(instance->horizontal, LINK_POINTER_TERM); 56 EHCI_MEM32_WR(instance->current, LINK_POINTER_TERM);55 // EHCI_MEM32_WR(instance->current, LINK_POINTER_TERM); 57 56 EHCI_MEM32_WR(instance->next, LINK_POINTER_TERM); 58 57 EHCI_MEM32_WR(instance->alternate, LINK_POINTER_TERM); 59 58 if (ep == NULL) { 60 /* Mark as halted and list head, used by endpoint lists61 * as dummy */59 /* Mark as halted and list head, 60 * used by endpoint lists as dummy */ 62 61 EHCI_MEM32_WR(instance->ep_char, QH_EP_CHAR_H_FLAG); 63 62 EHCI_MEM32_WR(instance->status, QH_STATUS_HALTED_FLAG); … … 78 77 EHCI_MEM32_SET(instance->ep_char, QH_EP_CHAR_DTC_FLAG); 79 78 } 79 uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) | 80 QH_EP_CAP_MULTI_SET(ep->packets); 81 if (ep->speed != USB_SPEED_HIGH) { 82 ep_cap |= 83 QH_EP_CAP_TT_PORT_SET(ep->tt.port) | 84 QH_EP_CAP_TT_ADDR_SET(ep->tt.address); 85 } 86 if (ep->transfer_type == USB_TRANSFER_INTERRUPT) { 87 ep_cap |= QH_EP_CAP_S_MASK_SET(3); 88 } 80 89 81 90 // TODO Figure out how to correctly use CMASK and SMASK for LS/FS 82 91 // INT transfers. Current values are just guesses 83 /* Setting TT stuff on HS endpoints is OK, the fields are ignored, 84 * and so is setting multi on async (should be 1 anyway)*/ 85 EHCI_MEM32_WR(instance->ep_cap, 86 QH_EP_CAP_MULTI_SET(ep->packets) | 87 QH_EP_CAP_TT_PORT_SET(ep->tt.port) | 88 QH_EP_CAP_TT_ADDR_SET(ep->tt.address) | 89 QH_EP_CAP_C_MASK_SET(3 << 2) 90 ); 92 EHCI_MEM32_WR(instance->ep_cap, ep_cap); 91 93 92 if (ep->transfer_type == USB_TRANSFER_INTERRUPT) {93 EHCI_MEM32_SET(instance->ep_cap, QH_EP_CAP_S_MASK_SET(3));94 }95 94 /* The rest of the fields are transfer working area, it should be ok to 96 95 * leave it NULL */
Note:
See TracChangeset
for help on using the changeset viewer.