Changeset df6ded8 in mainline for uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
- Timestamp:
- 2018-02-28T16:37:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1b20da0
- Parents:
- f5e5f73 (diff), b2dca8de (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
- git-committer:
- Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
rf5e5f73 rdf6ded8 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.