// SPDX-License-Identifier: GPL-2.0 /* * For transports using message passing. * * Derived from shm.c. * * Copyright (C) 2019-2024 ARM Ltd. * Copyright (C) 2020-2021 OpenSynergy GmbH */ #include <linux/types.h> #include "common.h" /* * struct scmi_msg_payld - Transport SDU layout * * The SCMI specification requires all parameters, message headers, return * arguments or any protocol data to be expressed in little endian format only. */ struct scmi_msg_payld { … }; /** * msg_command_size() - Actual size of transport SDU for command. * * @xfer: message which core has prepared for sending * * Return: transport SDU size. */ static size_t msg_command_size(struct scmi_xfer *xfer) { … } /** * msg_response_size() - Maximum size of transport SDU for response. * * @xfer: message which core has prepared for sending * * Return: transport SDU size. */ static size_t msg_response_size(struct scmi_xfer *xfer) { … } /** * msg_tx_prepare() - Set up transport SDU for command. * * @msg: transport SDU for command * @xfer: message which is being sent */ static void msg_tx_prepare(struct scmi_msg_payld *msg, struct scmi_xfer *xfer) { … } /** * msg_read_header() - Read SCMI header from transport SDU. * * @msg: transport SDU * * Return: SCMI header */ static u32 msg_read_header(struct scmi_msg_payld *msg) { … } /** * msg_fetch_response() - Fetch response SCMI payload from transport SDU. * * @msg: transport SDU with response * @len: transport SDU size * @xfer: message being responded to */ static void msg_fetch_response(struct scmi_msg_payld *msg, size_t len, struct scmi_xfer *xfer) { … } /** * msg_fetch_notification() - Fetch notification payload from transport SDU. * * @msg: transport SDU with notification * @len: transport SDU size * @max_len: maximum SCMI payload size to fetch * @xfer: notification message */ static void msg_fetch_notification(struct scmi_msg_payld *msg, size_t len, size_t max_len, struct scmi_xfer *xfer) { … } static const struct scmi_message_operations scmi_msg_ops = …; const struct scmi_message_operations *scmi_message_operations_get(void) { … }