Changeset fd07e526 in mainline for uspace/drv/bus/usb/uhci/uhci.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/uhci.c

    r47fecbb rfd07e526  
    4141
    4242#include "uhci.h"
    43 #include "iface.h"
    4443#include "pci.h"
    4544
     
    8786/** Operations supported by the HC driver */
    8887static ddf_dev_ops_t hc_ops = {
    89         .interfaces[USBHC_DEV_IFACE] = &hc_iface, /* see iface.h/c */
     88        .interfaces[USBHC_DEV_IFACE] = &hcd_iface, /* see iface.h/c */
    9089};
    9190/*----------------------------------------------------------------------------*/
     
    10099{
    101100        assert(fun);
    102         usb_device_keeper_t *manager = &dev_to_uhci(fun->dev)->hc.manager;
    103         usb_address_t addr = usb_device_keeper_find(manager, handle);
     101        usb_device_manager_t *manager =
     102            &dev_to_uhci(fun->dev)->hc.generic.dev_manager;
     103        const usb_address_t addr = usb_device_manager_find(manager, handle);
    104104
    105105        if (addr < 0) {
     
    202202        CHECK_RET_DEST_FREE_RETURN(ret, "Failed to create UHCI HC function.\n");
    203203        instance->hc_fun->ops = &hc_ops;
    204         instance->hc_fun->driver_data = &instance->hc;
     204        instance->hc_fun->driver_data = &instance->hc.generic;
    205205
    206206        instance->rh_fun = ddf_fun_create(device, fun_inner, "uhci_rh");
Note: See TracChangeset for help on using the changeset viewer.