aboutsummaryrefslogtreecommitdiff
path: root/include/soc/fsl/qman.h
diff options
context:
space:
mode:
authorClaudiu Manoil2016-11-16 16:40:25 +0200
committerScott Wood2016-11-23 01:23:46 -0600
commitd6753c7e65e70e90ea991797059f4204b66cf523 (patch)
tree80d976203d6f393684e06d14f908c833380c4ee0 /include/soc/fsl/qman.h
parent7ff07da015c290cd2b0627c53267fbc1336cf055 (diff)
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/soc/fsl/qman.h')
-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 1405810e4050..f3fa53fef421 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 {