Changeset 682c9354 in mainline for uspace/drv/bus/usb/xhci/endpoint.h


Ignore:
Timestamp:
2018-01-20T15:32:12Z (7 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
abb5d08
Parents:
129b821f
Message:

xhci: move all real functionality from bus to device/endpoint/transfers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/endpoint.h

    r129b821f r682c9354  
    4545#include <ddf/driver.h>
    4646
     47#include "device.h"
    4748#include "isoch.h"
    4849#include "transfers.h"
     
    105106        (usb_str_transfer_type((ep).base.transfer_type))
    106107
    107 typedef struct xhci_device {
    108         device_t base;          /**< Inheritance. Keep this first. */
    109 
    110         /** Slot ID assigned to the device by xHC. */
    111         uint32_t slot_id;
    112 
    113         /** Corresponding port on RH */
    114         uint8_t rh_port;
    115 
    116         /** USB Tier of the device */
    117         uint8_t tier;
    118 
    119         /** Route string */
    120         uint32_t route_str;
    121 
    122         /** Place to store the allocated context */
    123         dma_buffer_t dev_ctx;
    124 
    125         /** Hub specific information. Valid only if the device is_hub. */
    126         bool is_hub;
    127         uint8_t num_ports;
    128         uint8_t tt_think_time;
    129 } xhci_device_t;
    130 
    131 #define XHCI_DEV_FMT  "(%s, slot %d)"
    132 #define XHCI_DEV_ARGS(dev)               ddf_fun_get_name((dev).base.fun), (dev).slot_id
    133 
    134108int xhci_endpoint_type(xhci_endpoint_t *ep);
    135109
    136 int xhci_endpoint_init(xhci_endpoint_t *, device_t *, const usb_endpoint_descriptors_t *);
    137 void xhci_endpoint_fini(xhci_endpoint_t *);
     110endpoint_t *xhci_endpoint_create(device_t *, const usb_endpoint_descriptors_t *);
     111int xhci_endpoint_register(endpoint_t *);
     112void xhci_endpoint_unregister(endpoint_t *);
     113void xhci_endpoint_destroy(endpoint_t *);
    138114
    139115void xhci_endpoint_free_transfer_ds(xhci_endpoint_t *xhci_ep);
     
    144120void xhci_setup_endpoint_context(xhci_endpoint_t *, xhci_ep_ctx_t *);
    145121int xhci_endpoint_clear_halt(xhci_endpoint_t *, unsigned);
    146 
    147 static inline xhci_device_t * xhci_device_get(device_t *dev)
    148 {
    149         assert(dev);
    150         return (xhci_device_t *) dev;
    151 }
    152122
    153123static inline xhci_endpoint_t * xhci_endpoint_get(endpoint_t *ep)
Note: See TracChangeset for help on using the changeset viewer.