Changes in uspace/drv/uhci-rhd/root_hub.c [dced52a:0f21c0c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-rhd/root_hub.c
rdced52a r0f21c0c 34 34 #include <errno.h> 35 35 #include <stdint.h> 36 #include <ddi.h> 37 #include <devman.h> 36 38 37 #include <usb/debug.h> 39 38 40 39 #include "root_hub.h" 41 40 41 42 42 int uhci_root_hub_init( 43 uhci_root_hub_t *instance, void *addr, size_t size, d df_dev_t *rh)43 uhci_root_hub_t *instance, void *addr, size_t size, device_t *rh) 44 44 { 45 45 assert(instance); 46 46 assert(rh); 47 47 int ret; 48 ret = usb_hc_find(rh->handle, &instance->hc_handle); 49 usb_log_info("rh found(%d) hc handle: %d.\n", ret, instance->hc_handle); 50 if (ret != EOK) { 51 return ret; 52 } 48 53 49 54 /* allow access to root hub registers */ 50 55 assert(sizeof(port_status_t) * UHCI_ROOT_HUB_PORT_COUNT == size); 51 56 port_status_t *regs; 52 ret = pio_enable(addr, size, (void**)®s); 57 ret = pio_enable( 58 addr, sizeof(port_status_t) * UHCI_ROOT_HUB_PORT_COUNT, (void**)®s); 53 59 54 60 if (ret < 0) { … … 60 66 unsigned i = 0; 61 67 for (; i < UHCI_ROOT_HUB_PORT_COUNT; ++i) { 68 /* connect to the parent device (HC) */ 69 int parent_phone = devman_device_connect(instance->hc_handle, 0); 70 //usb_drv_hc_connect(rh, instance->hc_handle, 0); 71 if (parent_phone < 0) { 72 usb_log_error("Failed to connect to the HC device port %d.\n", i); 73 return parent_phone; 74 } 62 75 /* mind pointer arithmetics */ 63 ret = uhci_port_init(64 &instance->ports[i], regs + i, i, ROOT_HUB_WAIT_USEC, rh );76 int ret = uhci_port_init( 77 &instance->ports[i], regs + i, i, ROOT_HUB_WAIT_USEC, rh, parent_phone); 65 78 if (ret != EOK) { 66 79 unsigned j = 0;
Note:
See TracChangeset
for help on using the changeset viewer.