Lines Matching refs:portal
226 struct bman_portal *portal; member
235 struct bm_portal *portal = &p->p; in portal_isr() local
237 u32 is = bm_in(portal, BM_REG_ISR) & p->irq_sources; in portal_isr()
243 bm_out(portal, BM_REG_ISR, clear); in portal_isr()
281 static int bm_rcr_get_avail(struct bm_portal *portal) in bm_rcr_get_avail() argument
283 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_get_avail()
288 static int bm_rcr_get_fill(struct bm_portal *portal) in bm_rcr_get_fill() argument
290 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_get_fill()
295 static void bm_rcr_set_ithresh(struct bm_portal *portal, u8 ithresh) in bm_rcr_set_ithresh() argument
297 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_set_ithresh()
300 bm_out(portal, BM_REG_RCR_ITR, ithresh); in bm_rcr_set_ithresh()
303 static void bm_rcr_cce_prefetch(struct bm_portal *portal) in bm_rcr_cce_prefetch() argument
305 __maybe_unused struct bm_rcr *rcr = &portal->rcr; in bm_rcr_cce_prefetch()
308 bm_cl_touch_ro(portal, BM_CL_RCR_CI_CENA); in bm_rcr_cce_prefetch()
311 static u8 bm_rcr_cce_update(struct bm_portal *portal) in bm_rcr_cce_update() argument
313 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_cce_update()
317 rcr->ci = bm_ce_in(portal, BM_CL_RCR_CI_CENA) & (BM_RCR_SIZE - 1); in bm_rcr_cce_update()
318 bm_cl_invalidate(portal, BM_CL_RCR_CI_CENA); in bm_rcr_cce_update()
324 static inline struct bm_rcr_entry *bm_rcr_start(struct bm_portal *portal) in bm_rcr_start() argument
326 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_start()
338 static inline void bm_rcr_pvb_commit(struct bm_portal *portal, u8 myverb) in bm_rcr_pvb_commit() argument
340 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_pvb_commit()
357 static int bm_rcr_init(struct bm_portal *portal, enum bm_rcr_pmode pmode, in bm_rcr_init() argument
360 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_init()
364 rcr->ring = portal->addr.ce + BM_CL_RCR; in bm_rcr_init()
365 rcr->ci = bm_in(portal, BM_REG_RCR_CI_CINH) & (BM_RCR_SIZE - 1); in bm_rcr_init()
366 pi = bm_in(portal, BM_REG_RCR_PI_CINH) & (BM_RCR_SIZE - 1); in bm_rcr_init()
368 rcr->vbit = (bm_in(portal, BM_REG_RCR_PI_CINH) & BM_RCR_SIZE) ? in bm_rcr_init()
372 rcr->ithresh = bm_in(portal, BM_REG_RCR_ITR); in bm_rcr_init()
378 cfg = (bm_in(portal, BM_REG_CFG) & 0xffffffe0) in bm_rcr_init()
380 bm_out(portal, BM_REG_CFG, cfg); in bm_rcr_init()
384 static void bm_rcr_finish(struct bm_portal *portal) in bm_rcr_finish() argument
387 struct bm_rcr *rcr = &portal->rcr; in bm_rcr_finish()
392 i = bm_in(portal, BM_REG_RCR_PI_CINH) & (BM_RCR_SIZE - 1); in bm_rcr_finish()
396 i = bm_in(portal, BM_REG_RCR_CI_CINH) & (BM_RCR_SIZE - 1); in bm_rcr_finish()
405 static int bm_mc_init(struct bm_portal *portal) in bm_mc_init() argument
407 struct bm_mc *mc = &portal->mc; in bm_mc_init()
409 mc->cr = portal->addr.ce + BM_CL_CR; in bm_mc_init()
410 mc->rr = portal->addr.ce + BM_CL_RR0; in bm_mc_init()
420 static void bm_mc_finish(struct bm_portal *portal) in bm_mc_finish() argument
423 struct bm_mc *mc = &portal->mc; in bm_mc_finish()
431 static inline struct bm_mc_command *bm_mc_start(struct bm_portal *portal) in bm_mc_start() argument
433 struct bm_mc *mc = &portal->mc; in bm_mc_start()
443 static inline void bm_mc_commit(struct bm_portal *portal, u8 myverb) in bm_mc_commit() argument
445 struct bm_mc *mc = &portal->mc; in bm_mc_commit()
458 static inline union bm_mc_result *bm_mc_result(struct bm_portal *portal) in bm_mc_result() argument
460 struct bm_mc *mc = &portal->mc; in bm_mc_result()
481 static inline int bm_mc_result_timeout(struct bm_portal *portal, in bm_mc_result_timeout() argument
487 *mcr = bm_mc_result(portal); in bm_mc_result_timeout()
497 static void bm_isr_bscn_disable(struct bm_portal *portal) in bm_isr_bscn_disable() argument
499 bm_out(portal, BM_REG_SCN(0), 0); in bm_isr_bscn_disable()
500 bm_out(portal, BM_REG_SCN(1), 0); in bm_isr_bscn_disable()
503 static int bman_create_portal(struct bman_portal *portal, in bman_create_portal() argument
509 p = &portal->p; in bman_create_portal()
533 portal->irq_sources = 0; in bman_create_portal()
536 snprintf(portal->irqname, MAX_IRQNAME, IRQNAME, c->cpu); in bman_create_portal()
537 if (request_irq(c->irq, portal_isr, 0, portal->irqname, portal)) { in bman_create_portal()
554 portal->config = c; in bman_create_portal()
563 free_irq(c->irq, portal); in bman_create_portal()
574 struct bman_portal *portal; in bman_create_affine_portal() local
577 portal = &per_cpu(bman_affine_portal, c->cpu); in bman_create_affine_portal()
578 err = bman_create_portal(portal, c); in bman_create_affine_portal()
586 return portal; in bman_create_affine_portal()
794 bman_get_bm_portal_config(const struct bman_portal *portal) in bman_get_bm_portal_config() argument
796 return portal->config; in bman_get_bm_portal_config()