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-2024 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
220 * struct scmi_desc - Description of SoC integration
231 * synchronous-command messages are atomically
254 return cinfo->no_completion_irq || desc->force_polling; in is_polling_required()
259 return desc->ops->poll_done || desc->sync_cmds_completed_on_ret; in is_transport_polling_capable()
307 MSG_UNEXPECTED = -1,
308 MSG_INVALID = -2,
309 MSG_UNKNOWN = -3,
310 MSG_NOMEM = -4,
311 MSG_MBOX_SPURIOUS = -5,
318 * struct scmi_shared_mem_operations - Transport core operations for
360 * struct scmi_message_operations - Transport core operations for Message
383 * struct scmi_transport_core_operations - Transpoert core operations
400 * struct scmi_transport - A structure representing a configured transport
424 struct device *dev = &pdev->dev; \
429 spdev = platform_device_alloc("arm-scmi", PLATFORM_DEVID_AUTO); \
431 return -ENOMEM; \
433 device_set_of_node_from_dev(&spdev->dev, dev); \