test/crypto: skip unsupported session
[dpdk.git] / drivers / bus / fslmc / qbman / qbman_sys.h
index 71f7a67..55449ed 100644 (file)
@@ -1,7 +1,7 @@
 /* SPDX-License-Identifier: BSD-3-Clause
  *
  * Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
- *
+ * Copyright 2019 NXP
  */
 /* qbman_sys_decl.h and qbman_sys.h are the two platform-specific files in the
  * driver. They are only included via qbman_private.h, which is itself a
@@ -381,6 +381,14 @@ static inline uint32_t qbman_set_swp_cfg(uint8_t max_fill, uint8_t wn,
 #define QMAN_REV_5000  0x05000000
 #define QMAN_REV_MASK  0xffff0000
 
+#define SVR_LS1080A    0x87030000
+#define SVR_LS2080A    0x87010000
+#define SVR_LS2088A    0x87090000
+#define SVR_LX2160A    0x87360000
+
+/* Variable to store DPAA2 platform type */
+extern uint32_t dpaa2_svr_family;
+
 static inline int qbman_swp_sys_init(struct qbman_swp_sys *s,
                                     const struct qbman_swp_desc *d,
                                     uint8_t dqrr_size)
@@ -388,16 +396,17 @@ static inline int qbman_swp_sys_init(struct qbman_swp_sys *s,
        uint32_t reg;
        int i;
        int cena_region_size = 4*1024;
-
-       if ((d->qman_version & QMAN_REV_MASK) >= QMAN_REV_5000
-                       && (d->cena_access_mode == qman_cena_fastest_access))
-               cena_region_size = 64*1024;
+       uint8_t est = 1;
 #ifdef RTE_ARCH_64
        uint8_t wn = CENA_WRITE_ENABLE;
 #else
        uint8_t wn = CINH_WRITE_ENABLE;
 #endif
 
+
+       if ((d->qman_version & QMAN_REV_MASK) >= QMAN_REV_5000
+                       && (d->cena_access_mode == qman_cena_fastest_access))
+               cena_region_size = 64*1024;
        s->addr_cena = d->cena_bar;
        s->addr_cinh = d->cinh_bar;
        s->idx = (uint32_t)d->idx;
@@ -428,6 +437,9 @@ static inline int qbman_swp_sys_init(struct qbman_swp_sys *s,
                        dccivac(s->addr_cena + i);
        }
 
+       if (dpaa2_svr_family == SVR_LS1080A)
+               est = 0;
+
        if (s->eqcr_mode == qman_eqcr_vb_array) {
                reg = qbman_set_swp_cfg(dqrr_size, wn,
                                        0, 3, 2, 3, 1, 1, 1, 1, 1, 1);
@@ -438,7 +450,7 @@ static inline int qbman_swp_sys_init(struct qbman_swp_sys *s,
                                                1, 3, 2, 0, 1, 1, 1, 1, 1, 1);
                else
                        reg = qbman_set_swp_cfg(dqrr_size, wn,
-                                               1, 3, 2, 2, 1, 1, 1, 1, 1, 1);
+                                               est, 3, 2, 2, 1, 1, 1, 1, 1, 1);
        }
 
        if ((d->qman_version & QMAN_REV_MASK) >= QMAN_REV_5000