1 /* Copyright 2013-2016 Freescale Semiconductor Inc.
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.
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
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.
33 /*************************************************************************//*
36 defines dprc portal commands
38 *//**************************************************************************/
40 #ifndef _FSL_DPRC_CMD_H
41 #define _FSL_DPRC_CMD_H
43 /* Minimal supported DPRC Version */
44 #define DPRC_MIN_VER_MAJOR 5
45 #define DPRC_MIN_VER_MINOR 0
48 #define DPRC_CMDID_CLOSE 0x800
49 #define DPRC_CMDID_OPEN 0x805
50 #define DPRC_CMDID_CREATE 0x905
52 #define DPRC_CMDID_GET_ATTR 0x004
53 #define DPRC_CMDID_RESET_CONT 0x005
55 #define DPRC_CMDID_SET_IRQ 0x010
56 #define DPRC_CMDID_GET_IRQ 0x011
57 #define DPRC_CMDID_SET_IRQ_ENABLE 0x012
58 #define DPRC_CMDID_GET_IRQ_ENABLE 0x013
59 #define DPRC_CMDID_SET_IRQ_MASK 0x014
60 #define DPRC_CMDID_GET_IRQ_MASK 0x015
61 #define DPRC_CMDID_GET_IRQ_STATUS 0x016
62 #define DPRC_CMDID_CLEAR_IRQ_STATUS 0x017
64 #define DPRC_CMDID_CREATE_CONT 0x151
65 #define DPRC_CMDID_DESTROY_CONT 0x152
66 #define DPRC_CMDID_SET_RES_QUOTA 0x155
67 #define DPRC_CMDID_GET_RES_QUOTA 0x156
68 #define DPRC_CMDID_ASSIGN 0x157
69 #define DPRC_CMDID_UNASSIGN 0x158
70 #define DPRC_CMDID_GET_OBJ_COUNT 0x159
71 #define DPRC_CMDID_GET_OBJ 0x15A
72 #define DPRC_CMDID_GET_RES_COUNT 0x15B
73 #define DPRC_CMDID_GET_RES_IDS 0x15C
74 #define DPRC_CMDID_GET_OBJ_REG 0x15E
75 #define DPRC_CMDID_SET_OBJ_IRQ 0x15F
76 #define DPRC_CMDID_GET_OBJ_IRQ 0x160
77 #define DPRC_CMDID_SET_OBJ_LABEL 0x161
78 #define DPRC_CMDID_GET_OBJ_DESC 0x162
80 #define DPRC_CMDID_CONNECT 0x167
81 #define DPRC_CMDID_DISCONNECT 0x168
82 #define DPRC_CMDID_GET_POOL 0x169
83 #define DPRC_CMDID_GET_POOL_COUNT 0x16A
85 #define DPRC_CMDID_GET_CONNECTION 0x16C
87 struct dprc_cmd_open {
91 struct dprc_cmd_create_container {
103 struct dprc_rsp_create_container {
104 /* response word 0 */
106 /* response word 1 */
107 __le32 child_container_id;
109 /* response word 2 */
110 __le64 child_portal_addr;
113 struct dprc_cmd_destroy_container {
114 __le32 child_container_id;
117 struct dprc_cmd_reset_container {
118 __le32 child_container_id;
121 struct dprc_cmd_set_irq {
132 struct dprc_cmd_get_irq {
137 struct dprc_rsp_get_irq {
138 /* response word 0 */
141 /* response word 1 */
143 /* response word 2 */
148 #define DPRC_ENABLE 0x1
150 struct dprc_cmd_set_irq_enable {
156 struct dprc_cmd_get_irq_enable {
161 struct dprc_rsp_get_irq_enable {
165 struct dprc_cmd_set_irq_mask {
170 struct dprc_cmd_get_irq_mask {
175 struct dprc_rsp_get_irq_mask {
179 struct dprc_cmd_get_irq_status {
184 struct dprc_rsp_get_irq_status {
188 struct dprc_cmd_clear_irq_status {
193 struct dprc_rsp_get_attributes {
194 /* response word 0 */
198 /* response word 1 */
201 /* response word 2 */
202 __le16 version_major;
203 __le16 version_minor;
206 struct dprc_cmd_set_res_quota {
208 __le32 child_container_id;
215 struct dprc_cmd_get_res_quota {
217 __le32 child_container_id;
223 struct dprc_rsp_get_res_quota {
228 struct dprc_cmd_assign {
234 __le32 id_base_align;
239 struct dprc_cmd_unassign {
241 __le32 child_container_id;
245 __le32 id_base_align;
250 struct dprc_rsp_get_pool_count {
254 struct dprc_cmd_get_pool {
258 struct dprc_rsp_get_pool {
259 /* response word 0 */
261 /* response word 1-2 */
265 struct dprc_rsp_get_obj_count {
270 struct dprc_cmd_get_obj {
274 struct dprc_rsp_get_obj {
275 /* response word 0 */
278 /* response word 1 */
283 /* response word 2 */
284 __le16 version_major;
285 __le16 version_minor;
288 /* response word 3-4 */
290 /* response word 5-6 */
294 struct dprc_cmd_get_obj_desc {
302 struct dprc_rsp_get_obj_desc {
303 /* response word 0 */
306 /* response word 1 */
311 /* response word 2 */
312 __le16 version_major;
313 __le16 version_minor;
316 /* response word 3-4 */
318 /* response word 5-6 */
322 struct dprc_cmd_get_res_count {
329 struct dprc_rsp_get_res_count {
333 struct dprc_cmd_get_res_ids {
345 struct dprc_rsp_get_res_ids {
346 /* response word 0 */
350 /* response word 1 */
355 struct dprc_cmd_get_obj_region {
367 struct dprc_rsp_get_obj_region {
368 /* response word 0 */
370 /* response word 1 */
372 /* response word 2 */
376 struct dprc_cmd_set_obj_label {
386 struct dprc_cmd_set_obj_irq {
400 struct dprc_cmd_get_obj_irq {
409 struct dprc_rsp_get_obj_irq {
410 /* response word 0 */
413 /* response word 1 */
415 /* response word 2 */
420 struct dprc_cmd_connect {
423 __le32 ep1_interface_id;
426 __le32 ep2_interface_id;
431 __le32 committed_rate;
436 struct dprc_cmd_disconnect {
444 struct dprc_cmd_get_connection {
447 __le32 ep1_interface_id;
452 struct dprc_rsp_get_connection {
453 /* response word 0-2 */
455 /* response word 3 */
457 __le32 ep2_interface_id;
458 /* response word 4-5 */
460 /* response word 6 */
464 #endif /* _FSL_DPRC_CMD_H */