Changeset d369b3b in mainline for uspace/drv/bus/usb/ohci
- Timestamp:
- 2018-01-25T02:05:57Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 296d22fc
- Parents:
- b357377
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 01:52:13)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 02:05:57)
- Location:
- uspace/drv/bus/usb/ohci
- Files:
-
- 2 edited
-
ohci_bus.c (modified) (5 diffs)
-
ohci_bus.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/ohci_bus.c
rb357377 rd369b3b 57 57 } 58 58 59 static int ohci_device_enumerate(device_t *dev) 60 { 61 ohci_bus_t *bus = (ohci_bus_t *) dev->bus; 62 return usb2_bus_device_enumerate(&bus->helper, dev); 63 } 64 59 65 /** Creates new hcd endpoint representation. 60 66 */ … … 109 115 ohci_endpoint_t *ohci_ep = ohci_endpoint_get(ep); 110 116 111 const int err = usb2_bus_ ops.endpoint_register(ep);117 const int err = usb2_bus_endpoint_register(&bus->helper, ep); 112 118 if (err) 113 119 return err; … … 126 132 assert(ep); 127 133 128 usb2_bus_ ops.endpoint_unregister(ep);134 usb2_bus_endpoint_unregister(&bus->helper, ep); 129 135 hc_dequeue_endpoint(bus->hc, ep); 130 136 … … 162 168 163 169 static const bus_ops_t ohci_bus_ops = { 164 .parent = &usb2_bus_ops,165 166 170 .interrupt = ohci_hc_interrupt, 167 171 .status = ohci_hc_status, 172 173 .device_enumerate = ohci_device_enumerate, 168 174 169 175 .endpoint_destroy = ohci_endpoint_destroy, … … 183 189 assert(bus); 184 190 185 usb2_bus_t *usb2_bus = (usb2_bus_t *) bus;186 191 bus_t *bus_base = (bus_t *) bus; 187 188 usb2_bus_init(usb2_bus, &bandwidth_accounting_usb11); 192 bus_init(bus_base, sizeof(device_t)); 189 193 bus_base->ops = &ohci_bus_ops; 194 195 usb2_bus_helper_init(&bus->helper, &bandwidth_accounting_usb11); 190 196 191 197 bus->hc = hc; -
uspace/drv/bus/usb/ohci/ohci_bus.h
rb357377 rd369b3b 60 60 61 61 typedef struct { 62 usb2_bus_t base; 62 bus_t base; 63 usb2_bus_helper_t helper; 63 64 hc_t *hc; 64 65 } ohci_bus_t;
Note:
See TracChangeset
for help on using the changeset viewer.
