Changeset b4b534ac in mainline for uspace/drv/bus/usb/uhci/uhci_rh.h


Ignore:
Timestamp:
2016-07-22T08:24:47Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f76d2c2
Parents:
5b18137 (diff), 8351f9a4 (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.
Message:

Merge from lp:~jan.vesely/helenos/usb

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/uhci/uhci_rh.h

    r5b18137 rb4b534ac  
    11/*
    2  * Copyright (c) 2011 Jan Vesely
     2 * Copyright (c) 2013 Jan Vesely
    33 * All rights reserved.
    44 *
     
    3131 */
    3232/** @file
    33  * @brief UHCI driver
     33 * @brief UHCI host controller driver structure
    3434 */
    35 #ifndef DRV_UHCI_RH_H
    36 #define DRV_UHCI_RH_H
     35#ifndef DRV_UHCI_UHCI_RH_H
     36#define DRV_UHCI_UHCI_RH_H
    3737
    38 #include <ddf/driver.h>
    39 #include <ops/hw_res.h>
    40 #include <ops/pio_window.h>
     38#include <usbvirt/virthub_base.h>
     39#include <usb/host/usb_transfer_batch.h>
     40#include <usb/usb.h>
    4141
    42 /** DDF support structure for uhci_rhd driver, provides I/O resources */
    43 typedef struct rh {
    44         /** List of resources available to the root hub. */
    45         hw_resource_list_t resource_list;
    46         /** The only resource in the RH resource list */
    47         hw_resource_t io_regs;
    48         /** PIO window in which the RH will operate. */
    49         pio_window_t pio_window;       
    50 } rh_t;
     42#include <stdbool.h>
     43#include <sys/types.h>
    5144
    52 extern int rh_init(rh_t *, ddf_fun_t *, addr_range_t *, uintptr_t, size_t);
     45/** Endpoint number for status change pipe. */
     46#define HUB_STATUS_CHANGE_PIPE   1
     47
     48/** Virtual to UHCI hub connector */
     49typedef struct {
     50        /** Virtual hub software implementation */
     51        virthub_base_t base;
     52        /** UHCI root hub port io registers */
     53        ioport16_t *ports[2];
     54        /** Reset change indicator, it is not reported by regs */
     55        bool reset_changed[2];
     56} uhci_rh_t;
     57
     58int uhci_rh_init(uhci_rh_t *instance, ioport16_t *ports, const char *name);
     59int uhci_rh_schedule(uhci_rh_t *instance, usb_transfer_batch_t *batch);
     60
     61/** Get UHCI rh address.
     62 *
     63 * @param instance UHCI rh instance.
     64 * @return USB address assigned to the hub.
     65 * Wrapper for virtual hub address
     66 */
     67static inline usb_address_t uhci_rh_get_address(uhci_rh_t *instance)
     68{
     69        return virthub_base_get_address(&instance->base);
     70}
    5371
    5472#endif
Note: See TracChangeset for help on using the changeset viewer.