Changeset e26a9d95 in mainline for uspace/drv/bus/usb
- Timestamp:
- 2014-01-18T17:14:42Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3e200736
- Parents:
- 19b3cc6
- Location:
- uspace/drv/bus/usb
- Files:
-
- 8 edited
-
ehci/main.c (modified) (2 diffs)
-
ohci/hc.c (modified) (1 diff)
-
ohci/hc.h (modified) (1 diff)
-
ohci/main.c (modified) (2 diffs)
-
uhci/hc.c (modified) (1 diff)
-
uhci/hc.h (modified) (1 diff)
-
uhci/main.c (modified) (2 diffs)
-
vhc/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ehci/main.c
r19b3cc6 re26a9d95 64 64 return ENOMEM; 65 65 66 const int ret = hc_init(instance, res, irq);66 const int ret = hc_init(instance, res, irq); 67 67 if (ret == EOK) 68 68 hcd_set_implementation(hcd, instance, hc_schedule, 69 NULL, NULL, ehci_interrupt );69 NULL, NULL, ehci_interrupt, NULL); 70 70 return ret; 71 71 } … … 78 78 79 79 free(hcd->driver.data); 80 hcd_set_implementation(hcd, NULL, NULL, NULL, NULL, NULL );80 hcd_set_implementation(hcd, NULL, NULL, NULL, NULL, NULL, NULL); 81 81 } 82 82 -
uspace/drv/bus/usb/ohci/hc.c
r19b3cc6 re26a9d95 273 273 } 274 274 275 int hc_status(hcd_t *hcd, uint32_t *status) 276 { 277 assert(hcd); 278 assert(status); 279 hc_t *instance = hcd->driver.data; 280 assert(instance); 281 282 async_usleep(10000); 283 if (instance->registers){ 284 *status = OHCI_RD(instance->registers->interrupt_status); 285 OHCI_WR(instance->registers->interrupt_status, *status); 286 } 287 return EOK; 288 } 289 275 290 /** Add USB transfer to the schedule. 276 291 * -
uspace/drv/bus/usb/ohci/hc.h
r19b3cc6 re26a9d95 83 83 void hc_dequeue_endpoint(hc_t *instance, const endpoint_t *ep); 84 84 int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch); 85 int hc_status(hcd_t *hcd, uint32_t *status); 85 86 86 87 void hc_interrupt(hc_t *instance, uint32_t status); -
uspace/drv/bus/usb/ohci/main.c
r19b3cc6 re26a9d95 66 66 if (ret == EOK) 67 67 hcd_set_implementation(hcd, instance, hc_schedule, 68 ohci_endpoint_init, ohci_endpoint_fini, ohci_interrupt); 68 ohci_endpoint_init, ohci_endpoint_fini, ohci_interrupt, 69 hc_status); 69 70 return ret; 70 71 } … … 77 78 78 79 free(hcd->driver.data); 79 hcd_set_implementation(hcd, NULL, NULL, NULL, NULL, NULL );80 hcd_set_implementation(hcd, NULL, NULL, NULL, NULL, NULL, NULL); 80 81 } 81 82 -
uspace/drv/bus/usb/uhci/hc.c
r19b3cc6 re26a9d95 412 412 } 413 413 414 int hc_status(hcd_t *hcd, uint32_t *status) 415 { 416 assert(hcd); 417 assert(status); 418 hc_t *instance = hcd->driver.data; 419 assert(instance); 420 421 *status = 0; 422 if (instance->registers) { 423 uint16_t s = pio_read_16(&instance->registers->usbsts); 424 pio_write_16(&instance->registers->usbsts, s); 425 *status = s; 426 } 427 return EOK; 428 } 429 414 430 /** Schedule batch for execution. 415 431 * -
uspace/drv/bus/usb/uhci/hc.h
r19b3cc6 re26a9d95 127 127 } hc_t; 128 128 129 int hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res);130 void hc_interrupt(hc_t *instance, uint16_t status);131 129 int hc_init(hc_t *instance, const hw_res_list_parsed_t *hw_res, bool interupts); 132 130 void hc_fini(hc_t *instance); 131 int hc_gen_irq_code(irq_code_t *code, const hw_res_list_parsed_t *hw_res); 132 133 void hc_interrupt(hc_t *instance, uint16_t status); 134 int hc_status(hcd_t *hcd, uint32_t *status); 133 135 int hc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch); 134 136 -
uspace/drv/bus/usb/uhci/main.c
r19b3cc6 re26a9d95 68 68 if (ret == EOK) 69 69 hcd_set_implementation(hcd, instance, hc_schedule, NULL, NULL, 70 uhci_interrupt );70 uhci_interrupt, hc_status); 71 71 return ret; 72 72 } … … 79 79 80 80 free(hcd->driver.data); 81 hcd_set_implementation(hcd, NULL, NULL, NULL, NULL, NULL );81 hcd_set_implementation(hcd, NULL, NULL, NULL, NULL, NULL, NULL); 82 82 } 83 83 -
uspace/drv/bus/usb/vhc/main.c
r19b3cc6 re26a9d95 95 95 } 96 96 97 hcd_set_implementation(dev_to_hcd(dev), data, vhc_schedule, NULL, NULL, NULL );97 hcd_set_implementation(dev_to_hcd(dev), data, vhc_schedule, NULL, NULL, NULL, NULL); 98 98 99 99 /* Add virtual hub device */
Note:
See TracChangeset
for help on using the changeset viewer.
