Changeset 20eaa82 in mainline for uspace/drv/bus/usb/xhci/main.c


Ignore:
Timestamp:
2017-10-15T13:44:39Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2770b66
Parents:
867b375
Message:

usbhost refactoring: introduced bus→enumerate_device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/main.c

    r867b375 r20eaa82  
    5555static void hcd_interrupt(hcd_t *, uint32_t);
    5656static int hcd_schedule(hcd_t *, usb_transfer_batch_t *);
    57 static int hcd_address_device(hcd_t *, usb_speed_t, usb_tt_address_t, usb_address_t *);
    5857static void hc_driver_fini(hcd_t *);
    5958
    6059static const ddf_hc_driver_t xhci_ddf_hc_driver = {
    61         .hc_speed = USB_SPEED_SUPER,
    6260        .name = "XHCI-PCI",
    6361        .init = hc_driver_init,
     
    7169                .irq_hook       = hcd_interrupt,
    7270                .status_hook    = hcd_status,
    73                 .address_device = hcd_address_device,
    7471        }
    7572};
     
    9087
    9188        hcd_set_implementation(hcd, hc, &xhci_ddf_hc_driver.ops, &hc->bus.base);
     89        hc->hcd = hcd;
    9290
    9391        return EOK;
     
    126124        assert(hc);
    127125
    128         hc->rh.hcd_rh = hcd_roothub_create(hcd, dev, USB_SPEED_SUPER);
    129         return hc->rh.hcd_rh ? EOK : ENOMEM;
     126        hc->rh.hc_device = dev;
     127        return device_init(&hc->rh.device);
    130128}
    131129
     
    153151
    154152        hc_interrupt(hc, status);
    155 }
    156 
    157 static int hcd_address_device(hcd_t *hcd, usb_speed_t speed, usb_tt_address_t tt, usb_address_t *address)
    158 {
    159         xhci_hc_t *hc = hcd_get_driver_data(hcd);
    160         assert(hc);
    161 
    162         return xhci_rh_address_device(&hc->rh, speed, tt, address);
    163153}
    164154
Note: See TracChangeset for help on using the changeset viewer.