Changeset ca56afa in mainline for uspace/drv/uhci-hcd/iface.c
- Timestamp:
- 2011-02-25T09:46:23Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d493ac17
- Parents:
- 15b0432 (diff), a80849c (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/iface.c
r15b0432 rca56afa 32 32 * @brief UHCI driver 33 33 */ 34 #include <d river.h>34 #include <ddf/driver.h> 35 35 #include <remote_usbhc.h> 36 36 … … 43 43 44 44 /*----------------------------------------------------------------------------*/ 45 static int reserve_default_address(d evice_t *dev, usb_speed_t speed)45 static int reserve_default_address(ddf_fun_t *fun, usb_speed_t speed) 46 46 { 47 assert( dev);48 uhci_t *hc = dev_to_uhci(dev);47 assert(fun); 48 uhci_t *hc = fun_to_uhci(fun); 49 49 assert(hc); 50 50 usb_address_keeping_reserve_default(&hc->address_manager); … … 52 52 } 53 53 /*----------------------------------------------------------------------------*/ 54 static int release_default_address(d evice_t *dev)54 static int release_default_address(ddf_fun_t *fun) 55 55 { 56 assert( dev);57 uhci_t *hc = dev_to_uhci(dev);56 assert(fun); 57 uhci_t *hc = fun_to_uhci(fun); 58 58 assert(hc); 59 59 usb_address_keeping_release_default(&hc->address_manager); … … 61 61 } 62 62 /*----------------------------------------------------------------------------*/ 63 static int request_address(d evice_t *dev, usb_speed_t speed,63 static int request_address(ddf_fun_t *fun, usb_speed_t speed, 64 64 usb_address_t *address) 65 65 { 66 assert( dev);67 uhci_t *hc = dev_to_uhci(dev);66 assert(fun); 67 uhci_t *hc = fun_to_uhci(fun); 68 68 assert(hc); 69 69 *address = usb_address_keeping_request(&hc->address_manager); … … 74 74 /*----------------------------------------------------------------------------*/ 75 75 static int bind_address( 76 d evice_t *dev, usb_address_t address, devman_handle_t handle)76 ddf_fun_t *fun, usb_address_t address, devman_handle_t handle) 77 77 { 78 assert( dev);79 uhci_t *hc = dev_to_uhci(dev);78 assert(fun); 79 uhci_t *hc = fun_to_uhci(fun); 80 80 assert(hc); 81 81 usb_address_keeping_devman_bind(&hc->address_manager, address, handle); … … 83 83 } 84 84 /*----------------------------------------------------------------------------*/ 85 static int release_address(d evice_t *dev, usb_address_t address)85 static int release_address(ddf_fun_t *fun, usb_address_t address) 86 86 { 87 assert( dev);88 uhci_t *hc = dev_to_uhci(dev);87 assert(fun); 88 uhci_t *hc = fun_to_uhci(fun); 89 89 assert(hc); 90 90 usb_address_keeping_release_default(&hc->address_manager); … … 92 92 } 93 93 /*----------------------------------------------------------------------------*/ 94 static int interrupt_out(d evice_t *dev, usb_target_t target,94 static int interrupt_out(ddf_fun_t *fun, usb_target_t target, 95 95 size_t max_packet_size, 96 96 void *data, size_t size, … … 99 99 dev_speed_t speed = FULL_SPEED; 100 100 101 batch_t *batch = batch_get( dev, target, USB_TRANSFER_INTERRUPT,101 batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT, 102 102 max_packet_size, speed, data, size, NULL, 0, NULL, callback, arg); 103 103 if (!batch) … … 107 107 } 108 108 /*----------------------------------------------------------------------------*/ 109 static int interrupt_in(d evice_t *dev, usb_target_t target,109 static int interrupt_in(ddf_fun_t *fun, usb_target_t target, 110 110 size_t max_packet_size, 111 111 void *data, size_t size, … … 114 114 dev_speed_t speed = FULL_SPEED; 115 115 116 batch_t *batch = batch_get( dev, target, USB_TRANSFER_INTERRUPT,116 batch_t *batch = batch_get(fun, target, USB_TRANSFER_INTERRUPT, 117 117 max_packet_size, speed, data, size, NULL, 0, callback, NULL, arg); 118 118 if (!batch) … … 122 122 } 123 123 /*----------------------------------------------------------------------------*/ 124 static int control_write(d evice_t *dev, usb_target_t target,124 static int control_write(ddf_fun_t *fun, usb_target_t target, 125 125 size_t max_packet_size, 126 126 void *setup_data, size_t setup_size, void *data, size_t size, … … 129 129 dev_speed_t speed = FULL_SPEED; 130 130 131 batch_t *batch = batch_get( dev, target, USB_TRANSFER_CONTROL,131 batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL, 132 132 max_packet_size, speed, data, size, setup_data, setup_size, 133 133 NULL, callback, arg); … … 138 138 } 139 139 /*----------------------------------------------------------------------------*/ 140 static int control_read(d evice_t *dev, usb_target_t target,140 static int control_read(ddf_fun_t *fun, usb_target_t target, 141 141 size_t max_packet_size, 142 142 void *setup_data, size_t setup_size, void *data, size_t size, … … 145 145 dev_speed_t speed = FULL_SPEED; 146 146 147 batch_t *batch = batch_get( dev, target, USB_TRANSFER_CONTROL,147 batch_t *batch = batch_get(fun, target, USB_TRANSFER_CONTROL, 148 148 max_packet_size, speed, data, size, setup_data, setup_size, callback, 149 149 NULL, arg);
Note:
See TracChangeset
for help on using the changeset viewer.