Lines Matching +full:bman +full:- +full:portal
3 � 1995-2003, 2004, 2005-2011 Freescale Semiconductor, Inc.
48 /* BMan s/w corenet portal, low-level i/face */
51 e_BmPortalPCI = 0, /* PI index, cache-inhibited */
52 e_BmPortalPCE, /* PI index, cache-enabled */
53 e_BmPortalPVB /* valid-bit */
57 e_BmPortalRcrCCI = 0, /* CI index, cache-inhibited */
58 e_BmPortalRcrCCE /* CI index, cache-enabled */
61 /* Portal constants */
72 /* Represents s/w corenet portal mapped data structures */
77 /* This type represents a s/w corenet portal space, and is used for creating the
78 * portal objects within it (RCR, etc) */
81 /* This wrapper represents a bit-array for the depletion state of the 64 Bman
91 c->__state[0] = c->__state[1] = 0; in bman_depletion_init()
95 c->__state[0] = c->__state[1] = (uint32_t)~0; in bman_depletion_fill()
99 return (int)(c->__state[__bmdep_word(bpid)] & __bmdep_bit(bpid)); in bman_depletion_get()
103 c->__state[__bmdep_word(bpid)] |= __bmdep_bit(bpid); in bman_depletion_set()
107 c->__state[__bmdep_word(bpid)] &= ~__bmdep_bit(bpid); in bman_depletion_unset()
110 /* ------------------------------ */
111 /* --- Portal enumeration API --- */
113 /* ------------------------------ */
114 /* --- Buffer pool allocation --- */
120 /* --------------- */
121 /* --- RCR API --- */
124 t_Error bm_rcr_init(struct bm_portal *portal,
127 void bm_rcr_finish(struct bm_portal *portal);
130 struct bm_rcr_entry *bm_rcr_start(struct bm_portal *portal);
131 void bm_rcr_abort(struct bm_portal *portal);
137 struct bm_rcr_entry *bm_rcr_pend_and_next(struct bm_portal *portal, uint8_t myverb);
140 void bm_rcr_pci_commit(struct bm_portal *portal, uint8_t myverb);
141 void bm_rcr_pce_prefetch(struct bm_portal *portal);
142 void bm_rcr_pce_commit(struct bm_portal *portal, uint8_t myverb);
143 void bm_rcr_pvb_commit(struct bm_portal *portal, uint8_t myverb);
145 /* Track h/w consumption. Returns non-zero if h/w had consumed previously
147 uint8_t bm_rcr_cci_update(struct bm_portal *portal);
148 void bm_rcr_cce_prefetch(struct bm_portal *portal);
149 uint8_t bm_rcr_cce_update(struct bm_portal *portal);
151 uint8_t bm_rcr_get_avail(struct bm_portal *portal);
153 uint8_t bm_rcr_get_fill(struct bm_portal *portal);
156 uint8_t bm_rcr_get_ithresh(struct bm_portal *portal);
157 void bm_rcr_set_ithresh(struct bm_portal *portal, uint8_t ithresh);
160 /* ------------------------------ */
161 /* --- Management command API --- */
164 t_Error bm_mc_init(struct bm_portal *portal);
165 void bm_mc_finish(struct bm_portal *portal);
168 struct bm_mc_command *bm_mc_start(struct bm_portal *portal);
169 void bm_mc_abort(struct bm_portal *portal);
171 /* Writes 'verb' with appropriate 'vbit'. Invalidates and pre-fetches the
173 void bm_mc_commit(struct bm_portal *portal, uint8_t myverb);
176 struct bm_mc_result *bm_mc_result(struct bm_portal *portal);
179 /* ------------------------------------- */
180 /* --- Portal interrupt register API --- */
182 /* For a quick explanation of the Bman interrupt model, see the comments in the
187 t_Error bm_isr_init(struct bm_portal *portal);
188 void bm_isr_finish(struct bm_portal *portal);
190 /* BSCN masking is a per-portal configuration */
191 void bm_isr_bscn_mask(struct bm_portal *portal, uint8_t bpid, int enable);
193 /* Used by all portal interrupt registers except 'inhibit' */
209 uint32_t __bm_isr_read(struct bm_portal *portal, enum bm_isr_reg n);
210 void __bm_isr_write(struct bm_portal *portal, enum bm_isr_reg n, uint32_t val);
212 /* ------------------------------------------------------- */
213 /* --- Bman data structures (and associated constants) --- */
214 /* Code-reduction, define a wrapper for 48-bit buffers. In cases where a buffer
239 volatile uint16_t hi; /* High 16-bits of 48-bit address */
240 volatile uint32_t lo; /* Low 32-bits of 48-bit address */
312 #define BM_MCR_QUERY_AVAILABILITY(r,p) bman_depletion_get(&r->query.as.state,p)
314 #define BM_MCR_QUERY_DEPLETION(r,p) bman_depletion_get(&r->query.ds.state,p)
317 /* Portal and Buffer Pools */
318 /* ----------------------- */
322 #define BMAN_PORTAL_FLAG_IRQ_FAST 0x00000002 /* ... for fast-path too! */
327 #define BMAN_PORTAL_FLAG_CACHE 0x00000400 /* use cache-able area for rings */