blob: 2148601e8a12c457b0295fcadb52c69f7059ecbd [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Prabhakar Kushwahacfd9fbf2015-03-19 09:20:45 -07002/* Copyright 2013-2015 Freescale Semiconductor Inc.
J. German Rivera43e4ae32015-01-06 13:19:02 -08003 */
J. German Rivera43e4ae32015-01-06 13:19:02 -08004#ifndef __FSL_DPMNG_H
5#define __FSL_DPMNG_H
6
Prabhakar Kushwahacfd9fbf2015-03-19 09:20:45 -07007/* Management Complex General API
8 * Contains general API for the Management Complex firmware
J. German Rivera43e4ae32015-01-06 13:19:02 -08009 */
10
11struct fsl_mc_io;
12
13/**
Prabhakar Kushwahacfd9fbf2015-03-19 09:20:45 -070014 * Management Complex firmware version information
J. German Rivera43e4ae32015-01-06 13:19:02 -080015 */
Prabhakar Kushwahac3d06e32015-12-24 15:32:49 +053016#define MC_VER_MAJOR 9
J. German Rivera43e4ae32015-01-06 13:19:02 -080017#define MC_VER_MINOR 0
18
Prabhakar Kushwahacfd9fbf2015-03-19 09:20:45 -070019/**
20 * struct mc_versoin
21 * @major: Major version number: incremented on API compatibility changes
22 * @minor: Minor version number: incremented on API additions (that are
23 * backward compatible); reset when major version is incremented
24 * @revision: Internal revision number: incremented on implementation changes
25 * and/or bug fixes that have no impact on API
26 */
J. German Rivera43e4ae32015-01-06 13:19:02 -080027struct mc_version {
28 uint32_t major;
J. German Rivera43e4ae32015-01-06 13:19:02 -080029 uint32_t minor;
J. German Rivera43e4ae32015-01-06 13:19:02 -080030 uint32_t revision;
J. German Rivera43e4ae32015-01-06 13:19:02 -080031};
32
33/**
Prabhakar Kushwahacfd9fbf2015-03-19 09:20:45 -070034 * mc_get_version() - Retrieves the Management Complex firmware
35 * version information
36 * @mc_io: Pointer to opaque I/O object
Prabhakar Kushwaha9564df62015-07-07 15:40:06 +053037 * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
Prabhakar Kushwahacfd9fbf2015-03-19 09:20:45 -070038 * @mc_ver_info: Returned version information structure
J. German Rivera43e4ae32015-01-06 13:19:02 -080039 *
Prabhakar Kushwahacfd9fbf2015-03-19 09:20:45 -070040 * Return: '0' on Success; Error code otherwise.
J. German Rivera43e4ae32015-01-06 13:19:02 -080041 */
Prabhakar Kushwaha9564df62015-07-07 15:40:06 +053042int mc_get_version(struct fsl_mc_io *mc_io,
43 uint32_t cmd_flags,
44 struct mc_version *mc_ver_info);
J. German Rivera43e4ae32015-01-06 13:19:02 -080045
J. German Rivera43e4ae32015-01-06 13:19:02 -080046#endif /* __FSL_DPMNG_H */