xref: /openbmc/u-boot/include/fsl-mc/fsl_dpmng.h (revision 87457d11)
1a2a55e51SPrabhakar Kushwaha /* Copyright 2013-2015 Freescale Semiconductor Inc.
27b3bd9a7SJ. German Rivera  *
37b3bd9a7SJ. German Rivera  * SPDX-License-Identifier:	GPL-2.0+
47b3bd9a7SJ. German Rivera  */
57b3bd9a7SJ. German Rivera #ifndef __FSL_DPMNG_H
67b3bd9a7SJ. German Rivera #define __FSL_DPMNG_H
77b3bd9a7SJ. German Rivera 
8a2a55e51SPrabhakar Kushwaha /* Management Complex General API
9a2a55e51SPrabhakar Kushwaha  * Contains general API for the Management Complex firmware
107b3bd9a7SJ. German Rivera  */
117b3bd9a7SJ. German Rivera 
127b3bd9a7SJ. German Rivera struct fsl_mc_io;
137b3bd9a7SJ. German Rivera 
147b3bd9a7SJ. German Rivera /**
15a2a55e51SPrabhakar Kushwaha  * Management Complex firmware version information
167b3bd9a7SJ. German Rivera  */
17*87457d11SPrabhakar Kushwaha #define MC_VER_MAJOR 8
187b3bd9a7SJ. German Rivera #define MC_VER_MINOR 0
197b3bd9a7SJ. German Rivera 
20a2a55e51SPrabhakar Kushwaha /**
21a2a55e51SPrabhakar Kushwaha  * struct mc_versoin
22a2a55e51SPrabhakar Kushwaha  * @major: Major version number: incremented on API compatibility changes
23a2a55e51SPrabhakar Kushwaha  * @minor: Minor version number: incremented on API additions (that are
247b3bd9a7SJ. German Rivera  *		backward compatible); reset when major version is incremented
25a2a55e51SPrabhakar Kushwaha  * @revision: Internal revision number: incremented on implementation changes
267b3bd9a7SJ. German Rivera  *		and/or bug fixes that have no impact on API
277b3bd9a7SJ. German Rivera  */
28a2a55e51SPrabhakar Kushwaha struct mc_version {
29a2a55e51SPrabhakar Kushwaha 	uint32_t major;
30a2a55e51SPrabhakar Kushwaha 	uint32_t minor;
31a2a55e51SPrabhakar Kushwaha 	uint32_t revision;
327b3bd9a7SJ. German Rivera };
337b3bd9a7SJ. German Rivera 
347b3bd9a7SJ. German Rivera /**
35a2a55e51SPrabhakar Kushwaha  * mc_get_version() - Retrieves the Management Complex firmware
36a2a55e51SPrabhakar Kushwaha  *			version information
37a2a55e51SPrabhakar Kushwaha  * @mc_io:		Pointer to opaque I/O object
38*87457d11SPrabhakar Kushwaha  * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
39a2a55e51SPrabhakar Kushwaha  * @mc_ver_info:	Returned version information structure
407b3bd9a7SJ. German Rivera  *
41a2a55e51SPrabhakar Kushwaha  * Return:	'0' on Success; Error code otherwise.
427b3bd9a7SJ. German Rivera  */
43*87457d11SPrabhakar Kushwaha int mc_get_version(struct fsl_mc_io	*mc_io,
44*87457d11SPrabhakar Kushwaha 		   uint32_t		cmd_flags,
45*87457d11SPrabhakar Kushwaha 		   struct mc_version	*mc_ver_info);
467b3bd9a7SJ. German Rivera 
477b3bd9a7SJ. German Rivera #endif /* __FSL_DPMNG_H */
48