Lines Matching refs:p
28 #define QBMAN_IDX_FROM_DQRR(p) (((unsigned long)p & 0x1ff) >> 6) argument
67 struct qbman_swp *p = malloc(sizeof(struct qbman_swp)); in qbman_swp_init() local
70 if (!p) in qbman_swp_init()
72 p->desc = d; in qbman_swp_init()
74 p->mc.check = swp_mc_can_start; in qbman_swp_init()
76 p->mc.valid_bit = QB_VALID_BIT; in qbman_swp_init()
77 p->sdq = 0; in qbman_swp_init()
78 qb_attr_code_encode(&code_sdqcr_dct, &p->sdq, qbman_sdqcr_dct_prio_ics); in qbman_swp_init()
79 qb_attr_code_encode(&code_sdqcr_fc, &p->sdq, qbman_sdqcr_fc_up_to_3); in qbman_swp_init()
80 qb_attr_code_encode(&code_sdqcr_tok, &p->sdq, 0xbb); in qbman_swp_init()
81 atomic_set(&p->vdq.busy, 1); in qbman_swp_init()
82 p->vdq.valid_bit = QB_VALID_BIT; in qbman_swp_init()
83 p->dqrr.next_idx = 0; in qbman_swp_init()
92 p->dqrr.dqrr_size = QBMAN_VER_4_1_DQRR_SIZE; in qbman_swp_init()
94 p->dqrr.dqrr_size = QBMAN_VER_4_0_DQRR_SIZE; in qbman_swp_init()
96 p->dqrr.valid_bit = QB_VALID_BIT; in qbman_swp_init()
97 ret = qbman_swp_sys_init(&p->sys, d, p->dqrr.dqrr_size); in qbman_swp_init()
99 free(p); in qbman_swp_init()
103 qbman_cinh_write(&p->sys, QBMAN_CINH_SWP_SDQCR, p->sdq); in qbman_swp_init()
104 return p; in qbman_swp_init()
115 void *qbman_swp_mc_start(struct qbman_swp *p) in qbman_swp_mc_start() argument
120 BUG_ON(p->mc.check != swp_mc_can_start); in qbman_swp_mc_start()
122 ret = qbman_cena_write_start(&p->sys, QBMAN_CENA_SWP_CR); in qbman_swp_mc_start()
126 p->mc.check = swp_mc_can_submit; in qbman_swp_mc_start()
131 void qbman_swp_mc_submit(struct qbman_swp *p, void *cmd, uint32_t cmd_verb) in qbman_swp_mc_submit() argument
135 BUG_ON(p->mc.check != swp_mc_can_submit); in qbman_swp_mc_submit()
143 *v = cmd_verb | p->mc.valid_bit; in qbman_swp_mc_submit()
144 qbman_cena_write_complete(&p->sys, QBMAN_CENA_SWP_CR, cmd); in qbman_swp_mc_submit()
147 p->mc.check = swp_mc_can_poll; in qbman_swp_mc_submit()
151 void *qbman_swp_mc_result(struct qbman_swp *p) in qbman_swp_mc_result() argument
155 BUG_ON(p->mc.check != swp_mc_can_poll); in qbman_swp_mc_result()
157 ret = qbman_cena_read(&p->sys, QBMAN_CENA_SWP_RR(p->mc.valid_bit)); in qbman_swp_mc_result()
163 p->mc.check = swp_mc_can_start; in qbman_swp_mc_result()
165 p->mc.valid_bit ^= QB_VALID_BIT; in qbman_swp_mc_result()
237 uint32_t *p; in qbman_swp_enqueue() local
243 p = qbman_cena_write_start(&s->sys, in qbman_swp_enqueue()
245 word_copy(&p[1], &cl[1], 7); in qbman_swp_enqueue()
246 word_copy(&p[8], fd, sizeof(*fd) >> 2); in qbman_swp_enqueue()
249 p[0] = cl[0] | EQAR_VB(eqar); in qbman_swp_enqueue()
252 p); in qbman_swp_enqueue()
327 uint32_t *p; in qbman_swp_pull() local
336 p = qbman_cena_write_start(&s->sys, QBMAN_CENA_SWP_VDQCR); in qbman_swp_pull()
337 word_copy(&p[1], &cl[1], 3); in qbman_swp_pull()
340 p[0] = cl[0] | s->vdq.valid_bit; in qbman_swp_pull()
342 qbman_cena_write_complete(&s->sys, QBMAN_CENA_SWP_VDQCR, p); in qbman_swp_pull()
375 const uint32_t *p; in qbman_swp_dqrr_next() local
378 p = qb_cl(dq); in qbman_swp_dqrr_next()
379 verb = qb_attr_code_decode(&code_dqrr_verb, p); in qbman_swp_dqrr_next()
449 uint32_t *p = qb_cl((struct ldpaa_dq *)dq); in qbman_dq_entry_has_newtoken() local
452 token = qb_attr_code_decode(&code_dqrr_tok_detect, &p[1]); in qbman_dq_entry_has_newtoken()
459 make_le32_n(p, 16); in qbman_dq_entry_has_newtoken()
483 const uint32_t *p = qb_cl(dq); in __qbman_dq_entry_is_x() local
484 uint32_t response_verb = qb_attr_code_decode(&code_dqrr_response, p); in __qbman_dq_entry_is_x()
502 const uint32_t *p = qb_cl(dq); in ldpaa_dq_flags() local
504 return qb_attr_code_decode(&code_dqrr_stat, p); in ldpaa_dq_flags()
509 const uint32_t *p = qb_cl(dq); in ldpaa_dq_fd() local
511 return (const struct dpaa_fd *)&p[8]; in ldpaa_dq_fd()
546 uint32_t *p; in qbman_swp_release() local
554 p = qbman_cena_write_start(&s->sys, in qbman_swp_release()
557 u64_to_le32_copy(&p[2], buffers, num_buffers); in qbman_swp_release()
561 p[0] = cl[0] | RAR_VB(rar) | num_buffers; in qbman_swp_release()
564 p); in qbman_swp_release()
580 uint32_t *p; in qbman_swp_acquire() local
586 p = qbman_swp_mc_start(s); in qbman_swp_acquire()
588 if (!p) in qbman_swp_acquire()
592 qb_attr_code_encode(&code_acquire_bpid, p, bpid); in qbman_swp_acquire()
593 qb_attr_code_encode(&code_acquire_num, p, num_buffers); in qbman_swp_acquire()
596 p = qbman_swp_mc_complete(s, p, p[0] | QBMAN_MC_ACQUIRE); in qbman_swp_acquire()
599 verb = qb_attr_code_decode(&code_generic_verb, p); in qbman_swp_acquire()
600 rslt = qb_attr_code_decode(&code_generic_rslt, p); in qbman_swp_acquire()
601 num = qb_attr_code_decode(&code_acquire_r_num, p); in qbman_swp_acquire()
612 u64_from_le32_copy(buffers, &p[2], num); in qbman_swp_acquire()