Changeset df6ded8 in mainline for uspace/drv/bus/usb/ehci/ehci_bus.h


Ignore:
Timestamp:
2018-02-28T16:37:50Z (6 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1b20da0
Parents:
f5e5f73 (diff), b2dca8de (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.
git-author:
Jakub Jermar <jakub@…> (2018-02-28 16:06:42)
git-committer:
Jakub Jermar <jakub@…> (2018-02-28 16:37:50)
Message:

Merge github.com:helenos-xhci-team/helenos

This commit merges support for USB 3 and generally refactors, fixes,
extends and cleans up the existing USB framework.

Notable additions and features:

  • new host controller driver has been implemented to control various xHC models (among others, NEC Renesas uPD720200)
  • isochronous data transfer mode
  • support for explicit USB device removal
  • USB tablet driver
File:
1 moved

Legend:

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

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2011 Jan Vesely
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    3233 * @brief EHCI driver
    3334 */
    34 #ifndef DRV_EHCI_HCD_ENDPOINT_H
    35 #define DRV_EHCI_HCD_ENDPOINT_H
     35#ifndef DRV_EHCI_HCD_BUS_H
     36#define DRV_EHCI_HCD_BUS_H
    3637
    3738#include <assert.h>
    3839#include <adt/list.h>
     40#include <usb/host/usb2_bus.h>
    3941#include <usb/host/endpoint.h>
    40 #include <usb/host/hcd.h>
     42#include <usb/dma_buffer.h>
    4143
    4244#include "hw_struct/queue_head.h"
    43 #include "hw_struct/transfer_descriptor.h"
    4445
    4546/** Connector structure linking ED to to prepared TD. */
    4647typedef struct ehci_endpoint {
    47         /** EHCI endpoint descriptor */
     48        /* Inheritance */
     49        endpoint_t base;
     50
     51        /** EHCI endpoint descriptor, backed by dma_buffer */
    4852        qh_t *qh;
    49         /** Linked list used by driver software */
    50         link_t link;
     53       
     54        dma_buffer_t dma_buffer;
     55
     56        /** Link in endpoint_list */
     57        link_t eplist_link;
     58
     59        /** Link in pending_endpoints */
     60        link_t pending_link;
    5161} ehci_endpoint_t;
    5262
    53 errno_t ehci_endpoint_init(hcd_t *hcd, endpoint_t *ep);
    54 void ehci_endpoint_fini(hcd_t *hcd, endpoint_t *ep);
     63typedef struct hc hc_t;
     64
     65typedef struct {
     66        bus_t base;
     67        usb2_bus_helper_t helper;
     68        hc_t *hc;
     69} ehci_bus_t;
     70
     71void ehci_ep_toggle_reset(endpoint_t *);
     72void ehci_bus_prepare_ops(void);
     73
     74errno_t ehci_bus_init(ehci_bus_t *, hc_t *);
    5575
    5676/** Get and convert assigned ehci_endpoint_t structure
    5777 * @param[in] ep USBD endpoint structure.
    58  * @return Pointer to assigned hcd endpoint structure
     78 * @return Pointer to assigned ehci endpoint structure
    5979 */
    60 static inline ehci_endpoint_t * ehci_endpoint_get(const endpoint_t *ep)
     80static inline ehci_endpoint_t *ehci_endpoint_get(const endpoint_t *ep)
    6181{
    6282        assert(ep);
    63         return ep->hc_data.data;
     83        return (ehci_endpoint_t *) ep;
    6484}
    6585
    66 static inline ehci_endpoint_t * ehci_endpoint_list_instance(link_t *l)
     86static inline ehci_endpoint_t *ehci_endpoint_list_instance(link_t *l)
    6787{
    68         return list_get_instance(l, ehci_endpoint_t, link);
     88        return list_get_instance(l, ehci_endpoint_t, eplist_link);
    6989}
    7090
     
    7393 * @}
    7494 */
    75 
Note: See TracChangeset for help on using the changeset viewer.