1 /* Copyright 2014 Freescale Semiconductor Inc.
3 * SPDX-License-Identifier: GPL-2.0+
7 * @brief Management Complex General API
14 * @Group grp_dpmng Management Complex General API
16 * @brief Contains general API for the Management Complex firmware
23 * @brief Management Complex firmware version information
25 #define MC_VER_MAJOR 4
26 #define MC_VER_MINOR 0
30 /*!< Major version number: incremented on API compatibility changes */
32 /*!< Minor version number: incremented on API additions (that are
33 * backward compatible); reset when major version is incremented
36 /*!< Internal revision number: incremented on implementation changes
37 * and/or bug fixes that have no impact on API
42 * @brief Retrieves the Management Complex firmware version information
44 * @param[in] mc_io Pointer to opaque I/O object
45 * @param[out] mc_ver_info Pointer to version information structure
47 * @returns '0' on Success; Error code otherwise.
49 int mc_get_version(struct fsl_mc_io *mc_io, struct mc_version *mc_ver_info);
52 * @brief Resets an AIOP tile
54 * @param[in] mc_io Pointer to opaque I/O object
55 * @param[in] container_id AIOP container ID
56 * @param[in] aiop_tile_id AIOP tile ID to reset
58 * @returns '0' on Success; Error code otherwise.
60 int dpmng_reset_aiop(struct fsl_mc_io *mc_io,
65 * @brief Loads an image to AIOP tile
67 * @param[in] mc_io Pointer to opaque I/O object
68 * @param[in] container_id AIOP container ID
69 * @param[in] aiop_tile_id AIOP tile ID to reset
70 * @param[in] img_iova I/O virtual address of AIOP ELF image
71 * @param[in] img_size Size of AIOP ELF image in memory (in bytes)
73 * @returns '0' on Success; Error code otherwise.
75 int dpmng_load_aiop(struct fsl_mc_io *mc_io,
82 * @brief AIOP run configuration
84 struct dpmng_aiop_run_cfg {
86 /*!< Mask of AIOP cores to run (core 0 in most significant bit) */
88 /*!< Execution options (currently none defined) */
92 * @brief Starts AIOP tile execution
94 * @param[in] mc_io Pointer to MC portal's I/O object
95 * @param[in] container_id AIOP container ID
96 * @param[in] aiop_tile_id AIOP tile ID to reset
97 * @param[in] cfg AIOP run configuration
99 * @returns '0' on Success; Error code otherwise.
101 int dpmng_run_aiop(struct fsl_mc_io *mc_io,
104 const struct dpmng_aiop_run_cfg *cfg);
107 * @brief Resets MC portal
109 * This function closes all object handles (tokens) that are currently
110 * open in the MC portal on which the command is submitted. This allows
111 * cleanup of stale handles that belong to non-functional user processes.
113 * @param[in] mc_io Pointer to MC portal's I/O object
115 * @returns '0' on Success; Error code otherwise.
117 int dpmng_reset_mc_portal(struct fsl_mc_io *mc_io);
121 #endif /* __FSL_DPMNG_H */