Changeset 0b5644c in mainline for uspace/drv/uhci-rhd/root_hub.c


Ignore:
Timestamp:
2011-03-01T14:02:16Z (13 years ago)
Author:
Lubos Slovak <lubos.slovak@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
27270db
Parents:
5d4d98b (diff), cc44f7e (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.
Message:

Merged development changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-rhd/root_hub.c

    r5d4d98b r0b5644c  
    4040#include "root_hub.h"
    4141
    42 
    4342int uhci_root_hub_init(
    4443  uhci_root_hub_t *instance, void *addr, size_t size, ddf_dev_t *rh)
     
    4746        assert(rh);
    4847        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         }
    5448
    5549        /* allow access to root hub registers */
    5650        assert(sizeof(port_status_t) * UHCI_ROOT_HUB_PORT_COUNT == size);
    5751        port_status_t *regs;
    58         ret = pio_enable(
    59           addr, sizeof(port_status_t) * UHCI_ROOT_HUB_PORT_COUNT, (void**)&regs);
     52        ret = pio_enable(addr, size, (void**)&regs);
    6053
    6154        if (ret < 0) {
     
    6760        unsigned i = 0;
    6861        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                 }
    7662                /* mind pointer arithmetics */
    77                 int ret = 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);
    7965                if (ret != EOK) {
    8066                        unsigned j = 0;
Note: See TracChangeset for help on using the changeset viewer.