Lines Matching defs:portal

113 #define qm_in(reg)        __qm_in(&portal->addr, REG_##reg)
114 #define qm_out(reg, val) __qm_out(&portal->addr, REG_##reg, (uint32_t)val)
143 #define qm_cl_touch_ro(reg) __qm_cl_touch_ro(&portal->addr, CL_##reg##_CENA)
144 #define qm_cl_touch_rw(reg) __qm_cl_touch_rw(&portal->addr, CL_##reg##_CENA)
145 #define qm_cl_in(reg) __qm_cl_in(&portal->addr, CL_##reg##_CENA)
146 #define qm_cl_out(reg, val) __qm_cl_out(&portal->addr, CL_##reg##_CENA, val)
147 #define qm_cl_invalidate(reg) __qm_cl_invalidate(&portal->addr, CL_##reg##_CENA)
160 static __inline__ t_Error __qm_portal_bind(struct qm_portal *portal, uint8_t iface)
163 if (!(portal->config.bound & iface)) {
164 portal->config.bound |= iface;
170 static __inline__ void __qm_portal_unbind(struct qm_portal *portal, uint8_t iface)
173 ASSERT_COND(portal->config.bound & iface);
175 portal->config.bound &= ~iface;
181 /* It's safer to code in terms of the 'eqcr' object than the 'portal' object,
183 * we could manipulate some other structure within 'portal'. */
184 /* #define EQCR_API_START() register struct qm_eqcr *eqcr = &portal->eqcr */
208 static __inline__ t_Error qm_eqcr_init(struct qm_portal *portal, e_QmPortalProduceMode pmode,
211 register struct qm_eqcr *eqcr = &portal->eqcr;
215 if (__qm_portal_bind(portal, QM_BIND_EQCR))
217 eqcr->ring = ptr_ADD(portal->addr.addr_ce, CL_EQCR);
241 static __inline__ void qm_eqcr_finish(struct qm_portal *portal)
243 register struct qm_eqcr *eqcr = &portal->eqcr;
256 __qm_portal_unbind(portal, QM_BIND_EQCR);
259 static __inline__ struct qm_eqcr_entry *qm_eqcr_start(struct qm_portal *portal)
261 register struct qm_eqcr *eqcr = &portal->eqcr;
274 static __inline__ void qm_eqcr_abort(struct qm_portal *portal)
277 register struct qm_eqcr *eqcr = &portal->eqcr;
281 UNUSED(portal);
285 static __inline__ struct qm_eqcr_entry *qm_eqcr_pend_and_next(struct qm_portal *portal, uint8_t myverb)
287 register struct qm_eqcr *eqcr = &portal->eqcr;
315 static __inline__ void qmPortalEqcrPciCommit(struct qm_portal *portal, uint8_t myverb)
317 register struct qm_eqcr *eqcr = &portal->eqcr;
333 static __inline__ void qmPortalEqcrPcePrefetch(struct qm_portal *portal)
336 register struct qm_eqcr *eqcr = &portal->eqcr;
343 static __inline__ void qmPortalEqcrPceCommit(struct qm_portal *portal, uint8_t myverb)
345 register struct qm_eqcr *eqcr = &portal->eqcr;
361 static __inline__ void qmPortalEqcrPvbCommit(struct qm_portal *portal, uint8_t myverb)
363 register struct qm_eqcr *eqcr = &portal->eqcr;
380 static __inline__ uint8_t qmPortalEqcrCciUpdate(struct qm_portal *portal)
382 register struct qm_eqcr *eqcr = &portal->eqcr;
393 static __inline__ void qmPortalEqcrCcePrefetch(struct qm_portal *portal)
396 register struct qm_eqcr *eqcr = &portal->eqcr;
402 static __inline__ uint8_t qmPortalEqcrCceUpdate(struct qm_portal *portal)
404 register struct qm_eqcr *eqcr = &portal->eqcr;
416 static __inline__ uint8_t qm_eqcr_get_ithresh(struct qm_portal *portal)
418 register struct qm_eqcr *eqcr = &portal->eqcr;
422 static __inline__ void qm_eqcr_set_ithresh(struct qm_portal *portal, uint8_t ithresh)
424 register struct qm_eqcr *eqcr = &portal->eqcr;
429 static __inline__ uint8_t qm_eqcr_get_avail(struct qm_portal *portal)
431 register struct qm_eqcr *eqcr = &portal->eqcr;
435 static __inline__ uint8_t qm_eqcr_get_fill(struct qm_portal *portal)
437 register struct qm_eqcr *eqcr = &portal->eqcr;
452 /* It's safer to code in terms of the 'dqrr' object than the 'portal' object,
454 * we could manipulate some other structure within 'portal'. */
455 /* #define DQRR_API_START() register struct qm_dqrr *dqrr = &portal->dqrr */
470 static __inline__ void qm_dqrr_set_maxfill(struct qm_portal *portal, uint8_t mf)
476 static __inline__ t_Error qm_dqrr_init(struct qm_portal *portal, e_QmPortalDequeueMode dmode,
480 register struct qm_dqrr *dqrr = &portal->dqrr;
481 const struct qm_portal_config *config = &portal->config;
484 if (__qm_portal_bind(portal, QM_BIND_DQRR))
492 dqrr->ring = ptr_ADD(portal->addr.addr_ce, CL_DQRR);
527 static __inline__ void qm_dqrr_finish(struct qm_portal *portal)
529 register struct qm_dqrr *dqrr = &portal->dqrr;
532 __qm_portal_unbind(portal, QM_BIND_DQRR);
535 static __inline__ struct qm_dqrr_entry *qm_dqrr_current(struct qm_portal *portal)
537 register struct qm_dqrr *dqrr = &portal->dqrr;
543 static __inline__ uint8_t qm_dqrr_cursor(struct qm_portal *portal)
545 register struct qm_dqrr *dqrr = &portal->dqrr;
549 static __inline__ uint8_t qm_dqrr_next(struct qm_portal *portal)
551 register struct qm_dqrr *dqrr = &portal->dqrr;
559 static __inline__ uint8_t qmPortalDqrrPciUpdate(struct qm_portal *portal)
561 register struct qm_dqrr *dqrr = &portal->dqrr;
572 static __inline__ void qmPortalDqrrPcePrefetch(struct qm_portal *portal)
575 register struct qm_dqrr *dqrr = &portal->dqrr;
582 static __inline__ uint8_t qmPortalDqrrPceUpdate(struct qm_portal *portal)
584 register struct qm_dqrr *dqrr = &portal->dqrr;
595 static __inline__ void qmPortalDqrrPvbPrefetch(struct qm_portal *portal)
597 register struct qm_dqrr *dqrr = &portal->dqrr;
606 static __inline__ uint8_t qmPortalDqrrPvbUpdate(struct qm_portal *portal)
608 register struct qm_dqrr *dqrr = &portal->dqrr;
623 static __inline__ void qmPortalDqrrCciConsume(struct qm_portal *portal, uint8_t num)
625 register struct qm_dqrr *dqrr = &portal->dqrr;
633 static __inline__ void qmPortalDqrrCciConsumeToCurrent(struct qm_portal *portal)
635 register struct qm_dqrr *dqrr = &portal->dqrr;
643 static __inline__ void qmPortalDqrrCcePrefetch(struct qm_portal *portal)
646 register struct qm_dqrr *dqrr = &portal->dqrr;
653 static __inline__ void qmPortalDqrrCceConsume(struct qm_portal *portal, uint8_t num)
655 register struct qm_dqrr *dqrr = &portal->dqrr;
663 static __inline__ void qmPortalDqrrCceConsume_to_current(struct qm_portal *portal)
665 register struct qm_dqrr *dqrr = &portal->dqrr;
673 static __inline__ void qmPortalDqrrDcaConsume1(struct qm_portal *portal, uint8_t idx, bool park)
676 register struct qm_dqrr *dqrr = &portal->dqrr;
685 static __inline__ void qmPortalDqrrDcaConsume1ptr(struct qm_portal *portal,
691 register struct qm_dqrr *dqrr = &portal->dqrr;
702 static __inline__ void qmPortalDqrrDcaConsumeN(struct qm_portal *portal, uint16_t bitmask)
705 register struct qm_dqrr *dqrr = &portal->dqrr;
712 static __inline__ uint8_t qmPortalDqrrDcaCci(struct qm_portal *portal)
715 register struct qm_dqrr *dqrr = &portal->dqrr;
721 static __inline__ void qmPortalDqrrDcaCcePrefetch(struct qm_portal *portal)
724 register struct qm_dqrr *dqrr = &portal->dqrr;
731 static __inline__ uint8_t qmPortalDqrrDcaCce(struct qm_portal *portal)
734 register struct qm_dqrr *dqrr = &portal->dqrr;
740 static __inline__ uint8_t qm_dqrr_get_ci(struct qm_portal *portal)
742 register struct qm_dqrr *dqrr = &portal->dqrr;
750 static __inline__ void qm_dqrr_park(struct qm_portal *portal, uint8_t idx)
753 register struct qm_dqrr *dqrr = &portal->dqrr;
762 static __inline__ void qm_dqrr_park_ci(struct qm_portal *portal)
764 register struct qm_dqrr *dqrr = &portal->dqrr;
773 static __inline__ void qm_dqrr_sdqcr_set(struct qm_portal *portal, uint32_t sdqcr)
778 static __inline__ uint32_t qm_dqrr_sdqcr_get(struct qm_portal *portal)
783 static __inline__ void qm_dqrr_vdqcr_set(struct qm_portal *portal, uint32_t vdqcr)
788 static __inline__ uint32_t qm_dqrr_vdqcr_get(struct qm_portal *portal)
793 static __inline__ void qm_dqrr_pdqcr_set(struct qm_portal *portal, uint32_t pdqcr)
798 static __inline__ uint32_t qm_dqrr_pdqcr_get(struct qm_portal *portal)
803 static __inline__ uint8_t qm_dqrr_get_ithresh(struct qm_portal *portal)
805 register struct qm_dqrr *dqrr = &portal->dqrr;
809 static __inline__ void qm_dqrr_set_ithresh(struct qm_portal *portal, uint8_t ithresh)
814 static __inline__ uint8_t qm_dqrr_get_maxfill(struct qm_portal *portal)
822 /* It's safer to code in terms of the 'mr' object than the 'portal' object,
824 * we could manipulate some other structure within 'portal'. */
825 /* #define MR_API_START() register struct qm_mr *mr = &portal->mr */
840 static __inline__ t_Error qm_mr_init(struct qm_portal *portal, e_QmPortalProduceMode pmode,
843 register struct qm_mr *mr = &portal->mr;
846 if (__qm_portal_bind(portal, QM_BIND_MR))
848 mr->ring = ptr_ADD(portal->addr.addr_ce, CL_MR);
869 static __inline__ void qm_mr_finish(struct qm_portal *portal)
871 register struct qm_mr *mr = &portal->mr;
874 __qm_portal_unbind(portal, QM_BIND_MR);
877 static __inline__ void qm_mr_current_prefetch(struct qm_portal *portal)
879 register struct qm_mr *mr = &portal->mr;
883 static __inline__ struct qm_mr_entry *qm_mr_current(struct qm_portal *portal)
885 register struct qm_mr *mr = &portal->mr;
891 static __inline__ uint8_t qm_mr_cursor(struct qm_portal *portal)
893 register struct qm_mr *mr = &portal->mr;
897 static __inline__ uint8_t qm_mr_next(struct qm_portal *portal)
899 register struct qm_mr *mr = &portal->mr;
907 static __inline__ uint8_t qmPortalMrPciUpdate(struct qm_portal *portal)
909 register struct qm_mr *mr = &portal->mr;
920 static __inline__ void qmPortalMrPcePrefetch(struct qm_portal *portal)
923 register struct qm_mr *mr = &portal->mr;
930 static __inline__ uint8_t qmPortalMrPceUpdate(struct qm_portal *portal)
932 register struct qm_mr *mr = &portal->mr;
943 static __inline__ void qmPortalMrPvbUpdate(struct qm_portal *portal)
945 register struct qm_mr *mr = &portal->mr;
959 static __inline__ void qmPortalMrCciConsume(struct qm_portal *portal, uint8_t num)
961 register struct qm_mr *mr = &portal->mr;
969 static __inline__ void qmPortalMrCciConsumeToCurrent(struct qm_portal *portal)
971 register struct qm_mr *mr = &portal->mr;
979 static __inline__ void qmPortalMrCcePrefetch(struct qm_portal *portal)
982 register struct qm_mr *mr = &portal->mr;
989 static __inline__ void qmPortalMrCceConsume(struct qm_portal *portal, uint8_t num)
991 register struct qm_mr *mr = &portal->mr;
999 static __inline__ void qmPortalMrCceConsumeToCurrent(struct qm_portal *portal)
1001 register struct qm_mr *mr = &portal->mr;
1009 static __inline__ uint8_t qm_mr_get_ci(struct qm_portal *portal)
1011 register struct qm_mr *mr = &portal->mr;
1015 static __inline__ uint8_t qm_mr_get_ithresh(struct qm_portal *portal)
1017 register struct qm_mr *mr = &portal->mr;
1021 static __inline__ void qm_mr_set_ithresh(struct qm_portal *portal, uint8_t ithresh)
1029 /* It's safer to code in terms of the 'mc' object than the 'portal' object,
1031 * we could manipulate some other structure within 'portal'. */
1032 /* #define MC_API_START() register struct qm_mc *mc = &portal->mc */
1034 static __inline__ t_Error qm_mc_init(struct qm_portal *portal)
1036 register struct qm_mc *mc = &portal->mc;
1037 if (__qm_portal_bind(portal, QM_BIND_MC))
1039 mc->cr = ptr_ADD(portal->addr.addr_ce, CL_CR);
1040 mc->rr = ptr_ADD(portal->addr.addr_ce, CL_RR0);
1050 static __inline__ void qm_mc_finish(struct qm_portal *portal)
1053 register struct qm_mc *mc = &portal->mc;
1058 __qm_portal_unbind(portal, QM_BIND_MC);
1061 static __inline__ struct qm_mc_command *qm_mc_start(struct qm_portal *portal)
1063 register struct qm_mc *mc = &portal->mc;
1072 static __inline__ void qm_mc_abort(struct qm_portal *portal)
1075 register struct qm_mc *mc = &portal->mc;
1079 UNUSED(portal);
1083 static __inline__ void qm_mc_commit(struct qm_portal *portal, uint8_t myverb)
1085 register struct qm_mc *mc = &portal->mc;
1098 static __inline__ struct qm_mc_result *qm_mc_result(struct qm_portal *portal)
1100 register struct qm_mc *mc = &portal->mc;
1123 static __inline__ t_Error qm_isr_init(struct qm_portal *portal)
1125 if (__qm_portal_bind(portal, QM_BIND_ISR))
1130 static __inline__ void qm_isr_finish(struct qm_portal *portal)
1132 __qm_portal_unbind(portal, QM_BIND_ISR);
1135 static __inline__ void qm_isr_set_iperiod(struct qm_portal *portal, uint16_t iperiod)
1140 static __inline__ uint32_t __qm_isr_read(struct qm_portal *portal, enum qm_isr_reg n)
1142 return __qm_in(&portal->addr, REG_ISR + (n << 2));
1145 static __inline__ void __qm_isr_write(struct qm_portal *portal, enum qm_isr_reg n, uint32_t val)
1147 __qm_out(&portal->addr, REG_ISR + (n << 2), val);