Changeset eaf5e86 in mainline for uspace/drv/bus/usb/xhci/hw_struct


Ignore:
Timestamp:
2017-10-11T13:18:54Z (8 years ago)
Author:
Ondřej Hlavatý <aearsis@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63adb18
Parents:
ac18b08
Message:

xhci: whitespace fixes

Location:
uspace/drv/bus/usb/xhci/hw_struct
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/xhci/hw_struct/common.h

    rac18b08 reaf5e86  
    8383static inline void xhci_qword_set_bits(xhci_qword_t *storage, uint64_t value, unsigned hi, unsigned lo)
    8484{
    85    const uint64_t mask = host2xhci(64, BIT_RANGE(uint64_t, hi, lo));
    86    const uint64_t set = host2xhci(64, value << lo);
    87    *storage = (*storage & ~mask) | set;
     85        const uint64_t mask = host2xhci(64, BIT_RANGE(uint64_t, hi, lo));
     86        const uint64_t set = host2xhci(64, value << lo);
     87        *storage = (*storage & ~mask) | set;
    8888}
    8989
  • uspace/drv/bus/usb/xhci/hw_struct/context.h

    rac18b08 reaf5e86  
    6565
    6666#define XHCI_EP_TYPE_SET(ctx, val) \
    67     xhci_dword_set_bits(&(ctx).data[1], val, 5, 3)
     67        xhci_dword_set_bits(&(ctx).data[1], val, 5, 3)
    6868#define XHCI_EP_MAX_PACKET_SIZE_SET(ctx, val) \
    69     xhci_dword_set_bits(&(ctx).data[1], val, 31, 16)
     69        xhci_dword_set_bits(&(ctx).data[1], val, 31, 16)
    7070#define XHCI_EP_MAX_BURST_SIZE_SET(ctx, val) \
    71     xhci_dword_set_bits(&(ctx).data[1], val, 15, 8)
     71        xhci_dword_set_bits(&(ctx).data[1], val, 15, 8)
    7272#define XHCI_EP_TR_DPTR_SET(ctx, val) \
    73     xhci_qword_set_bits(&(ctx).data2, (val >> 4), 63, 4)
     73        xhci_qword_set_bits(&(ctx).data2, (val >> 4), 63, 4)
    7474#define XHCI_EP_DCS_SET(ctx, val) \
    75     xhci_qword_set_bits(&(ctx).data2, val, 0, 0)
     75        xhci_qword_set_bits(&(ctx).data2, val, 0, 0)
    7676#define XHCI_EP_INTERVAL_SET(ctx, val) \
    77     xhci_dword_set_bits(&(ctx).data[0], val, 23, 16)
     77        xhci_dword_set_bits(&(ctx).data[0], val, 23, 16)
    7878#define XHCI_EP_MAX_P_STREAMS_SET(ctx, val) \
    79     xhci_dword_set_bits(&(ctx).data[0], val, 14, 10)
     79        xhci_dword_set_bits(&(ctx).data[0], val, 14, 10)
    8080#define XHCI_EP_MULT_SET(ctx, val) \
    81     xhci_dword_set_bits(&(ctx).data[0], val, 9, 8)
     81        xhci_dword_set_bits(&(ctx).data[0], val, 9, 8)
    8282#define XHCI_EP_ERROR_COUNT_SET(ctx, val) \
    83     xhci_dword_set_bits(&(ctx).data[1], val, 2, 1)
     83        xhci_dword_set_bits(&(ctx).data[1], val, 2, 1)
    8484
    8585#define XHCI_EP_STATE(ctx)              XHCI_DWORD_EXTRACT((ctx).data[0],  2,  0)
     
    108108
    109109#define XHCI_SLOT_ROOT_HUB_PORT_SET(ctx, val) \
    110     xhci_dword_set_bits(&(ctx).data[1], val, 23, 16)
     110        xhci_dword_set_bits(&(ctx).data[1], val, 23, 16)
    111111#define XHCI_SLOT_CTX_ENTRIES_SET(ctx, val) \
    112     xhci_dword_set_bits(&(ctx).data[0], val, 31, 27)
     112        xhci_dword_set_bits(&(ctx).data[0], val, 31, 27)
    113113#define XHCI_SLOT_ROUTE_STRING_SET(ctx, val) \
    114114        xhci_dword_set_bits(&(ctx).data[0], (val & 0xFFFFF), 19, 0)
  • uspace/drv/bus/usb/xhci/hw_struct/regs.h

    rac18b08 reaf5e86  
    499499 */
    500500typedef struct xhci_psi {
    501         xhci_dword_t psi;
     501        xhci_dword_t psi;
    502502} xhci_psi_t;
    503503
     
    547547
    548548static const xhci_sp_name_t xhci_name_usb = {
    549     .str = "USB "
     549        .str = "USB "
    550550};
    551551
  • uspace/drv/bus/usb/xhci/hw_struct/trb.h

    rac18b08 reaf5e86  
    170170static inline void xhci_trb_copy(xhci_trb_t *dst, xhci_trb_t *src)
    171171{
    172     /*
    173     * As we do not know, whether our architecture is capable of copying 16
    174     * bytes atomically, let's copy the fields one by one.
    175     */
    176     dst->parameter = src->parameter;
    177     dst->status = src->status;
    178     dst->control = src->control;
     172        /*
     173        * As we do not know, whether our architecture is capable of copying 16
     174        * bytes atomically, let's copy the fields one by one.
     175        */
     176        dst->parameter = src->parameter;
     177        dst->status = src->status;
     178        dst->control = src->control;
    179179}
    180180
Note: See TracChangeset for help on using the changeset viewer.