Changeset fd07e526 in mainline for uspace/drv/bus/usb/uhci/root_hub.c


Ignore:
Timestamp:
2011-09-16T14:50:20Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
432a269, d1e18573
Parents:
47fecbb (diff), 82a31261 (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:

Merge USB changes from bzr://krabicka.net/orome/helenos/usb/

  • Move common HC code from uhci/ohci drivers to libusbhost
  • Rewrite USB HC interface to have common read/write functions for all transfer types.
  • Restructure hc drivers to avoid some hooks and void* casts
  • Cleanup the code and remove unnecessary mallocs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/root_hub.c

    r47fecbb rfd07e526  
    5050int rh_init(rh_t *instance, ddf_fun_t *fun, uintptr_t reg_addr, size_t reg_size)
    5151{
    52         int ret;
    53 
     52        assert(instance);
    5453        assert(fun);
    55 
    56         ret = ddf_fun_add_match_id(fun, "usb&uhci&root-hub", 100);
    57         if (ret != EOK) {
    58                 usb_log_error("Failed to add root hub match id: %s\n",
    59                     str_error(ret));
    60                 return ret;
    61         }
    6254
    6355        /* Initialize resource structure */
     
    7062        instance->io_regs.res.io_range.endianness = LITTLE_ENDIAN;
    7163
    72         return EOK;
     64        const int ret = ddf_fun_add_match_id(fun, "usb&uhci&root-hub", 100);
     65        if (ret != EOK) {
     66                usb_log_error("Failed to add root hub match id: %s\n",
     67                    str_error(ret));
     68        }
     69        return ret;
    7370}
    7471/**
Note: See TracChangeset for help on using the changeset viewer.