1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0) 2 * 3 * Copyright 2013-2016 Freescale Semiconductor Inc. 4 * Copyright 2016-2021 NXP 5 * 6 */ 7 #ifndef _FSL_DPRC_H 8 #define _FSL_DPRC_H 9 10 /** @addtogroup dprc Data Path Resource Container API 11 * Contains DPRC API for managing and querying DPAA resources 12 * @{ 13 */ 14 15 struct fsl_mc_io; 16 17 int dprc_open(struct fsl_mc_io *mc_io, 18 uint32_t cmd_flags, 19 int container_id, 20 uint16_t *token); 21 22 int dprc_close(struct fsl_mc_io *mc_io, 23 uint32_t cmd_flags, 24 uint16_t token); 25 26 /** 27 * struct dprc_endpoint - Endpoint description for link connect/disconnect 28 * operations 29 * @type: Endpoint object type: NULL terminated string 30 * @id: Endpoint object ID 31 * @if_id: Interface ID; should be set for endpoints with multiple 32 * interfaces ("dpsw", "dpdmux"); for others, always set to 0 33 */ 34 struct dprc_endpoint { 35 char type[16]; 36 int id; 37 uint16_t if_id; 38 }; 39 40 int dprc_get_connection(struct fsl_mc_io *mc_io, 41 uint32_t cmd_flags, 42 uint16_t token, 43 const struct dprc_endpoint *endpoint1, 44 struct dprc_endpoint *endpoint2, 45 int *state); 46 #endif /* _FSL_DPRC_H */ 47