1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
3 * Copyright 2013-2016 Freescale Semiconductor Inc.
9 /* Data Path Concentrator API
10 * Contains initialization APIs and runtime control APIs for DPCON
15 /** General DPCON macros */
18 * Use it to disable notifications; see dpcon_set_notification()
20 #define DPCON_INVALID_DPIO_ID (int)(-1)
22 int dpcon_open(struct fsl_mc_io *mc_io,
27 int dpcon_close(struct fsl_mc_io *mc_io,
32 * struct dpcon_cfg - Structure representing DPCON configuration
33 * @num_priorities: Number of priorities for the DPCON channel (1-8)
36 uint8_t num_priorities;
39 int dpcon_create(struct fsl_mc_io *mc_io,
42 const struct dpcon_cfg *cfg,
45 int dpcon_destroy(struct fsl_mc_io *mc_io,
50 int dpcon_enable(struct fsl_mc_io *mc_io,
54 int dpcon_disable(struct fsl_mc_io *mc_io,
58 int dpcon_is_enabled(struct fsl_mc_io *mc_io,
63 int dpcon_reset(struct fsl_mc_io *mc_io,
68 * struct dpcon_attr - Structure representing DPCON attributes
69 * @id: DPCON object ID
70 * @qbman_ch_id: Channel ID to be used by dequeue operation
71 * @num_priorities: Number of priorities for the DPCON channel (1-8)
76 uint8_t num_priorities;
79 int dpcon_get_attributes(struct fsl_mc_io *mc_io,
82 struct dpcon_attr *attr);
84 int dpcon_get_api_version(struct fsl_mc_io *mc_io,
89 #endif /* __FSL_DPCON_H */