Changeset cf40770 in rtems-libbsd for linux/drivers/soc/fsl/qbman/qman_priv.h


Ignore:
Timestamp:
May 18, 2017, 5:27:33 AM (5 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
5, 5-freebsd-12, 6-freebsd-12, master
Children:
b3a6ad0
Parents:
721b1c1
git-author:
Sebastian Huber <sebastian.huber@…> (05/18/17 05:27:33)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/23/17 07:24:05)
Message:

Linux update to 4.12-rc1+

Linux baseline b23afd384801711ab6dbccd259cc14cb09a1dcaf.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linux/drivers/soc/fsl/qbman/qman_priv.h

    r721b1c1 rcf40770  
    3434
    3535#include <soc/fsl/qman.h>
     36#include <linux/dma-mapping.h>
    3637#include <linux/iommu.h>
    3738
     
    8990        return ((u64)q->a_bcnt_hi << 32) | be32_to_cpu(q->a_bcnt_lo);
    9091}
    91 
    92 /* "Query FQ Non-Programmable Fields" */
    93 
    94 struct qm_mcr_queryfq_np {
    95         u8 verb;
    96         u8 result;
    97         u8 __reserved1;
    98         u8 state;               /* QM_MCR_NP_STATE_*** */
    99         u32 fqd_link;           /* 24-bit, _res2[24-31] */
    100         u16 odp_seq;            /* 14-bit, _res3[14-15] */
    101         u16 orp_nesn;           /* 14-bit, _res4[14-15] */
    102         u16 orp_ea_hseq;        /* 15-bit, _res5[15] */
    103         u16 orp_ea_tseq;        /* 15-bit, _res6[15] */
    104         u32 orp_ea_hptr;        /* 24-bit, _res7[24-31] */
    105         u32 orp_ea_tptr;        /* 24-bit, _res8[24-31] */
    106         u32 pfdr_hptr;          /* 24-bit, _res9[24-31] */
    107         u32 pfdr_tptr;          /* 24-bit, _res10[24-31] */
    108         u8 __reserved2[5];
    109         u8 is;                  /* 1-bit, _res12[1-7] */
    110         u16 ics_surp;
    111         u32 byte_cnt;
    112         u32 frm_cnt;            /* 24-bit, _res13[24-31] */
    113         u32 __reserved3;
    114         u16 ra1_sfdr;           /* QM_MCR_NP_RA1_*** */
    115         u16 ra2_sfdr;           /* QM_MCR_NP_RA2_*** */
    116         u16 __reserved4;
    117         u16 od1_sfdr;           /* QM_MCR_NP_OD1_*** */
    118         u16 od2_sfdr;           /* QM_MCR_NP_OD2_*** */
    119         u16 od3_sfdr;           /* QM_MCR_NP_OD3_*** */
    120 } __packed;
    121 
    122 #define QM_MCR_NP_STATE_FE              0x10
    123 #define QM_MCR_NP_STATE_R               0x08
    124 #define QM_MCR_NP_STATE_MASK            0x07    /* Reads FQD::STATE; */
    125 #define QM_MCR_NP_STATE_OOS             0x00
    126 #define QM_MCR_NP_STATE_RETIRED         0x01
    127 #define QM_MCR_NP_STATE_TEN_SCHED       0x02
    128 #define QM_MCR_NP_STATE_TRU_SCHED       0x03
    129 #define QM_MCR_NP_STATE_PARKED          0x04
    130 #define QM_MCR_NP_STATE_ACTIVE          0x05
    131 #define QM_MCR_NP_PTR_MASK              0x07ff  /* for RA[12] & OD[123] */
    132 #define QM_MCR_NP_RA1_NRA(v)            (((v) >> 14) & 0x3)     /* FQD::NRA */
    133 #define QM_MCR_NP_RA2_IT(v)             (((v) >> 14) & 0x1)     /* FQD::IT */
    134 #define QM_MCR_NP_OD1_NOD(v)            (((v) >> 14) & 0x3)     /* FQD::NOD */
    135 #define QM_MCR_NP_OD3_NPC(v)            (((v) >> 14) & 0x3)     /* FQD::NPC */
    136 
    137 enum qm_mcr_queryfq_np_masks {
    138         qm_mcr_fqd_link_mask = BIT(24)-1,
    139         qm_mcr_odp_seq_mask = BIT(14)-1,
    140         qm_mcr_orp_nesn_mask = BIT(14)-1,
    141         qm_mcr_orp_ea_hseq_mask = BIT(15)-1,
    142         qm_mcr_orp_ea_tseq_mask = BIT(15)-1,
    143         qm_mcr_orp_ea_hptr_mask = BIT(24)-1,
    144         qm_mcr_orp_ea_tptr_mask = BIT(24)-1,
    145         qm_mcr_pfdr_hptr_mask = BIT(24)-1,
    146         qm_mcr_pfdr_tptr_mask = BIT(24)-1,
    147         qm_mcr_is_mask = BIT(1)-1,
    148         qm_mcr_frm_cnt_mask = BIT(24)-1,
    149 };
    150 #define qm_mcr_np_get(np, field) \
    151         ((np)->field & (qm_mcr_##field##_mask))
    15292
    15393/* Congestion Groups */
     
    274214int qman_query_fq(struct qman_fq *fq, struct qm_fqd *fqd);
    275215
    276 /*
    277  * For qman_volatile_dequeue(); Choose one PRECEDENCE. EXACT is optional. Use
    278  * NUMFRAMES(n) (6-bit) or NUMFRAMES_TILLEMPTY to fill in the frame-count. Use
    279  * FQID(n) to fill in the frame queue ID.
    280  */
    281 #define QM_VDQCR_PRECEDENCE_VDQCR       0x0
    282 #define QM_VDQCR_PRECEDENCE_SDQCR       0x80000000
    283 #define QM_VDQCR_EXACT                  0x40000000
    284 #define QM_VDQCR_NUMFRAMES_MASK         0x3f000000
    285 #define QM_VDQCR_NUMFRAMES_SET(n)       (((n) & 0x3f) << 24)
    286 #define QM_VDQCR_NUMFRAMES_GET(n)       (((n) >> 24) & 0x3f)
    287 #define QM_VDQCR_NUMFRAMES_TILLEMPTY    QM_VDQCR_NUMFRAMES_SET(0)
    288 
    289 #define QMAN_VOLATILE_FLAG_WAIT      0x00000001 /* wait if VDQCR is in use */
    290 #define QMAN_VOLATILE_FLAG_WAIT_INT  0x00000002 /* if wait, interruptible? */
    291 #define QMAN_VOLATILE_FLAG_FINISH    0x00000004 /* wait till VDQCR completes */
    292 
    293 /*
    294  * qman_volatile_dequeue - Issue a volatile dequeue command
    295  * @fq: the frame queue object to dequeue from
    296  * @flags: a bit-mask of QMAN_VOLATILE_FLAG_*** options
    297  * @vdqcr: bit mask of QM_VDQCR_*** options, as per qm_dqrr_vdqcr_set()
    298  *
    299  * Attempts to lock access to the portal's VDQCR volatile dequeue functionality.
    300  * The function will block and sleep if QMAN_VOLATILE_FLAG_WAIT is specified and
    301  * the VDQCR is already in use, otherwise returns non-zero for failure. If
    302  * QMAN_VOLATILE_FLAG_FINISH is specified, the function will only return once
    303  * the VDQCR command has finished executing (ie. once the callback for the last
    304  * DQRR entry resulting from the VDQCR command has been called). If not using
    305  * the FINISH flag, completion can be determined either by detecting the
    306  * presence of the QM_DQRR_STAT_UNSCHEDULED and QM_DQRR_STAT_DQCR_EXPIRED bits
    307  * in the "stat" parameter passed to the FQ's dequeue callback, or by waiting
    308  * for the QMAN_FQ_STATE_VDQCR bit to disappear.
    309  */
    310 int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
    311 
    312216int qman_alloc_fq_table(u32 num_fqids);
    313217
Note: See TracChangeset for help on using the changeset viewer.