xref: /dpdk/drivers/bus/fslmc/mc/fsl_dprc_cmd.h (revision f5145e1d)
1 /* SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0)
2  *
3  * Copyright 2013-2016 Freescale Semiconductor Inc.
4  * Copyright 2016-2021 NXP
5  *
6  */
7 
8 #ifndef _FSL_DPRC_CMD_H
9 #define _FSL_DPRC_CMD_H
10 
11 /* Minimal supported DPRC Version */
12 #define DPRC_VER_MAJOR			6
13 #define DPRC_VER_MINOR			6
14 
15 /* Command versioning */
16 #define DPRC_CMD_BASE_VERSION			1
17 #define DPRC_CMD_ID_OFFSET			4
18 
19 #define DPRC_CMD(id)	((id << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION)
20 
21 /* Command IDs */
22 #define DPRC_CMDID_CLOSE                        DPRC_CMD(0x800)
23 #define DPRC_CMDID_OPEN                         DPRC_CMD(0x805)
24 #define DPRC_CMDID_GET_CONNECTION               DPRC_CMD(0x16C)
25 
26 #pragma pack(push, 1)
27 struct dprc_cmd_open {
28 	uint32_t container_id;
29 };
30 
31 struct dprc_cmd_get_connection {
32 	uint32_t ep1_id;
33 	uint16_t ep1_interface_id;
34 	uint16_t pad;
35 
36 	uint8_t ep1_type[16];
37 };
38 
39 struct dprc_rsp_get_connection {
40 	uint64_t pad[3];
41 	uint32_t ep2_id;
42 	uint16_t ep2_interface_id;
43 	uint16_t pad1;
44 	uint8_t ep2_type[16];
45 	uint32_t state;
46 };
47 #pragma pack(pop)
48 #endif /* _FSL_DPRC_CMD_H */
49