Changeset df6ded8 in mainline for uspace/drv/bus/usb/ehci/ehci_batch.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 edited

Legend:

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

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2014 Jan Vesely
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    3940#include <stdbool.h>
    4041#include <usb/host/usb_transfer_batch.h>
     42#include <usb/dma_buffer.h>
    4143
    4244#include "hw_struct/queue_head.h"
     
    4547/** EHCI specific data required for USB transfer */
    4648typedef struct ehci_transfer_batch {
    47         /** Link */
    48         link_t link;
     49        usb_transfer_batch_t base;
     50        /** Number of TDs used by the transfer */
     51        size_t td_count;
    4952        /** Endpoint descriptor of the target endpoint. */
    5053        qh_t *qh;
    51         /** List of TDs needed for the transfer */
    52         td_t **tds;
    53         /** Number of TDs used by the transfer */
    54         size_t td_count;
    55         /** Data buffer, must be accessible by the EHCI hw. */
    56         char *device_buffer;
     54        /** Backend for TDs and setup data. */
     55        dma_buffer_t ehci_dma_buffer;
     56        /** List of TDs needed for the transfer - backed by dma_buffer */
     57        td_t *tds;
     58        /** Data buffers - backed by dma_buffer */
     59        void *setup_buffer;
     60        void *data_buffer;
    5761        /** Generic USB transfer structure */
    5862        usb_transfer_batch_t *usb_batch;
    5963} ehci_transfer_batch_t;
    6064
    61 ehci_transfer_batch_t * ehci_transfer_batch_get(usb_transfer_batch_t *batch);
    62 bool ehci_transfer_batch_is_complete(const ehci_transfer_batch_t *batch);
     65ehci_transfer_batch_t *ehci_transfer_batch_create(endpoint_t *ep);
     66int ehci_transfer_batch_prepare(ehci_transfer_batch_t *batch);
    6367void ehci_transfer_batch_commit(const ehci_transfer_batch_t *batch);
    64 void ehci_transfer_batch_finish_dispose(ehci_transfer_batch_t *batch);
     68bool ehci_transfer_batch_check_completed(ehci_transfer_batch_t *batch);
     69void ehci_transfer_batch_destroy(ehci_transfer_batch_t *batch);
    6570
    66 static inline ehci_transfer_batch_t *ehci_transfer_batch_from_link(link_t *l)
     71static inline ehci_transfer_batch_t *ehci_transfer_batch_get(
     72    usb_transfer_batch_t *usb_batch)
    6773{
    68         assert(l);
    69         return list_get_instance(l, ehci_transfer_batch_t, link);
     74        assert(usb_batch);
     75
     76        return (ehci_transfer_batch_t *) usb_batch;
    7077}
     78
    7179#endif
    7280/**
Note: See TracChangeset for help on using the changeset viewer.