Changeset eb1a2f4 in mainline for uspace/drv/uhci-rhd
- Timestamp:
- 2011-02-22T23:30:56Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3b5d1535, a9c674e0
- Parents:
- dbe25f1 (diff), 664af708 (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. - Location:
- uspace/drv/uhci-rhd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-rhd/main.c
rdbe25f1 reb1a2f4 32 32 * @brief UHCI driver 33 33 */ 34 #include <d river.h>34 #include <ddf/driver.h> 35 35 #include <usb_iface.h> 36 36 #include <usb/ddfiface.h> … … 44 44 #define NAME "uhci-rhd" 45 45 46 static int usb_iface_get_hc_handle(d evice_t *dev, devman_handle_t *handle)46 static int usb_iface_get_hc_handle(ddf_fun_t *fun, devman_handle_t *handle) 47 47 { 48 assert( dev);49 assert( dev->driver_data);48 assert(fun); 49 assert(fun->driver_data); 50 50 assert(handle); 51 51 52 *handle = ((uhci_root_hub_t*)dev->driver_data)->hc_handle; 53 usb_log_debug("Answering HC handle: %d.\n", *handle); 52 *handle = ((uhci_root_hub_t*)fun->driver_data)->hc_handle; 54 53 55 54 return EOK; … … 61 60 }; 62 61 63 static d evice_ops_t uhci_rh_ops = {62 static ddf_dev_ops_t uhci_rh_ops = { 64 63 .interfaces[USB_DEV_IFACE] = &uhci_rh_usb_iface, 65 64 }; 66 65 67 static int uhci_rh_add_device(d evice_t *device)66 static int uhci_rh_add_device(ddf_dev_t *device) 68 67 { 69 68 if (!device) … … 71 70 72 71 usb_log_debug2("%s called device %d\n", __FUNCTION__, device->handle); 73 device->ops = &uhci_rh_ops; 72 73 //device->ops = &uhci_rh_ops; 74 (void) uhci_rh_ops; 74 75 75 76 uhci_root_hub_t *rh = malloc(sizeof(uhci_root_hub_t)); … … 104 105 int main(int argc, char *argv[]) 105 106 { 106 usb_log_enable(USB_LOG_LEVEL_ ERROR, NAME);107 return d river_main(&uhci_rh_driver);107 usb_log_enable(USB_LOG_LEVEL_INFO, NAME); 108 return ddf_driver_main(&uhci_rh_driver); 108 109 } 109 110 /** -
uspace/drv/uhci-rhd/port.c
rdbe25f1 reb1a2f4 52 52 int uhci_port_init( 53 53 uhci_port_t *port, port_status_t *address, unsigned number, 54 unsigned usec, d evice_t *rh, int parent_phone)54 unsigned usec, ddf_dev_t *rh, int parent_phone) 55 55 { 56 56 assert(port); … … 187 187 USB_SPEED_FULL, 188 188 new_device_enable_port, port->number, port, 189 &dev_addr, &port->attached_device );189 &dev_addr, &port->attached_device, NULL, NULL, NULL); 190 190 if (rc != EOK) { 191 191 usb_log_error("Failed adding new device on port %u: %s.\n", -
uspace/drv/uhci-rhd/port.h
rdbe25f1 reb1a2f4 36 36 37 37 #include <assert.h> 38 #include <d river.h> /* device_t */38 #include <ddf/driver.h> 39 39 #include <stdint.h> 40 40 #include <usb/usbdevice.h> … … 48 48 unsigned wait_period_usec; 49 49 usb_hc_connection_t hc_connection; 50 d evice_t *rh;50 ddf_dev_t *rh; 51 51 devman_handle_t attached_device; 52 52 fid_t checker; … … 55 55 int uhci_port_init( 56 56 uhci_port_t *port, port_status_t *address, unsigned number, 57 unsigned usec, d evice_t *rh, int parent_phone);57 unsigned usec, ddf_dev_t *rh, int parent_phone); 58 58 59 59 void uhci_port_fini(uhci_port_t *port); -
uspace/drv/uhci-rhd/root_hub.c
rdbe25f1 reb1a2f4 34 34 #include <errno.h> 35 35 #include <stdint.h> 36 36 #include <ddi.h> 37 #include <devman.h> 37 38 #include <usb/debug.h> 38 39 … … 41 42 42 43 int uhci_root_hub_init( 43 uhci_root_hub_t *instance, void *addr, size_t size, d evice_t *rh)44 uhci_root_hub_t *instance, void *addr, size_t size, ddf_dev_t *rh) 44 45 { 45 46 assert(instance); -
uspace/drv/uhci-rhd/root_hub.h
rdbe25f1 reb1a2f4 36 36 37 37 #include <fibril.h> 38 #include <d river.h> /* for device_t */38 #include <ddf/driver.h> 39 39 40 40 #include "port.h" … … 50 50 51 51 int uhci_root_hub_init( 52 uhci_root_hub_t *instance, void *addr, size_t size, d evice_t *rh);52 uhci_root_hub_t *instance, void *addr, size_t size, ddf_dev_t *rh); 53 53 54 54 int uhci_root_hub_fini(uhci_root_hub_t *instance);
Note:
See TracChangeset
for help on using the changeset viewer.