Changes in uspace/drv/bus/usb/ehci/hw_struct/queue_head.c [708da59e:ae3a941] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
r708da59e rae3a941 1 1 /* 2 2 * Copyright (c) 2013 Jan Vesely 3 * Copyright (c) 2018 Ondrej Hlavaty 3 4 * All rights reserved. 4 5 * … … 37 38 #include <mem.h> 38 39 #include <macros.h> 40 #include <usb/host/bus.h> 39 41 40 42 #include "mem_access.h" … … 63 65 return; 64 66 } 65 assert(ep-> speed < ARRAY_SIZE(speed));67 assert(ep->device->speed < ARRAY_SIZE(speed)); 66 68 EHCI_MEM32_WR(instance->ep_char, 67 QH_EP_CHAR_ADDR_SET(ep-> address) |69 QH_EP_CHAR_ADDR_SET(ep->device->address) | 68 70 QH_EP_CHAR_EP_SET(ep->endpoint) | 69 speed[ep->speed] | 70 QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size) 71 ); 71 speed[ep->device->speed] | 72 QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size)); 72 73 if (ep->transfer_type == USB_TRANSFER_CONTROL) { 73 if (ep-> speed != USB_SPEED_HIGH)74 if (ep->device->speed != USB_SPEED_HIGH) 74 75 EHCI_MEM32_SET(instance->ep_char, QH_EP_CHAR_C_FLAG); 75 76 /* Let BULK and INT use queue head managed toggle, … … 78 79 } 79 80 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) { 81 QH_EP_CAP_MULTI_SET(ep->packets_per_uframe); 82 if (usb_speed_is_11(ep->device->speed)) { 83 assert(ep->device->tt.dev != NULL); 82 84 ep_cap |= 83 QH_EP_CAP_TT_PORT_SET(ep-> tt.port) |84 QH_EP_CAP_TT_ADDR_SET(ep-> tt.address);85 QH_EP_CAP_TT_PORT_SET(ep->device->tt.port) | 86 QH_EP_CAP_TT_ADDR_SET(ep->device->tt.dev->address); 85 87 } 86 88 if (ep->transfer_type == USB_TRANSFER_INTERRUPT) {
Note:
See TracChangeset
for help on using the changeset viewer.