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.
38 SCMI_ERR_SUPPORT = -1, /* Not supported */
39 SCMI_ERR_PARAMS = -2, /* Invalid Parameters */
40 SCMI_ERR_ACCESS = -3, /* Invalid access/permission denied */
41 SCMI_ERR_ENTRY = -4, /* Not found */
42 SCMI_ERR_RANGE = -5, /* Value out of range */
43 SCMI_ERR_BUSY = -6, /* Device busy */
44 SCMI_ERR_COMMS = -7, /* Communication Error */
45 SCMI_ERR_GENERIC = -8, /* Generic Error */
46 SCMI_ERR_HARDWARE = -9, /* Hardware Error */
47 SCMI_ERR_PROTOCOL = -10,/* Protocol Error */
53 -EOPNOTSUPP, /* SCMI_ERR_SUPPORT */
54 -EINVAL, /* SCMI_ERR_PARAM */
55 -EACCES, /* SCMI_ERR_ACCESS */
56 -ENOENT, /* SCMI_ERR_ENTRY */
57 -ERANGE, /* SCMI_ERR_RANGE */
58 -EBUSY, /* SCMI_ERR_BUSY */
59 -ECOMM, /* SCMI_ERR_COMMS */
60 -EIO, /* SCMI_ERR_GENERIC */
61 -EREMOTEIO, /* SCMI_ERR_HARDWARE */
62 -EPROTO, /* SCMI_ERR_PROTOCOL */
67 int err_idx = -errno; in scmi_to_linux_errno()
71 return -EIO; in scmi_to_linux_errno()
90 * maximum number of in-flight messages on a specific platform, but such value
98 * pack_scmi_header() - packs and returns 32-bit header
103 * Return: 32-bit packed message header to be sent to the platform.
107 return FIELD_PREP(MSG_ID_MASK, hdr->id) | in pack_scmi_header()
108 FIELD_PREP(MSG_TYPE_MASK, hdr->type) | in pack_scmi_header()
109 FIELD_PREP(MSG_TOKEN_ID_MASK, hdr->seq) | in pack_scmi_header()
110 FIELD_PREP(MSG_PROTOCOL_ID_MASK, hdr->protocol_id); in pack_scmi_header()
114 * unpack_scmi_header() - unpacks and records message and protocol id
116 * @msg_hdr: 32-bit packed message header sent from the platform
121 hdr->id = MSG_XTRACT_ID(msg_hdr); in unpack_scmi_header()
122 hdr->protocol_id = MSG_XTRACT_PROT_ID(msg_hdr); in unpack_scmi_header()
123 hdr->type = MSG_XTRACT_TYPE(msg_hdr); in unpack_scmi_header()
136 if (xfer_->hdr.seq == k_) \
162 * struct scmi_chan_info - Structure representing a SCMI channel information
168 * @is_p2a: A flag to identify a channel as P2A (RX)
174 * This can be dynamically set by transports at run-time
190 * struct scmi_transport_ops - Structure representing a SCMI transport ops
224 * struct scmi_desc - Description of SoC integration
232 * @atomic_threshold: Optional system wide DT-configured threshold, expressed
235 * to have an execution latency lesser-equal to the threshold
241 * synchronous-command messages are atomically
265 return cinfo->no_completion_irq || desc->force_polling; in is_polling_required()
270 return desc->ops->poll_done || desc->sync_cmds_completed_on_ret; in is_transport_polling_capable()
318 MSG_UNEXPECTED = -1,
319 MSG_INVALID = -2,
320 MSG_UNKNOWN = -3,
321 MSG_NOMEM = -4,
322 MSG_MBOX_SPURIOUS = -5,
334 * struct scmi_shmem_io_ops - I/O operations to read from/write to
349 * struct scmi_shared_mem_operations - Transport core operations for
395 * struct scmi_message_operations - Transport core operations for Message
418 * struct scmi_transport_core_operations - Transpoert core operations
435 * struct scmi_transport - A structure representing a configured transport
459 struct device *dev = &pdev->dev; \
464 spdev = platform_device_alloc("arm-scmi", PLATFORM_DEVID_AUTO); \
466 return -ENOMEM; \
468 device_set_of_node_from_dev(&spdev->dev, dev); \