Changeset ae3a941 in mainline for uspace/drv/bus/usb/ehci
- Timestamp:
- 2018-02-26T16:51:40Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e773f58
- Parents:
- 3692678
- Location:
- uspace/drv/bus/usb/ehci
- Files:
-
- 9 edited
-
ehci_batch.h (modified) (2 diffs)
-
ehci_bus.c (modified) (2 diffs)
-
ehci_bus.h (modified) (2 diffs)
-
ehci_rh.h (modified) (1 diff)
-
hc.h (modified) (1 diff)
-
hw_struct/iso_transfer_descriptor.h (modified) (1 diff)
-
hw_struct/queue_head.c (modified) (2 diffs)
-
hw_struct/queue_head.h (modified) (1 diff)
-
hw_struct/split_iso_transfer_descriptor.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/ehci_batch.h
r3692678 rae3a941 63 63 } ehci_transfer_batch_t; 64 64 65 ehci_transfer_batch_t * ehci_transfer_batch_create(endpoint_t *ep);65 ehci_transfer_batch_t *ehci_transfer_batch_create(endpoint_t *ep); 66 66 int ehci_transfer_batch_prepare(ehci_transfer_batch_t *batch); 67 67 void ehci_transfer_batch_commit(const ehci_transfer_batch_t *batch); … … 69 69 void ehci_transfer_batch_destroy(ehci_transfer_batch_t *batch); 70 70 71 static inline ehci_transfer_batch_t * ehci_transfer_batch_get(usb_transfer_batch_t *usb_batch) 71 static inline ehci_transfer_batch_t *ehci_transfer_batch_get( 72 usb_transfer_batch_t *usb_batch) 72 73 { 73 74 assert(usb_batch); -
uspace/drv/bus/usb/ehci/ehci_bus.c
r3692678 rae3a941 54 54 ehci_endpoint_t *instance = ehci_endpoint_get(ep); 55 55 if (qh_toggle_from_td(instance->qh)) 56 usb_log_warning("EP(%p): Resetting toggle bit for transfer directed EP", instance); 56 usb_log_warning("EP(%p): Resetting toggle bit for transfer " 57 "directed EP", instance); 57 58 qh_toggle_set(instance->qh, 0); 58 59 } … … 72 73 /** Creates new hcd endpoint representation. 73 74 */ 74 static endpoint_t *ehci_endpoint_create(device_t *dev, const usb_endpoint_descriptors_t *desc) 75 static endpoint_t *ehci_endpoint_create(device_t *dev, 76 const usb_endpoint_descriptors_t *desc) 75 77 { 76 78 assert(dev); -
uspace/drv/bus/usb/ehci/ehci_bus.h
r3692678 rae3a941 78 78 * @return Pointer to assigned ehci endpoint structure 79 79 */ 80 static inline ehci_endpoint_t * ehci_endpoint_get(const endpoint_t *ep)80 static inline ehci_endpoint_t *ehci_endpoint_get(const endpoint_t *ep) 81 81 { 82 82 assert(ep); … … 84 84 } 85 85 86 static inline ehci_endpoint_t * ehci_endpoint_list_instance(link_t *l)86 static inline ehci_endpoint_t *ehci_endpoint_list_instance(link_t *l) 87 87 { 88 88 return list_get_instance(l, ehci_endpoint_t, eplist_link); -
uspace/drv/bus/usb/ehci/ehci_rh.h
r3692678 rae3a941 80 80 } ehci_rh_t; 81 81 82 errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps, ehci_regs_t *regs,83 fibril_mutex_t *guard, const char *name);82 errno_t ehci_rh_init(ehci_rh_t *instance, ehci_caps_regs_t *caps, 83 ehci_regs_t *regs, fibril_mutex_t *guard, const char *name); 84 84 errno_t ehci_rh_schedule(ehci_rh_t *instance, usb_transfer_batch_t *batch); 85 85 errno_t ehci_rh_interrupt(ehci_rh_t *instance); -
uspace/drv/bus/usb/ehci/hc.h
r3692678 rae3a941 104 104 extern errno_t hc_start(hc_device_t *); 105 105 extern errno_t hc_setup_roothub(hc_device_t *); 106 extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, const hw_res_list_parsed_t *, int *); 106 extern errno_t hc_gen_irq_code(irq_code_t *, hc_device_t *, 107 const hw_res_list_parsed_t *, int *); 107 108 extern errno_t hc_gone(hc_device_t *); 108 109 -
uspace/drv/bus/usb/ehci/hw_struct/iso_transfer_descriptor.h
r3692678 rae3a941 72 72 /* 64 bit struct only */ 73 73 volatile uint32_t extended_bp[7]; 74 } __attribute__((packed, aligned(32))) itd_t;74 } __attribute__((packed, aligned(32))) itd_t; 75 75 #endif 76 76 /** -
uspace/drv/bus/usb/ehci/hw_struct/queue_head.c
r3692678 rae3a941 70 70 QH_EP_CHAR_EP_SET(ep->endpoint) | 71 71 speed[ep->device->speed] | 72 QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size) 73 ); 72 QH_EP_CHAR_MAX_LENGTH_SET(ep->max_packet_size)); 74 73 if (ep->transfer_type == USB_TRANSFER_CONTROL) { 75 74 if (ep->device->speed != USB_SPEED_HIGH) … … 80 79 } 81 80 uint32_t ep_cap = QH_EP_CAP_C_MASK_SET(3 << 2) | 82 QH_EP_CAP_MULTI_SET(ep->packets_per_uframe);81 QH_EP_CAP_MULTI_SET(ep->packets_per_uframe); 83 82 if (usb_speed_is_11(ep->device->speed)) { 84 83 assert(ep->device->tt.dev != NULL); -
uspace/drv/bus/usb/ehci/hw_struct/queue_head.h
r3692678 rae3a941 143 143 /* 64 bit struct only */ 144 144 volatile uint32_t extended_bp[5]; 145 } __attribute__((packed, aligned(32))) qh_t;145 } __attribute__((packed, aligned(32))) qh_t; 146 146 147 147 static inline void qh_append_qh(qh_t *qh, const qh_t *next) -
uspace/drv/bus/usb/ehci/hw_struct/split_iso_transfer_descriptor.h
r3692678 rae3a941 89 89 /* 64 bit struct only */ 90 90 volatile uint32_t extended_bp[2]; 91 } __attribute__((packed, aligned(32))) sitd_t;91 } __attribute__((packed, aligned(32))) sitd_t; 92 92 #endif 93 93 /**
Note:
See TracChangeset
for help on using the changeset viewer.
