blob: b0a87a9082b59cf122ec3978240e38df41a8ba02 [file] [log] [blame]
Prabhakar Kushwahaa2a55e52015-03-19 09:20:45 -07001/* Copyright 2013-2015 Freescale Semiconductor Inc.
J. German Rivera7b3bd9a2015-01-06 13:19:02 -08002 *
3 * SPDX-License-Identifier: GPL-2.0+
4 */
J. German Rivera7b3bd9a2015-01-06 13:19:02 -08005#ifndef __FSL_DPMNG_H
6#define __FSL_DPMNG_H
7
Prabhakar Kushwahaa2a55e52015-03-19 09:20:45 -07008/* Management Complex General API
9 * Contains general API for the Management Complex firmware
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080010 */
11
12struct fsl_mc_io;
13
14/**
Prabhakar Kushwahaa2a55e52015-03-19 09:20:45 -070015 * Management Complex firmware version information
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080016 */
Prabhakar Kushwaha87457d12015-07-07 15:40:06 +053017#define MC_VER_MAJOR 8
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080018#define MC_VER_MINOR 0
19
Prabhakar Kushwahaa2a55e52015-03-19 09:20:45 -070020/**
21 * struct mc_versoin
22 * @major: Major version number: incremented on API compatibility changes
23 * @minor: Minor version number: incremented on API additions (that are
24 * backward compatible); reset when major version is incremented
25 * @revision: Internal revision number: incremented on implementation changes
26 * and/or bug fixes that have no impact on API
27 */
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080028struct mc_version {
29 uint32_t major;
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080030 uint32_t minor;
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080031 uint32_t revision;
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080032};
33
34/**
Prabhakar Kushwahaa2a55e52015-03-19 09:20:45 -070035 * mc_get_version() - Retrieves the Management Complex firmware
36 * version information
37 * @mc_io: Pointer to opaque I/O object
Prabhakar Kushwaha87457d12015-07-07 15:40:06 +053038 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
Prabhakar Kushwahaa2a55e52015-03-19 09:20:45 -070039 * @mc_ver_info: Returned version information structure
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080040 *
Prabhakar Kushwahaa2a55e52015-03-19 09:20:45 -070041 * Return: '0' on Success; Error code otherwise.
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080042 */
Prabhakar Kushwaha87457d12015-07-07 15:40:06 +053043int mc_get_version(struct fsl_mc_io *mc_io,
44 uint32_t cmd_flags,
45 struct mc_version *mc_ver_info);
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080046
J. German Rivera7b3bd9a2015-01-06 13:19:02 -080047#endif /* __FSL_DPMNG_H */