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