Add the rt linux 4.1.3-rt3 as base
[kvmfornfv.git] / kernel / drivers / staging / fsl-mc / include / dpmng.h
1 /* Copyright 2013-2015 Freescale Semiconductor Inc.
2  *
3  * Redistribution and use in source and binary forms, with or without
4  * modification, are permitted provided that the following conditions are met:
5  * * Redistributions of source code must retain the above copyright
6  * notice, this list of conditions and the following disclaimer.
7  * * Redistributions in binary form must reproduce the above copyright
8  * notice, this list of conditions and the following disclaimer in the
9  * documentation and/or other materials provided with the distribution.
10  * * Neither the name of the above-listed copyright holders nor the
11  * names of any contributors may be used to endorse or promote products
12  * derived from this software without specific prior written permission.
13  *
14  *
15  * ALTERNATIVELY, this software may be distributed under the terms of the
16  * GNU General Public License ("GPL") as published by the Free Software
17  * Foundation, either version 2 of that License or (at your option) any
18  * later version.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  */
32 #ifndef __FSL_DPMNG_H
33 #define __FSL_DPMNG_H
34
35 /* Management Complex General API
36  * Contains general API for the Management Complex firmware
37  */
38
39 struct fsl_mc_io;
40
41 /**
42  * Management Complex firmware version information
43  */
44 #define MC_VER_MAJOR 6
45 #define MC_VER_MINOR 0
46
47 /**
48  * struct mc_versoin
49  * @major: Major version number: incremented on API compatibility changes
50  * @minor: Minor version number: incremented on API additions (that are
51  *              backward compatible); reset when major version is incremented
52  * @revision: Internal revision number: incremented on implementation changes
53  *              and/or bug fixes that have no impact on API
54  */
55 struct mc_version {
56         uint32_t major;
57         uint32_t minor;
58         uint32_t revision;
59 };
60
61 /**
62  * mc_get_version() - Retrieves the Management Complex firmware
63  *                      version information
64  * @mc_io:              Pointer to opaque I/O object
65  * @mc_ver_info:        Returned version information structure
66  *
67  * Return:      '0' on Success; Error code otherwise.
68  */
69 int mc_get_version(struct fsl_mc_io *mc_io, struct mc_version *mc_ver_info);
70
71 /**
72  * dpmng_get_container_id() - Get container ID associated with a given portal.
73  * @mc_io:              Pointer to MC portal's I/O object
74  * @container_id:       Requested container ID
75  *
76  * Return:      '0' on Success; Error code otherwise.
77  */
78 int dpmng_get_container_id(struct fsl_mc_io *mc_io, int *container_id);
79
80 #endif /* __FSL_DPMNG_H */