Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 2 | /* Copyright 2013-2015 Freescale Semiconductor Inc. |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 3 | */ |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 4 | #ifndef __FSL_DPMNG_H |
| 5 | #define __FSL_DPMNG_H |
| 6 | |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 7 | /* Management Complex General API |
| 8 | * Contains general API for the Management Complex firmware |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | struct fsl_mc_io; |
| 12 | |
| 13 | /** |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 14 | * Management Complex firmware version information |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 15 | */ |
Prabhakar Kushwaha | c3d06e3 | 2015-12-24 15:32:49 +0530 | [diff] [blame] | 16 | #define MC_VER_MAJOR 9 |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 17 | #define MC_VER_MINOR 0 |
| 18 | |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 19 | /** |
| 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 Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 27 | struct mc_version { |
| 28 | uint32_t major; |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 29 | uint32_t minor; |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 30 | uint32_t revision; |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | /** |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 34 | * mc_get_version() - Retrieves the Management Complex firmware |
| 35 | * version information |
| 36 | * @mc_io: Pointer to opaque I/O object |
Prabhakar Kushwaha | 9564df6 | 2015-07-07 15:40:06 +0530 | [diff] [blame] | 37 | * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_' |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 38 | * @mc_ver_info: Returned version information structure |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 39 | * |
Prabhakar Kushwaha | cfd9fbf | 2015-03-19 09:20:45 -0700 | [diff] [blame] | 40 | * Return: '0' on Success; Error code otherwise. |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 41 | */ |
Prabhakar Kushwaha | 9564df6 | 2015-07-07 15:40:06 +0530 | [diff] [blame] | 42 | int mc_get_version(struct fsl_mc_io *mc_io, |
| 43 | uint32_t cmd_flags, |
| 44 | struct mc_version *mc_ver_info); |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 45 | |
J. German Rivera | 43e4ae3 | 2015-01-06 13:19:02 -0800 | [diff] [blame] | 46 | #endif /* __FSL_DPMNG_H */ |