X-Git-Url: http://git.droids-corp.org/?p=dpdk.git;a=blobdiff_plain;f=drivers%2Fbus%2Ffslmc%2Fqbman%2Finclude%2Ffsl_qbman_portal.h;h=f820077d2bfed1de940071e39325bb4075eb7f9d;hp=88f0a99686d8e1a5dbfd32852b3d183480684d66;hb=c9da6cfa1cd7713d8fc11c0f93bd48f03152a977;hpb=6ae4ce8942f6353db614242e2f150de390f4232e diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h index 88f0a99686..f820077d2b 100644 --- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h +++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h @@ -7,6 +7,7 @@ #ifndef _FSL_QBMAN_PORTAL_H #define _FSL_QBMAN_PORTAL_H +#include #include #define SVR_LS1080A 0x87030000 @@ -117,6 +118,7 @@ uint32_t qbman_swp_interrupt_read_status(struct qbman_swp *p); * @p: the given software portal object. * @mask: The value to set in SWP_ISR register. */ +__rte_internal void qbman_swp_interrupt_clear_status(struct qbman_swp *p, uint32_t mask); /** @@ -286,6 +288,7 @@ void qbman_swp_push_get(struct qbman_swp *s, uint8_t channel_idx, int *enabled); * rather by specifying the index (from 0 to 15) that has been mapped to the * desired channel. */ +__rte_internal void qbman_swp_push_set(struct qbman_swp *s, uint8_t channel_idx, int enable); /* ------------------- */ @@ -325,6 +328,7 @@ enum qbman_pull_type_e { * default/starting state. * @d: the pull dequeue descriptor to be cleared. */ +__rte_internal void qbman_pull_desc_clear(struct qbman_pull_desc *d); /** @@ -340,6 +344,7 @@ void qbman_pull_desc_clear(struct qbman_pull_desc *d); * the caller provides in 'storage_phys'), and 'stash' controls whether or not * those writes to main-memory express a cache-warming attribute. */ +__rte_internal void qbman_pull_desc_set_storage(struct qbman_pull_desc *d, struct qbman_result *storage, uint64_t storage_phys, @@ -349,6 +354,7 @@ void qbman_pull_desc_set_storage(struct qbman_pull_desc *d, * @d: the pull dequeue descriptor to be set. * @numframes: number of frames to be set, must be between 1 and 16, inclusive. */ +__rte_internal void qbman_pull_desc_set_numframes(struct qbman_pull_desc *d, uint8_t numframes); /** @@ -372,6 +378,7 @@ void qbman_pull_desc_set_token(struct qbman_pull_desc *d, uint8_t token); * qbman_pull_desc_set_fq() - Set fqid from which the dequeue command dequeues. * @fqid: the frame queue index of the given FQ. */ +__rte_internal void qbman_pull_desc_set_fq(struct qbman_pull_desc *d, uint32_t fqid); /** @@ -407,6 +414,7 @@ void qbman_pull_desc_set_rad(struct qbman_pull_desc *d, int rad); * Return 0 for success, and -EBUSY if the software portal is not ready * to do pull dequeue. */ +__rte_internal int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d); /* -------------------------------- */ @@ -421,12 +429,14 @@ int qbman_swp_pull(struct qbman_swp *s, struct qbman_pull_desc *d); * only once, so repeated calls can return a sequence of DQRR entries, without * requiring they be consumed immediately or in any particular order. */ +__rte_internal const struct qbman_result *qbman_swp_dqrr_next(struct qbman_swp *p); /** * qbman_swp_prefetch_dqrr_next() - prefetch the next DQRR entry. * @s: the software portal object. */ +__rte_internal void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s); /** @@ -435,6 +445,7 @@ void qbman_swp_prefetch_dqrr_next(struct qbman_swp *s); * @s: the software portal object. * @dq: the DQRR entry to be consumed. */ +__rte_internal void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq); /** @@ -442,6 +453,7 @@ void qbman_swp_dqrr_consume(struct qbman_swp *s, const struct qbman_result *dq); * @s: the software portal object. * @dqrr_index: the DQRR index entry to be consumed. */ +__rte_internal void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index); /** @@ -450,6 +462,7 @@ void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index); * * Return dqrr index. */ +__rte_internal uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr); /** @@ -460,6 +473,7 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr); * * Return dqrr entry object. */ +__rte_internal struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx); /* ------------------------------------------------- */ @@ -485,6 +499,7 @@ struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx); * Return 1 for getting a valid dequeue result, or 0 for not getting a valid * dequeue result. */ +__rte_internal int qbman_result_has_new_result(struct qbman_swp *s, struct qbman_result *dq); @@ -497,8 +512,10 @@ int qbman_result_has_new_result(struct qbman_swp *s, * Return 1 for getting a valid dequeue result, or 0 for not getting a valid * dequeue result. */ +__rte_internal int qbman_check_command_complete(struct qbman_result *dq); +__rte_internal int qbman_check_new_result(struct qbman_result *dq); /* -------------------------------------------------------- */ @@ -624,6 +641,7 @@ int qbman_result_is_FQPN(const struct qbman_result *dq); * * Return the state field. */ +__rte_internal uint8_t qbman_result_DQ_flags(const struct qbman_result *dq); /** @@ -658,6 +676,7 @@ static inline int qbman_result_DQ_is_pull_complete( * * Return seqnum. */ +__rte_internal uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq); /** @@ -667,6 +686,7 @@ uint16_t qbman_result_DQ_seqnum(const struct qbman_result *dq); * * Return odpid. */ +__rte_internal uint16_t qbman_result_DQ_odpid(const struct qbman_result *dq); /** @@ -699,6 +719,7 @@ uint32_t qbman_result_DQ_frame_count(const struct qbman_result *dq); * * Return the frame queue context. */ +__rte_internal uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq); /** @@ -707,6 +728,7 @@ uint64_t qbman_result_DQ_fqd_ctx(const struct qbman_result *dq); * * Return the frame descriptor. */ +__rte_internal const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq); /* State-change notifications (FQDAN/CDAN/CSCN/...). */ @@ -717,6 +739,7 @@ const struct qbman_fd *qbman_result_DQ_fd(const struct qbman_result *dq); * * Return the state in the notifiation. */ +__rte_internal uint8_t qbman_result_SCN_state(const struct qbman_result *scn); /** @@ -850,6 +873,7 @@ struct qbman_eq_response { * default/starting state. * @d: the given enqueue descriptor. */ +__rte_internal void qbman_eq_desc_clear(struct qbman_eq_desc *d); /* Exactly one of the following descriptor "actions" should be set. (Calling @@ -870,6 +894,7 @@ void qbman_eq_desc_clear(struct qbman_eq_desc *d); * @response_success: 1 = enqueue with response always; 0 = enqueue with * rejections returned on a FQ. */ +__rte_internal void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success); /** * qbman_eq_desc_set_orp() - Set order-resotration in the enqueue descriptor @@ -881,6 +906,7 @@ void qbman_eq_desc_set_no_orp(struct qbman_eq_desc *d, int respond_success); * @incomplete: indiates whether this is the last fragments using the same * sequeue number. */ +__rte_internal void qbman_eq_desc_set_orp(struct qbman_eq_desc *d, int respond_success, uint16_t opr_id, uint16_t seqnum, int incomplete); @@ -915,6 +941,7 @@ void qbman_eq_desc_set_orp_nesn(struct qbman_eq_desc *d, uint16_t opr_id, * data structure.) 'stash' controls whether or not the write to main-memory * expresses a cache-warming attribute. */ +__rte_internal void qbman_eq_desc_set_response(struct qbman_eq_desc *d, uint64_t storage_phys, int stash); @@ -929,6 +956,7 @@ void qbman_eq_desc_set_response(struct qbman_eq_desc *d, * result "storage" before issuing an enqueue, and use any non-zero 'token' * value. */ +__rte_internal void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token); /** @@ -944,6 +972,7 @@ void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token); * @d: the enqueue descriptor * @fqid: the id of the frame queue to be enqueued. */ +__rte_internal void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid); /** @@ -953,6 +982,7 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid); * @qd_bin: the queuing destination bin * @qd_prio: the queuing destination priority. */ +__rte_internal void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid, uint16_t qd_bin, uint8_t qd_prio); @@ -978,6 +1008,7 @@ void qbman_eq_desc_set_eqdi(struct qbman_eq_desc *d, int enable); * held-active (order-preserving) FQ, whether the FQ should be parked instead of * being rescheduled.) */ +__rte_internal void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable, uint8_t dqrr_idx, int park); @@ -987,6 +1018,7 @@ void qbman_eq_desc_set_dca(struct qbman_eq_desc *d, int enable, * * Return the fd pointer. */ +__rte_internal struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp); /** @@ -997,6 +1029,7 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp); * This value is set into the response id before the enqueue command, which, * get overwritten by qbman once the enqueue command is complete. */ +__rte_internal void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val); /** @@ -1009,6 +1042,7 @@ void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val); * copied into the enqueue response to determine if the command has been * completed, and response has been updated. */ +__rte_internal uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp); /** @@ -1017,6 +1051,7 @@ uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp); * * Return 0 when command is sucessful. */ +__rte_internal uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp); /** @@ -1043,6 +1078,7 @@ int qbman_swp_enqueue(struct qbman_swp *s, const struct qbman_eq_desc *d, * * Return the number of enqueued frames, -EBUSY if the EQCR is not ready. */ +__rte_internal int qbman_swp_enqueue_multiple(struct qbman_swp *s, const struct qbman_eq_desc *d, const struct qbman_fd *fd, @@ -1060,6 +1096,7 @@ int qbman_swp_enqueue_multiple(struct qbman_swp *s, * * Return the number of enqueued frames, -EBUSY if the EQCR is not ready. */ +__rte_internal int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s, const struct qbman_eq_desc *d, struct qbman_fd **fd, @@ -1076,6 +1113,7 @@ int qbman_swp_enqueue_multiple_fd(struct qbman_swp *s, * * Return the number of enqueued frames, -EBUSY if the EQCR is not ready. */ +__rte_internal int qbman_swp_enqueue_multiple_desc(struct qbman_swp *s, const struct qbman_eq_desc *d, const struct qbman_fd *fd, @@ -1117,12 +1155,14 @@ struct qbman_release_desc { * default/starting state. * @d: the qbman release descriptor. */ +__rte_internal void qbman_release_desc_clear(struct qbman_release_desc *d); /** * qbman_release_desc_set_bpid() - Set the ID of the buffer pool to release to * @d: the qbman release descriptor. */ +__rte_internal void qbman_release_desc_set_bpid(struct qbman_release_desc *d, uint16_t bpid); /** @@ -1141,6 +1181,7 @@ void qbman_release_desc_set_rcdi(struct qbman_release_desc *d, int enable); * * Return 0 for success, -EBUSY if the release command ring is not ready. */ +__rte_internal int qbman_swp_release(struct qbman_swp *s, const struct qbman_release_desc *d, const uint64_t *buffers, unsigned int num_buffers); @@ -1166,6 +1207,7 @@ int qbman_swp_release_thresh(struct qbman_swp *s, unsigned int thresh); * Return 0 for success, or negative error code if the acquire command * fails. */ +__rte_internal int qbman_swp_acquire(struct qbman_swp *s, uint16_t bpid, uint64_t *buffers, unsigned int num_buffers);