summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorClaudiu Manoil <claudiu.manoil@nxp.com>2016-11-16 14:40:25 (GMT)
committerXie Xiaobo <xiaobo.xie@nxp.com>2017-12-12 07:32:36 (GMT)
commit8f8751c6b12aae2d860aab47893ecd27ab83dd3b (patch)
tree5d30f89bdc05278a6c4b14a33f382de619874514 /include
parenta9f7eb61a538375adbdcea7ae4cfb74d497d1c9e (diff)
downloadlinux-8f8751c6b12aae2d860aab47893ecd27ab83dd3b.tar.xz
soc/qman: Fix accesses to fqid, cleanup
Preventively mask every access to the 'fqid' h/w field, since it is defined as a 24-bit field, for every h/w descriptor. Add generic accessors for this field to ensure correct access. Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net>
Diffstat (limited to 'include')
-rw-r--r--include/soc/fsl/qman.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/soc/fsl/qman.h b/include/soc/fsl/qman.h
index 37f3eb0..cde9e9f 100644
--- a/include/soc/fsl/qman.h
+++ b/include/soc/fsl/qman.h
@@ -262,6 +262,11 @@ struct qm_dqrr_entry {
#define QM_DQRR_STAT_UNSCHEDULED 0x02 /* Unscheduled dequeue */
#define QM_DQRR_STAT_DQCR_EXPIRED 0x01 /* VDQCR or PDQCR expired*/
+/* 'fqid' is a 24-bit field in every h/w descriptor */
+#define QM_FQID_MASK GENMASK(23, 0)
+#define qm_fqid_set(p, v) ((p)->fqid = ((v) & QM_FQID_MASK))
+#define qm_fqid_get(p) ((p)->fqid & QM_FQID_MASK)
+
/* "ERN Message Response" */
/* "FQ State Change Notification" */
union qm_mr_entry {