Lines Matching +full:mux +full:- +full:locked

3  � 1995-2003, 2004, 2005-2011 Freescale Semiconductor, Inc.
50 /* QMan s/w corenet portal, low-level i/face */
53 e_QmPortalPCI = 0, /* PI index, cache-inhibited */
54 e_QmPortalPCE, /* PI index, cache-enabled */
55 e_QmPortalPVB /* valid-bit */
59 e_QmPortalEqcrCCI = 0, /* CI index, cache-inhibited */
60 e_QmPortalEqcrCCE /* CI index, cache-enabled */
64 e_QmPortalDqrrCCI = 0, /* CI index, cache-inhibited */
65 e_QmPortalDqrrCCE, /* CI index, cache-enabled */
70 e_QmPortalMrCCI = 0, /* CI index, cache-inhibited */
71 e_QmPortalMrCCE /* CI index, cache-enabled */
115 * also used for any "core-affine" portals, ie. default portals
116 * associated to the corresponding cpu. -1 implies that there is no core
127 /* which portal sub-interfaces are already bound (ie. "in use") */
144 /* Bitmask of portal (logical-, not cell-)indices that have dequeue
146 * 0x001 -> qm_portal_get(0)
147 * 0x002 -> qm_portal_get(1)
148 * 0x004 -> qm_portal_get(2)
150 * 0x200 -> qm_portal_get(9)
155 /* ------------------------------ */
156 /* --- Portal enumeration API --- */
165 /* ------------------------------------ */
166 /* --- Pool channel enumeration API --- */
173 * bit-mask (the least significant bit of 'mask' is used if more than one bit is
193 #define QM_SDQCR_TYPE_SET(v) (((v) & 0x03) << (31-7))
206 * NUMFRAMES(n) (6-bit) or NUMFRAMES_TILLEMPTY to fill in the frame-count. Use
226 * Either select the work-queue ID with SPECIFICWQ_WQ(), or select the
228 * work-queue priority (0-7) with SPECIFICWQ_WQ() - either way, you get the
253 /* ------------------------------------- */
254 /* --- Portal interrupt register API --- */
260 * and while there are truly-scheduled FQs available, it is deasserted as/when
261 * there are no longer any truly-scheduled FQs available. The same is true for
267 * asserted in the status register, it must be write-1-to-clear'd - the
273 * status register can still reveal un-enabled bits - this is why the
275 * "Un-enabled" means it won't, on its own, trigger an interrupt.
279 * zero. The inhibit register is the only interrupt-related register that
280 * does not share the bit definitions - it is a boolean on/off register.
289 #define QM_PIRQ_DQRI 0x00020000 /* DQRR Ring (non-empty) */
290 #define QM_PIRQ_MRI 0x00010000 /* MR Ring (non-empty) */
307 /* ------------------------------------------------------- */
308 /* --- Qman data structures (and associated constants) --- */
316 * scatter-gather table. 'big' implies a 29-bit length with no offset
317 * field, otherwise length is 20-bit and offset is 9-bit. 'compound'
318 * implies a s/g-like table, where each entry itself represents a frame
319 * (contiguous or scatter-gather) and the 29-bit "length" is
345 /* Treat it as 64-bit opaque */
355 /* 40-bit address of FQ context to
356 * stash, must be cacheline-aligned */
369 volatile uint8_t addr_hi; /* high 8-bits of 40-bit address */
370 volatile uint32_t addr_lo; /* low 32-bits of 40-bit address */
372 * bits of the 32-bit word. For packing reasons, it is duplicated in the
409 volatile uint32_t orp; /* 24-bit */
410 volatile uint32_t fqid; /* 24-bit */
438 volatile uint16_t seqnum; /* 15-bit */
441 volatile uint32_t fqid; /* 24-bit */
452 #define QM_DQRR_STAT_FQ_FORCEELIGIBLE 0x20 /* FQ was force-eligible'd */
453 #define QM_DQRR_STAT_FD_VALID 0x10 /* has a non-NULL FD */
470 volatile uint32_t fqid; /* 24-bit */
481 volatile uint32_t fqid; /* 24-bit */
488 volatile uint32_t fqid; /* 24-bit */
498 * originating from direct-connect portals ("dcern") use 0x20 as a verb which
525 * also used as the qman_query_fq() result structure in the high-level API. */
527 /* TODO What about OAC for intra-class? */
567 #define QM_FQCTRL_TDE 0x0200 /* Tail-Drop Enable */
569 #define QM_FQCTRL_CTXASTASHING 0x0080 /* Context-A stashing */
571 #define QM_FQCTRL_FORCESFDR 0x0008 /* High-priority SFDRs */
583 /* This struct represents the 32-bit "WR_PARM_[GYR]" parameters in CGR fields
596 volatile uint32_t SA:7; /* must be between 64-127 */
603 /* This struct represents the 13-bit "CS_THRES" CGR field. In the corresponding
604 * management commands, this is padded to a 16-bit structure field, so that's
637 /* See 1.5.8.5.3: "Query FQ Non-Programmable Fields" */
648 volatile uint32_t fqid; /* 24-bit */
655 volatile uint32_t fqid; /* 24-bit */
660 volatile uint32_t fqid; /* 24-bit */
665 volatile uint32_t fqid; /* 24-bit */
706 #define QM_MCC_VERB_QUERYFQ_NP 0x45 /* "non-programmable" fields */
718 /* INITFQ-specific flags */
729 /* INITCGR/MODIFYCGR-specific flags */
745 /* See 1.5.8.5.3: "Query FQ Non-Programmable Fields" */
807 volatile uint32_t i_bcnt_hi:8;/* high 8-bits of 40-bit "Instant" */
808 volatile uint32_t i_bcnt_lo; /* low 32-bits of 40-bit */
810 volatile uint32_t a_bcnt_hi:8;/* high 8-bits of 40-bit "Average" */
811 volatile uint32_t a_bcnt_lo; /* low 32-bits of 40-bit */
885 * QM_MCR_QUERYCONGESTION(&res->querycongestion.state, cgr));
892 return (int)(p->__state[__CGR_WORD(cgr)] & (0x80000000 >> __CGR_SHIFT(cgr))); in QM_MCR_QUERYCONGESTION()
900 /* Represents an allocator over a range of FQIDs. NB, accesses are not locked,
905 * always succeeds, but returns non-zero if there were "leaked" FQID
915 /* Managed (aka "shared" or "mux/demux") portal, high-level i/face */
919 /* ----------------- */
920 /* This wrapper represents a bit-array for the state of the 256 Qman congestion
933 return QM_MCR_QUERYCONGESTION(&c->q, (uint8_t)num); in QMAN_CGRS_GET()
937 c->q.__state[__CGR_WORD(num)] |= (0x80000000 >> __CGR_SHIFT(num)); in QMAN_CGRS_SET()
941 c->q.__state[__CGR_WORD(num)] &= ~(0x80000000 >> __CGR_SHIFT(num)); in QMAN_CGRS_UNSET()
945 /* ----------------------- */
960 /* Like _consume, but requests parking - FQ must be held-active */
962 /* Does not consume, for DCA mode only. This allows out-of-order
986 qman_cb_mr fqs; /* frame-queue state changes*/
999 #define QMAN_PORTAL_FLAG_IRQ_FAST 0x00000002 /* ... for fast-path too! */
1000 #define QMAN_PORTAL_FLAG_IRQ_SLOW 0x00000003 /* ... for slow-path too! */
1002 #define QMAN_PORTAL_FLAG_LOCKED 0x00000008 /* multi-core locking */
1003 #define QMAN_PORTAL_FLAG_NOTAFFINE 0x00000010 /* not cpu-default portal */
1015 #define QMAN_FQ_FLAG_LOCKED 0x00000008 /* multi-core locking */
1041 * hardware, bit-wise. */
1047 #define QMAN_ENQUEUE_FLAG_DCA 0x00008000 /* perform enqueue-DCA */
1055 /* For the ORP-specific qman_enqueue_orp() variant, this flag indicates "Not
1056 * Last In Sequence", ie. a non-terminating fragment. */
1058 /* - this flag performs no enqueue but fills in an ORP sequence number that
1061 /* - this flag performs no enqueue but advances NESN to the given sequence
1066 /* ------------- */
1068 * qman_free_fq - Deallocates a FQ
1070 * @flags: bit-mask of QMAN_FQ_FREE_*** options
1074 * FQ must be in the 'out-of-service' state unless the QMAN_FQ_FREE_PARKED flag
1080 * qman_fq_fqid - Queries the frame queue ID of a FQ object
1086 * qman_fq_state - Queries the state of a FQ object