Changeset 32fb6bce in mainline for uspace/drv/bus/usb/ehci/ehci_bus.c


Ignore:
Timestamp:
2017-12-18T22:50:21Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7f70d1c
Parents:
1ea0bbf
git-author:
Ondřej Hlavatý <aearsis@…> (2017-12-18 22:04:50)
git-committer:
Ondřej Hlavatý <aearsis@…> (2017-12-18 22:50:21)
Message:

usbhost: refactoring

This commit moves interrupt, status and schedule to bus
operations. Then the purpose of hcd_t is better defined, and split into
hc_driver_t and hc_device_t. hc_driver_t is used to wrap driver
implementation by the library (similar to how usb_driver_t is used to
wrap usb device drivers). hc_device_t is used as a parent for hc_t
inside drivers, and is allocated inside the DDF device node.

To support these changes, some local identifiers were renamed, some
functions were moved and/or renamed and their arguments changed. The
most notable one being hcd_send_batch → bus_device_send_batch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/ehci_bus.c

    r1ea0bbf r32fb6bce  
    162162        .parent = &usb2_bus_ops,
    163163
     164        .interrupt = ehci_hc_interrupt,
     165        .status = ehci_hc_status,
    164166        .endpoint_destroy = ehci_endpoint_destroy,
    165167        .endpoint_create = ehci_endpoint_create,
     
    171173        .batch_create = ehci_create_batch,
    172174        .batch_destroy = ehci_destroy_batch,
     175        .batch_schedule = ehci_hc_schedule,
    173176};
    174177
    175 int ehci_bus_init(ehci_bus_t *bus, hcd_t *hcd, hc_t *hc)
     178int ehci_bus_init(ehci_bus_t *bus, hc_t *hc)
    176179{
    177180        assert(hc);
     
    181184        bus_t *bus_base = (bus_t *) bus;
    182185
    183         usb2_bus_init(usb2_bus, hcd, BANDWIDTH_AVAILABLE_USB11);
     186        usb2_bus_init(usb2_bus, BANDWIDTH_AVAILABLE_USB11);
    184187        bus_base->ops = &ehci_bus_ops;
    185188
Note: See TracChangeset for help on using the changeset viewer.