diff options
-rw-r--r-- | drivers/staging/fsl_qbman/fsl_usdpaa.c | 2 | ||||
-rw-r--r-- | drivers/staging/fsl_qbman/qman_high.c | 7 | ||||
-rw-r--r-- | drivers/staging/fsl_qbman/qman_low.h | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/drivers/staging/fsl_qbman/fsl_usdpaa.c b/drivers/staging/fsl_qbman/fsl_usdpaa.c index 33b1923..b746d3c 100644 --- a/drivers/staging/fsl_qbman/fsl_usdpaa.c +++ b/drivers/staging/fsl_qbman/fsl_usdpaa.c @@ -349,7 +349,7 @@ static int init_qm_portal(struct qm_portal_config *config, /* Initialize the EQCR */ if (qm_eqcr_init(portal, qm_eqcr_pvb, - portal->eqcr.use_eqcr_ci_stashing ? 3 : 0, 1)) { + qm_eqcr_get_ci_stashing(portal), 1)) { pr_err("Qman EQCR initialisation failed\n"); return 1; } diff --git a/drivers/staging/fsl_qbman/qman_high.c b/drivers/staging/fsl_qbman/qman_high.c index 976556c..8c019e7 100644 --- a/drivers/staging/fsl_qbman/qman_high.c +++ b/drivers/staging/fsl_qbman/qman_high.c @@ -87,6 +87,7 @@ struct qman_portal { struct qm_portal p; unsigned long bits; /* PORTAL_BITS_*** - dynamic, strictly internal */ unsigned long irq_sources; + u32 use_eqcr_ci_stashing; u32 slowpoll; /* only used when interrupts are off */ struct qman_fq *vdqcr_owned; /* only 1 volatile dequeue at a time */ #ifdef CONFIG_FSL_DPA_CAN_WAIT_SYNC @@ -377,7 +378,7 @@ struct qman_portal *qman_create_portal( __p = &portal->p; - portal->p.eqcr.use_eqcr_ci_stashing = ((qman_ip_rev >= QMAN_REV30) ? + portal->use_eqcr_ci_stashing = ((qman_ip_rev >= QMAN_REV30) ? 1 : 0); /* prep the low-level portal struct with the mapped addresses from the @@ -390,7 +391,7 @@ struct qman_portal *qman_create_portal( * and stash with high-than-DQRR priority. */ if (qm_eqcr_init(__p, qm_eqcr_pvb, - portal->p.eqcr.use_eqcr_ci_stashing ? 3 : 0, 1)) { + portal->use_eqcr_ci_stashing ? 3 : 0, 1)) { pr_err("Qman EQCR initialisation failed\n"); goto fail_eqcr; } @@ -1985,7 +1986,7 @@ static inline struct qm_eqcr_entry *try_eq_start(struct qman_portal **p, (*p)->eqci_owned = fq; } #endif - if ((*p)->p.eqcr.use_eqcr_ci_stashing) { + if ((*p)->use_eqcr_ci_stashing) { /* * The stashing case is easy, only update if we need to in * order to try and liberate ring entries. diff --git a/drivers/staging/fsl_qbman/qman_low.h b/drivers/staging/fsl_qbman/qman_low.h index 64479f0..ea2dccc 100644 --- a/drivers/staging/fsl_qbman/qman_low.h +++ b/drivers/staging/fsl_qbman/qman_low.h @@ -166,7 +166,6 @@ enum qm_mr_cmode { /* matches QCSP_CFG::MM */ struct qm_eqcr { struct qm_eqcr_entry *ring, *cursor; u8 ci, available, ithresh, vbit; - u32 use_eqcr_ci_stashing; #ifdef CONFIG_FSL_DPA_CHECKING u32 busy; enum qm_eqcr_pmode pmode; @@ -287,6 +286,11 @@ static inline int qm_eqcr_init(struct qm_portal *portal, return 0; } +static inline unsigned int qm_eqcr_get_ci_stashing(struct qm_portal *portal) +{ + return ((qm_in(CFG) >> 28) & 0x7); +} + static inline void qm_eqcr_finish(struct qm_portal *portal) { register struct qm_eqcr *eqcr = &portal->eqcr; |