提交 55d01102 编写于 作者: H Horia Geantă 提交者: Herbert Xu

soc: fsl: dpio: add congestion notification support

Add support for Congestion State Change Notifications (CSCN), which
allow DPIO users to be notified when a congestion group changes its
state (due to hitting the entrance / exit threshold).
Acked-by: NLi Yang <leoyang.li@nxp.com>
Signed-off-by: NHoria Geantă <horia.geanta@nxp.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 009447a0
...@@ -174,4 +174,19 @@ static inline const struct dpaa2_fd *dpaa2_dq_fd(const struct dpaa2_dq *dq) ...@@ -174,4 +174,19 @@ static inline const struct dpaa2_fd *dpaa2_dq_fd(const struct dpaa2_dq *dq)
return (const struct dpaa2_fd *)&dq->dq.fd[0]; return (const struct dpaa2_fd *)&dq->dq.fd[0];
} }
#define DPAA2_CSCN_SIZE sizeof(struct dpaa2_dq)
#define DPAA2_CSCN_ALIGN 16
#define DPAA2_CSCN_STATE_CG BIT(0)
/**
* dpaa2_cscn_state_congested() - Check congestion state
* @cscn: congestion SCN (delivered to WQ or memory)
*
i * Return true is congested.
*/
static inline bool dpaa2_cscn_state_congested(struct dpaa2_dq *cscn)
{
return !!(cscn->scn.state & DPAA2_CSCN_STATE_CG);
}
#endif /* __FSL_DPAA2_GLOBAL_H */ #endif /* __FSL_DPAA2_GLOBAL_H */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册