]>
Commit | Line | Data |
---|---|---|
f5e4e5e7 | 1 | /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */ |
7d0e76d6 | 2 | /* |
b3136a77 GKH |
3 | * Copyright(c) 2016 Google Inc. All rights reserved. |
4 | * Copyright(c) 2016 Linaro Ltd. All rights reserved. | |
7d0e76d6 JH |
5 | */ |
6 | ||
7 | #ifndef __ARPC_H | |
8 | #define __ARPC_H | |
9 | ||
10 | /* APBridgeA RPC (ARPC) */ | |
11 | ||
12 | enum arpc_result { | |
13 | ARPC_SUCCESS = 0x00, | |
14 | ARPC_NO_MEMORY = 0x01, | |
15 | ARPC_INVALID = 0x02, | |
16 | ARPC_TIMEOUT = 0x03, | |
17 | ARPC_UNKNOWN_ERROR = 0xff, | |
18 | }; | |
19 | ||
20 | struct arpc_request_message { | |
21 | __le16 id; /* RPC unique id */ | |
22 | __le16 size; /* Size in bytes of header + payload */ | |
23 | __u8 type; /* RPC type */ | |
84c1e51d | 24 | __u8 data[]; /* ARPC data */ |
7d0e76d6 JH |
25 | } __packed; |
26 | ||
27 | struct arpc_response_message { | |
28 | __le16 id; /* RPC unique id */ | |
29 | __u8 result; /* Result of RPC */ | |
30 | } __packed; | |
31 | ||
7d0e76d6 | 32 | /* ARPC requests */ |
a9dc1cf5 | 33 | #define ARPC_TYPE_CPORT_CONNECTED 0x01 |
0e7cd0d2 | 34 | #define ARPC_TYPE_CPORT_QUIESCE 0x02 |
6471c003 | 35 | #define ARPC_TYPE_CPORT_CLEAR 0x03 |
d2dee94b | 36 | #define ARPC_TYPE_CPORT_FLUSH 0x04 |
77e52b3b | 37 | #define ARPC_TYPE_CPORT_SHUTDOWN 0x05 |
7d0e76d6 | 38 | |
a9dc1cf5 JH |
39 | struct arpc_cport_connected_req { |
40 | __le16 cport_id; | |
41 | } __packed; | |
42 | ||
0e7cd0d2 JH |
43 | struct arpc_cport_quiesce_req { |
44 | __le16 cport_id; | |
45 | __le16 peer_space; | |
46 | __le16 timeout; | |
47 | } __packed; | |
48 | ||
6471c003 JH |
49 | struct arpc_cport_clear_req { |
50 | __le16 cport_id; | |
51 | } __packed; | |
52 | ||
d2dee94b JH |
53 | struct arpc_cport_flush_req { |
54 | __le16 cport_id; | |
55 | } __packed; | |
a9dc1cf5 | 56 | |
77e52b3b JH |
57 | struct arpc_cport_shutdown_req { |
58 | __le16 cport_id; | |
59 | __le16 timeout; | |
60 | __u8 phase; | |
61 | } __packed; | |
62 | ||
7d0e76d6 | 63 | #endif /* __ARPC_H */ |