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/ehci/hw_struct/link_pointer.h

    r5b18137 rb4b534ac  
    11/*
    2  * Copyright (c) 2011 Vojtech Horky
     2 * Copyright (c) 2013 Jan Vesely
    33 * All rights reserved.
    44 *
     
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 
    29 /** @addtogroup libusb
     28/** @addtogroup drvusbehci
    3029 * @{
    3130 */
    3231/** @file
    33  * Implementations of DDF interfaces functions.
     32 * @brief EHCI driver
    3433 */
    35 
    36 #ifndef LIBUSB_DDFIFACE_H_
    37 #define LIBUSB_DDFIFACE_H_
     34#ifndef DRV_EHCI_HW_STRUCT_LINK_POINTER_H
     35#define DRV_EHCI_HW_STRUCT_LINK_POINTER_H
    3836
    3937#include <sys/types.h>
    40 #include <usb_iface.h>
    4138
    42 extern int usb_iface_get_hc_handle_device_impl(ddf_fun_t *, devman_handle_t *);
    43 extern int usb_iface_get_my_address_forward_impl(ddf_fun_t *, usb_address_t *);
    44 extern usb_iface_t usb_iface_hub_impl;
     39/** EHCI link pointer, used by many data structures */
     40typedef volatile uint32_t link_pointer_t;
    4541
    46 extern int usb_iface_get_my_address_from_device_data(ddf_fun_t *, usb_address_t *);
    47 extern usb_iface_t usb_iface_hub_child_impl;
     42#define LINK_POINTER_ADDRESS_MASK   0xfffffff0 /* upper 28 bits */
    4843
    49 extern int usb_iface_get_hc_handle_hc_impl(ddf_fun_t *, devman_handle_t *);
     44#define LINK_POINTER_TERMINATE_FLAG   (1 << 0)
     45
     46enum {
     47        LINK_POINTER_TYPE_iTD  = 0x0 << 1,
     48        LINK_POINTER_TYPE_QH   = 0x1 << 1,
     49        LINK_POINTER_TYPE_siTD = 0x2 << 1,
     50        LINK_POINTER_TYPE_FSTN = 0x3 << 1,
     51        LINK_POINTER_TYPE_MASK = 0x3 << 1,
     52};
     53
     54#define LINK_POINTER_QH(address) \
     55        ((address & LINK_POINTER_ADDRESS_MASK) | LINK_POINTER_TYPE_QH)
     56
     57#define LINK_POINTER_TD(address) \
     58        (address & LINK_POINTER_ADDRESS_MASK)
     59
     60#define LINK_POINTER_TERM \
     61        ((link_pointer_t)LINK_POINTER_TERMINATE_FLAG)
    5062
    5163#endif
    52 
    5364/**
    5465 * @}
Note: See TracChangeset for help on using the changeset viewer.