1 /* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
8 * Copyright(c) 2016 Google Inc. All rights reserved.
9 * Copyright(c) 2016 Linaro Ltd. All rights reserved.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of version 2 of the GNU General Public License as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License version 2 for more details.
22 * Copyright(c) 2016 Google Inc. All rights reserved.
23 * Copyright(c) 2016 Linaro Ltd. All rights reserved.
25 * Redistribution and use in source and binary forms, with or without
26 * modification, are permitted provided that the following conditions
29 * * Redistributions of source code must retain the above copyright
30 * notice, this list of conditions and the following disclaimer.
31 * * Redistributions in binary form must reproduce the above copyright
32 * notice, this list of conditions and the following disclaimer in
33 * the documentation and/or other materials provided with the
35 * * Neither the name of Google Inc. or Linaro Ltd. nor the names of
36 * its contributors may be used to endorse or promote products
37 * derived from this software without specific prior written
40 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. OR
44 * LINARO LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
45 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
46 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
47 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
48 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
56 /* APBridgeA RPC (ARPC) */
60 ARPC_NO_MEMORY
= 0x01,
63 ARPC_UNKNOWN_ERROR
= 0xff,
66 struct arpc_request_message
{
67 __le16 id
; /* RPC unique id */
68 __le16 size
; /* Size in bytes of header + payload */
69 __u8 type
; /* RPC type */
70 __u8 data
[0]; /* ARPC data */
73 struct arpc_response_message
{
74 __le16 id
; /* RPC unique id */
75 __u8 result
; /* Result of RPC */
79 #define ARPC_TYPE_CPORT_CONNECTED 0x01
80 #define ARPC_TYPE_CPORT_QUIESCE 0x02
81 #define ARPC_TYPE_CPORT_CLEAR 0x03
82 #define ARPC_TYPE_CPORT_FLUSH 0x04
83 #define ARPC_TYPE_CPORT_SHUTDOWN 0x05
85 struct arpc_cport_connected_req
{
89 struct arpc_cport_quiesce_req
{
95 struct arpc_cport_clear_req
{
99 struct arpc_cport_flush_req
{
103 struct arpc_cport_shutdown_req
{
109 #endif /* __ARPC_H */