1 /* SPDX-License-Identifier: BSD-3-Clause
3 * Copyright (c) 2016 Freescale Semiconductor, Inc. All rights reserved.
8 #ifndef _DPAA2_HW_DPIO_H_
9 #define _DPAA2_HW_DPIO_H_
11 #include <mc/fsl_dpio.h>
12 #include <mc/fsl_mc_sys.h>
14 struct dpaa2_io_portal_t {
15 struct dpaa2_dpio_dev *dpio_dev;
16 struct dpaa2_dpio_dev *sec_dpio_dev;
22 /*! Global per thread DPIO portal */
23 RTE_DECLARE_PER_LCORE(struct dpaa2_io_portal_t, _dpaa2_io);
25 #define DPAA2_PER_LCORE_DPIO RTE_PER_LCORE(_dpaa2_io).dpio_dev
26 #define DPAA2_PER_LCORE_PORTAL DPAA2_PER_LCORE_DPIO->sw_portal
28 #define DPAA2_PER_LCORE_SEC_DPIO RTE_PER_LCORE(_dpaa2_io).sec_dpio_dev
29 #define DPAA2_PER_LCORE_SEC_PORTAL DPAA2_PER_LCORE_SEC_DPIO->sw_portal
31 extern struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
33 struct dpaa2_dpio_dev *dpaa2_get_qbman_swp(int cpu_id);
35 /* Affine a DPIO portal to current processing thread */
36 int dpaa2_affine_qbman_swp(void);
38 /* Affine additional DPIO portal to current crypto processing thread */
39 int dpaa2_affine_qbman_swp_sec(void);
41 /* allocate memory for FQ - dq storage */
43 dpaa2_alloc_dq_storage(struct queue_storage_info_t *q_storage);
45 /* free memory for FQ- dq storage */
47 dpaa2_free_dq_storage(struct queue_storage_info_t *q_storage);
49 #endif /* _DPAA2_HW_DPIO_H_ */