Lines Matching +full:p2a +full:- +full:control
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * System Control and Management Interface (SCMI) Message Protocol
7 * Copyright (C) 2018-2022 ARM Ltd.
36 SCMI_ERR_SUPPORT = -1, /* Not supported */
37 SCMI_ERR_PARAMS = -2, /* Invalid Parameters */
38 SCMI_ERR_ACCESS = -3, /* Invalid access/permission denied */
39 SCMI_ERR_ENTRY = -4, /* Not found */
40 SCMI_ERR_RANGE = -5, /* Value out of range */
41 SCMI_ERR_BUSY = -6, /* Device busy */
42 SCMI_ERR_COMMS = -7, /* Communication Error */
43 SCMI_ERR_GENERIC = -8, /* Generic Error */
44 SCMI_ERR_HARDWARE = -9, /* Hardware Error */
45 SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
51 -EOPNOTSUPP, /* SCMI_ERR_SUPPORT */
52 -EINVAL, /* SCMI_ERR_PARAM */
53 -EACCES, /* SCMI_ERR_ACCESS */
54 -ENOENT, /* SCMI_ERR_ENTRY */
55 -ERANGE, /* SCMI_ERR_RANGE */
56 -EBUSY, /* SCMI_ERR_BUSY */
57 -ECOMM, /* SCMI_ERR_COMMS */
58 -EIO, /* SCMI_ERR_GENERIC */
59 -EREMOTEIO, /* SCMI_ERR_HARDWARE */
60 -EPROTO, /* SCMI_ERR_PROTOCOL */
65 int err_idx = -errno; in scmi_to_linux_errno()
69 return -EIO; in scmi_to_linux_errno()
88 * maximum number of in-flight messages on a specific platform, but such value
96 * pack_scmi_header() - packs and returns 32-bit header
101 * Return: 32-bit packed message header to be sent to the platform.
105 return FIELD_PREP(MSG_ID_MASK, hdr->id) | in pack_scmi_header()
106 FIELD_PREP(MSG_TYPE_MASK, hdr->type) | in pack_scmi_header()
107 FIELD_PREP(MSG_TOKEN_ID_MASK, hdr->seq) | in pack_scmi_header()
108 FIELD_PREP(MSG_PROTOCOL_ID_MASK, hdr->protocol_id); in pack_scmi_header()
112 * unpack_scmi_header() - unpacks and records message and protocol id
114 * @msg_hdr: 32-bit packed message header sent from the platform
119 hdr->id = MSG_XTRACT_ID(msg_hdr); in unpack_scmi_header()
120 hdr->protocol_id = MSG_XTRACT_PROT_ID(msg_hdr); in unpack_scmi_header()
121 hdr->type = MSG_XTRACT_TYPE(msg_hdr); in unpack_scmi_header()
134 if (xfer_->hdr.seq == k_) \
160 * struct scmi_chan_info - Structure representing a SCMI channel information
166 * @is_p2a: A flag to identify a channel as P2A (RX)
171 * This can be dynamically set by transports at run-time
186 * struct scmi_transport_ops - Structure representing a SCMI transport ops
222 * struct scmi_desc - Description of SoC integration
225 * initialize some transport-specific setup during SCMI core
228 * de-initialize some transport-specific setup during SCMI core
229 * de-initialization, so after SCMI core removal.
239 * synchronous-command messages are atomically
264 return cinfo->no_completion_irq || desc->force_polling; in is_polling_required()
269 return desc->ops->poll_done || desc->sync_cmds_completed_on_ret; in is_transport_polling_capable()
331 MSG_UNEXPECTED = -1,
332 MSG_INVALID = -2,
333 MSG_UNKNOWN = -3,
334 MSG_NOMEM = -4,
335 MSG_MBOX_SPURIOUS = -5,