2 * Copyright 2013-2016 Freescale Semiconductor Inc.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 * * Redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer.
8 * * Redistributions in binary form must reproduce the above copyright
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution.
11 * * Neither the name of the above-listed copyright holders nor the
12 * names of any contributors may be used to endorse or promote products
13 * derived from this software without specific prior written permission.
16 * ALTERNATIVELY, this software may be distributed under the terms of the
17 * GNU General Public License ("GPL") as published by the Free Software
18 * Foundation, either version 2 of that License or (at your option) any
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
37 * defines dprc portal commands
41 #ifndef _FSL_DPRC_CMD_H
42 #define _FSL_DPRC_CMD_H
44 /* Minimal supported DPRC Version */
45 #define DPRC_MIN_VER_MAJOR 5
46 #define DPRC_MIN_VER_MINOR 0
49 #define DPRC_CMDID_CLOSE 0x800
50 #define DPRC_CMDID_OPEN 0x805
51 #define DPRC_CMDID_CREATE 0x905
53 #define DPRC_CMDID_GET_ATTR 0x004
54 #define DPRC_CMDID_RESET_CONT 0x005
56 #define DPRC_CMDID_SET_IRQ 0x010
57 #define DPRC_CMDID_GET_IRQ 0x011
58 #define DPRC_CMDID_SET_IRQ_ENABLE 0x012
59 #define DPRC_CMDID_GET_IRQ_ENABLE 0x013
60 #define DPRC_CMDID_SET_IRQ_MASK 0x014
61 #define DPRC_CMDID_GET_IRQ_MASK 0x015
62 #define DPRC_CMDID_GET_IRQ_STATUS 0x016
63 #define DPRC_CMDID_CLEAR_IRQ_STATUS 0x017
65 #define DPRC_CMDID_CREATE_CONT 0x151
66 #define DPRC_CMDID_DESTROY_CONT 0x152
67 #define DPRC_CMDID_SET_RES_QUOTA 0x155
68 #define DPRC_CMDID_GET_RES_QUOTA 0x156
69 #define DPRC_CMDID_ASSIGN 0x157
70 #define DPRC_CMDID_UNASSIGN 0x158
71 #define DPRC_CMDID_GET_OBJ_COUNT 0x159
72 #define DPRC_CMDID_GET_OBJ 0x15A
73 #define DPRC_CMDID_GET_RES_COUNT 0x15B
74 #define DPRC_CMDID_GET_RES_IDS 0x15C
75 #define DPRC_CMDID_GET_OBJ_REG 0x15E
76 #define DPRC_CMDID_SET_OBJ_IRQ 0x15F
77 #define DPRC_CMDID_GET_OBJ_IRQ 0x160
78 #define DPRC_CMDID_SET_OBJ_LABEL 0x161
79 #define DPRC_CMDID_GET_OBJ_DESC 0x162
81 #define DPRC_CMDID_CONNECT 0x167
82 #define DPRC_CMDID_DISCONNECT 0x168
83 #define DPRC_CMDID_GET_POOL 0x169
84 #define DPRC_CMDID_GET_POOL_COUNT 0x16A
86 #define DPRC_CMDID_GET_CONNECTION 0x16C
88 struct dprc_cmd_open {
92 struct dprc_cmd_create_container {
104 struct dprc_rsp_create_container {
105 /* response word 0 */
107 /* response word 1 */
108 __le32 child_container_id;
110 /* response word 2 */
111 __le64 child_portal_addr;
114 struct dprc_cmd_destroy_container {
115 __le32 child_container_id;
118 struct dprc_cmd_reset_container {
119 __le32 child_container_id;
122 struct dprc_cmd_set_irq {
133 struct dprc_cmd_get_irq {
138 struct dprc_rsp_get_irq {
139 /* response word 0 */
142 /* response word 1 */
144 /* response word 2 */
149 #define DPRC_ENABLE 0x1
151 struct dprc_cmd_set_irq_enable {
157 struct dprc_cmd_get_irq_enable {
162 struct dprc_rsp_get_irq_enable {
166 struct dprc_cmd_set_irq_mask {
171 struct dprc_cmd_get_irq_mask {
176 struct dprc_rsp_get_irq_mask {
180 struct dprc_cmd_get_irq_status {
185 struct dprc_rsp_get_irq_status {
189 struct dprc_cmd_clear_irq_status {
194 struct dprc_rsp_get_attributes {
195 /* response word 0 */
199 /* response word 1 */
202 /* response word 2 */
203 __le16 version_major;
204 __le16 version_minor;
207 struct dprc_cmd_set_res_quota {
209 __le32 child_container_id;
216 struct dprc_cmd_get_res_quota {
218 __le32 child_container_id;
224 struct dprc_rsp_get_res_quota {
229 struct dprc_cmd_assign {
235 __le32 id_base_align;
240 struct dprc_cmd_unassign {
242 __le32 child_container_id;
246 __le32 id_base_align;
251 struct dprc_rsp_get_pool_count {
255 struct dprc_cmd_get_pool {
259 struct dprc_rsp_get_pool {
260 /* response word 0 */
262 /* response word 1-2 */
266 struct dprc_rsp_get_obj_count {
271 struct dprc_cmd_get_obj {
275 struct dprc_rsp_get_obj {
276 /* response word 0 */
279 /* response word 1 */
284 /* response word 2 */
285 __le16 version_major;
286 __le16 version_minor;
289 /* response word 3-4 */
291 /* response word 5-6 */
295 struct dprc_cmd_get_obj_desc {
303 struct dprc_rsp_get_obj_desc {
304 /* response word 0 */
307 /* response word 1 */
312 /* response word 2 */
313 __le16 version_major;
314 __le16 version_minor;
317 /* response word 3-4 */
319 /* response word 5-6 */
323 struct dprc_cmd_get_res_count {
330 struct dprc_rsp_get_res_count {
334 struct dprc_cmd_get_res_ids {
346 struct dprc_rsp_get_res_ids {
347 /* response word 0 */
351 /* response word 1 */
356 struct dprc_cmd_get_obj_region {
368 struct dprc_rsp_get_obj_region {
369 /* response word 0 */
371 /* response word 1 */
373 /* response word 2 */
377 struct dprc_cmd_set_obj_label {
387 struct dprc_cmd_set_obj_irq {
401 struct dprc_cmd_get_obj_irq {
410 struct dprc_rsp_get_obj_irq {
411 /* response word 0 */
414 /* response word 1 */
416 /* response word 2 */
421 struct dprc_cmd_connect {
424 __le32 ep1_interface_id;
427 __le32 ep2_interface_id;
432 __le32 committed_rate;
437 struct dprc_cmd_disconnect {
445 struct dprc_cmd_get_connection {
448 __le32 ep1_interface_id;
453 struct dprc_rsp_get_connection {
454 /* response word 0-2 */
456 /* response word 3 */
458 __le32 ep2_interface_id;
459 /* response word 4-5 */
461 /* response word 6 */
465 #endif /* _FSL_DPRC_CMD_H */