Changeset 8c877b2 in mainline for uspace/drv/uhci-rhd/root_hub.c
- Timestamp:
- 2011-03-04T13:05:35Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d49728c
- Parents:
- dff940f8 (diff), 9a422574 (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-rhd/root_hub.c
rdff940f8 r8c877b2 40 40 #include "root_hub.h" 41 41 42 43 42 int uhci_root_hub_init( 44 43 uhci_root_hub_t *instance, void *addr, size_t size, ddf_dev_t *rh) … … 47 46 assert(rh); 48 47 int ret; 49 ret = usb_hc_find(rh->handle, &instance->hc_handle);50 usb_log_info("rh found(%d) hc handle: %d.\n", ret, instance->hc_handle);51 if (ret != EOK) {52 return ret;53 }54 48 55 49 /* allow access to root hub registers */ 56 50 assert(sizeof(port_status_t) * UHCI_ROOT_HUB_PORT_COUNT == size); 57 51 port_status_t *regs; 58 ret = pio_enable( 59 addr, sizeof(port_status_t) * UHCI_ROOT_HUB_PORT_COUNT, (void**)®s); 52 ret = pio_enable(addr, size, (void**)®s); 60 53 61 54 if (ret < 0) { … … 67 60 unsigned i = 0; 68 61 for (; i < UHCI_ROOT_HUB_PORT_COUNT; ++i) { 69 /* connect to the parent device (HC) */70 int parent_phone = devman_device_connect(instance->hc_handle, 0);71 //usb_drv_hc_connect(rh, instance->hc_handle, 0);72 if (parent_phone < 0) {73 usb_log_error("Failed to connect to the HC device port %d.\n", i);74 return parent_phone;75 }76 62 /* mind pointer arithmetics */ 77 intret = uhci_port_init(78 &instance->ports[i], regs + i, i, ROOT_HUB_WAIT_USEC, rh , parent_phone);63 ret = uhci_port_init( 64 &instance->ports[i], regs + i, i, ROOT_HUB_WAIT_USEC, rh); 79 65 if (ret != EOK) { 80 66 unsigned j = 0;
Note:
See TracChangeset
for help on using the changeset viewer.