xref: /openbmc/u-boot/include/fsl-mc/fsl_dpmng.h (revision e8f80a5a)
1*83d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2a2a55e51SPrabhakar Kushwaha /* Copyright 2013-2015 Freescale Semiconductor Inc.
37b3bd9a7SJ. German Rivera  */
47b3bd9a7SJ. German Rivera #ifndef __FSL_DPMNG_H
57b3bd9a7SJ. German Rivera #define __FSL_DPMNG_H
67b3bd9a7SJ. German Rivera 
7a2a55e51SPrabhakar Kushwaha /* Management Complex General API
8a2a55e51SPrabhakar Kushwaha  * Contains general API for the Management Complex firmware
97b3bd9a7SJ. German Rivera  */
107b3bd9a7SJ. German Rivera 
117b3bd9a7SJ. German Rivera struct fsl_mc_io;
127b3bd9a7SJ. German Rivera 
137b3bd9a7SJ. German Rivera /**
14a2a55e51SPrabhakar Kushwaha  * Management Complex firmware version information
157b3bd9a7SJ. German Rivera  */
1653e353fcSPrabhakar Kushwaha #define MC_VER_MAJOR 9
177b3bd9a7SJ. German Rivera #define MC_VER_MINOR 0
187b3bd9a7SJ. German Rivera 
19a2a55e51SPrabhakar Kushwaha /**
20a2a55e51SPrabhakar Kushwaha  * struct mc_versoin
21a2a55e51SPrabhakar Kushwaha  * @major: Major version number: incremented on API compatibility changes
22a2a55e51SPrabhakar Kushwaha  * @minor: Minor version number: incremented on API additions (that are
237b3bd9a7SJ. German Rivera  *		backward compatible); reset when major version is incremented
24a2a55e51SPrabhakar Kushwaha  * @revision: Internal revision number: incremented on implementation changes
257b3bd9a7SJ. German Rivera  *		and/or bug fixes that have no impact on API
267b3bd9a7SJ. German Rivera  */
27a2a55e51SPrabhakar Kushwaha struct mc_version {
28a2a55e51SPrabhakar Kushwaha 	uint32_t major;
29a2a55e51SPrabhakar Kushwaha 	uint32_t minor;
30a2a55e51SPrabhakar Kushwaha 	uint32_t revision;
317b3bd9a7SJ. German Rivera };
327b3bd9a7SJ. German Rivera 
337b3bd9a7SJ. German Rivera /**
34a2a55e51SPrabhakar Kushwaha  * mc_get_version() - Retrieves the Management Complex firmware
35a2a55e51SPrabhakar Kushwaha  *			version information
36a2a55e51SPrabhakar Kushwaha  * @mc_io:		Pointer to opaque I/O object
3787457d11SPrabhakar Kushwaha  * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
38a2a55e51SPrabhakar Kushwaha  * @mc_ver_info:	Returned version information structure
397b3bd9a7SJ. German Rivera  *
40a2a55e51SPrabhakar Kushwaha  * Return:	'0' on Success; Error code otherwise.
417b3bd9a7SJ. German Rivera  */
4287457d11SPrabhakar Kushwaha int mc_get_version(struct fsl_mc_io	*mc_io,
4387457d11SPrabhakar Kushwaha 		   uint32_t		cmd_flags,
4487457d11SPrabhakar Kushwaha 		   struct mc_version	*mc_ver_info);
457b3bd9a7SJ. German Rivera 
467b3bd9a7SJ. German Rivera #endif /* __FSL_DPMNG_H */
47