Changeset df6ded8 in mainline for uspace/drv/bus/usb/vhc/vhcd.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/vhc/vhcd.h

    rf5e5f73 rdf6ded8  
    11/*
    22 * Copyright (c) 2010 Vojtech Horky
     3 * Copyright (c) 2018 Ondrej Hlavaty
    34 * All rights reserved.
    45 *
     
    3839
    3940#include <usbvirt/device.h>
    40 #include <usbhc_iface.h>
    4141#include <async.h>
     42#include <macros.h>
    4243
    4344#include <usb/host/hcd.h>
     45#include <usb/host/usb2_bus.h>
     46#include <usb/host/usb_transfer_batch.h>
    4447
    4548#define NAME "vhc"
     
    5659
    5760typedef struct {
    58         uint32_t magic;
     61        hc_device_t base;
     62
     63        bus_t bus;
     64        usb2_bus_helper_t bus_helper;
     65
     66        ddf_fun_t *virtual_fun;
    5967        list_t devices;
    6068        fibril_mutex_t guard;
     
    6371
    6472typedef struct {
     73        usb_transfer_batch_t batch;
    6574        link_t link;
    66         usb_transfer_batch_t *batch;
    6775} vhc_transfer_t;
     76
     77static inline vhc_data_t *hcd_to_vhc(hc_device_t *hcd)
     78{
     79        assert(hcd);
     80        return (vhc_data_t *) hcd;
     81}
     82
     83static inline vhc_data_t *bus_to_vhc(bus_t *bus)
     84{
     85        assert(bus);
     86        return member_to_inst(bus, vhc_data_t, bus);
     87}
    6888
    6989void on_client_close(ddf_fun_t *fun);
     
    7393errno_t vhc_virtdev_plug(vhc_data_t *, async_sess_t *, uintptr_t *);
    7494errno_t vhc_virtdev_plug_local(vhc_data_t *, usbvirt_device_t *, uintptr_t *);
    75 errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *, usb_address_t address);
     95errno_t vhc_virtdev_plug_hub(vhc_data_t *, usbvirt_device_t *, uintptr_t *,
     96    usb_address_t address);
    7697void vhc_virtdev_unplug(vhc_data_t *, uintptr_t);
    7798
    78 errno_t vhc_init(vhc_data_t *instance);
    79 errno_t vhc_schedule(hcd_t *hcd, usb_transfer_batch_t *batch);
     99errno_t vhc_init(vhc_data_t *);
     100errno_t vhc_schedule(usb_transfer_batch_t *);
    80101errno_t vhc_transfer_queue_processor(void *arg);
    81102
Note: See TracChangeset for help on using the changeset viewer.