aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/rpmsg/ethosu_rpmsg_mailbox.h
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2024-02-12 09:56:56 +0100
committerMikael Olsson <mikael.olsson@arm.com>2024-02-12 13:28:26 +0100
commit16be28550f0906e2bfff20b94dd373f59b4a2ccf (patch)
tree72ac8fa23cccacc5db2f4e08e31659eaed60ad51 /kernel/include/rpmsg/ethosu_rpmsg_mailbox.h
parentd4ad9e55cb8e17a4a42b3a94c64e6bc48529b26e (diff)
downloadethos-u-linux-driver-stack-16be28550f0906e2bfff20b94dd373f59b4a2ccf.tar.gz
Rename macros and types to namespace their usage
Macros and types have been renamed accordingly to namespace them by their usage in the new kernel driver source tree structure. This is done in a separate commit from the restructuring to avoid Git from seeing some of the moved files as new ones because they have been both moved and modified at the same time and thus losing the connection in the history. Change-Id: Icd4d8e8c76779479b5b46a55bf1d4f78a629c281 Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Diffstat (limited to 'kernel/include/rpmsg/ethosu_rpmsg_mailbox.h')
-rw-r--r--kernel/include/rpmsg/ethosu_rpmsg_mailbox.h121
1 files changed, 61 insertions, 60 deletions
diff --git a/kernel/include/rpmsg/ethosu_rpmsg_mailbox.h b/kernel/include/rpmsg/ethosu_rpmsg_mailbox.h
index 66eb172..b660288 100644
--- a/kernel/include/rpmsg/ethosu_rpmsg_mailbox.h
+++ b/kernel/include/rpmsg/ethosu_rpmsg_mailbox.h
@@ -17,8 +17,8 @@
* http://www.gnu.org/licenses/gpl-2.0.html.
*/
-#ifndef ETHOSU_MAILBOX_H
-#define ETHOSU_MAILBOX_H
+#ifndef ETHOSU_RPMSG_MAILBOX_H
+#define ETHOSU_RPMSG_MAILBOX_H
/****************************************************************************
* Includes
@@ -36,15 +36,15 @@
struct device;
struct ethosu_buffer;
-struct ethosu_core_msg;
-struct ethosu_core_queue;
+struct ethosu_rpmsg;
+struct ethosu_rpmsg_core_queue;
struct ethosu_device;
-struct ethosu_network;
+struct ethosu_rpmsg_network;
struct resource;
-typedef void (*ethosu_mailbox_cb)(void *user_arg);
+typedef void (*ethosu_rpmsg_mailbox_cb)(void *user_arg);
-struct ethosu_mailbox {
+struct ethosu_rpmsg_mailbox {
struct device *dev;
struct rpmsg_endpoint *ept;
struct idr msg_idr;
@@ -53,17 +53,17 @@ struct ethosu_mailbox {
};
/**
- * struct ethosu_mailbox_msg - Mailbox message
+ * struct ethosu_rpmsg_mailbox_msg - Mailbox message
* @id: Message id
* @type: Message request type
* @fail: Message failure callback
*
* The fail callback will be called with the device mutex locked
*/
-struct ethosu_mailbox_msg {
+struct ethosu_rpmsg_mailbox_msg {
int id;
uint32_t type;
- void (*fail)(struct ethosu_mailbox_msg *msg);
+ void (*fail)(struct ethosu_rpmsg_mailbox_msg *msg);
};
/****************************************************************************
@@ -71,124 +71,125 @@ struct ethosu_mailbox_msg {
****************************************************************************/
/**
- * ethosu_mailbox_init() - Initialize mailbox
+ * ethosu_rpmsg_mailbox_init() - Initialize mailbox
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_init(struct ethosu_mailbox *mbox,
- struct device *dev,
- struct rpmsg_endpoint *ept);
+int ethosu_rpmsg_mailbox_init(struct ethosu_rpmsg_mailbox *mbox,
+ struct device *dev,
+ struct rpmsg_endpoint *ept);
/**
- * ethosu_mailbox_deinit() - Deinitialize mailbox
+ * ethosu_rpmsg_mailbox_deinit() - Deinitialize mailbox
*/
-void ethosu_mailbox_deinit(struct ethosu_mailbox *mbox);
+void ethosu_rpmsg_mailbox_deinit(struct ethosu_rpmsg_mailbox *mbox);
/**
- * ethosu_mailbox_register() - Register the ethosu_mailbox_msg in ethosu_mailbox
+ * ethosu_rpmsg_mailbox_register() - Register the message in mailbox
*
* Context: Must be called with the device mutex locked
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_register(struct ethosu_mailbox *mbox,
- struct ethosu_mailbox_msg *msg);
+int ethosu_rpmsg_mailbox_register(struct ethosu_rpmsg_mailbox *mbox,
+ struct ethosu_rpmsg_mailbox_msg *msg);
/**
- * ethosu_mailbox_free_id() - Free the id of the ethosu_mailbox_msg
+ * ethosu_rpmsg_mailbox_free_id() - Free the id of the message
*
* Context: Must be called with the device mutex locked
*/
-void ethosu_mailbox_deregister(struct ethosu_mailbox *mbox,
- struct ethosu_mailbox_msg *msg);
+void ethosu_rpmsg_mailbox_deregister(struct ethosu_rpmsg_mailbox *mbox,
+ struct ethosu_rpmsg_mailbox_msg *msg);
/**
- * ethosu_mailbox_find() - Find mailbox message
+ * ethosu_rpmsg_mailbox_find() - Find mailbox message
*
* Context: Must be called with the device mutex locked
*
* Return: a valid pointer on success, otherwise an error ptr.
*/
-struct ethosu_mailbox_msg *ethosu_mailbox_find(struct ethosu_mailbox *mbox,
- int msg_id,
- uint32_t msg_type);
+struct ethosu_rpmsg_mailbox_msg *ethosu_rpmsg_mailbox_find(
+ struct ethosu_rpmsg_mailbox *mbox,
+ int msg_id,
+ uint32_t msg_type);
/**
- * ethosu_mailbox_fail() - Fail mailbox messages
+ * ethosu_rpmsg_mailbox_fail() - Fail mailbox messages
*
* Call fail() callback on all messages in pending list.
*
* Context: Must be called with the device mutex locked
*/
-void ethosu_mailbox_fail(struct ethosu_mailbox *mbox);
+void ethosu_rpmsg_mailbox_fail(struct ethosu_rpmsg_mailbox *mbox);
/**
- * ethosu_mailbox_reset() - Reset to end of queue
+ * ethosu_rpmsg_mailbox_reset() - Reset to end of queue
*/
-void ethosu_mailbox_reset(struct ethosu_mailbox *mbox);
+void ethosu_rpmsg_mailbox_reset(struct ethosu_rpmsg_mailbox *mbox);
/**
- * ethosu_mailbox_ping() - Send ping message
+ * ethosu_rpmsg_mailbox_ping() - Send ping message
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_ping(struct ethosu_mailbox *mbox);
+int ethosu_rpmsg_mailbox_ping(struct ethosu_rpmsg_mailbox *mbox);
/**
- * ethosu_mailbox_pong() - Send pong response
+ * ethosu_rpmsg_mailbox_pong() - Send pong response
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_pong(struct ethosu_mailbox *mbox);
+int ethosu_rpmsg_mailbox_pong(struct ethosu_rpmsg_mailbox *mbox);
/**
- * ethosu_mailbox_version_request() - Send protocol version request
+ * ethosu_rpmsg_mailbox_version_request() - Send protocol version request
*
* Return: 0 on succes, else error code
*/
-int ethosu_mailbox_version_request(struct ethosu_mailbox *mbox,
- struct ethosu_mailbox_msg *msg);
+int ethosu_rpmsg_mailbox_version_request(struct ethosu_rpmsg_mailbox *mbox,
+ struct ethosu_rpmsg_mailbox_msg *msg);
/**
- * ethosu_mailbox_capabilities_request() - Send capabilities request
+ * ethosu_rpmsg_mailbox_capabilities_request() - Send capabilities request
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_capabilities_request(struct ethosu_mailbox *mbox,
- struct ethosu_mailbox_msg *msg);
+int ethosu_rpmsg_mailbox_capabilities_request(struct ethosu_rpmsg_mailbox *mbox,
+ struct ethosu_rpmsg_mailbox_msg *msg);
/**
- * ethosu_mailbox_inference() - Send inference
+ * ethosu_rpmsg_mailbox_inference() - Send inference
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_inference(struct ethosu_mailbox *mbox,
- struct ethosu_mailbox_msg *msg,
- uint32_t ifm_count,
- struct ethosu_buffer **ifm,
- uint32_t ofm_count,
- struct ethosu_buffer **ofm,
- struct ethosu_network *network,
- uint8_t *pmu_event_config,
- uint8_t pmu_event_config_count,
- uint8_t pmu_cycle_counter_enable);
+int ethosu_rpmsg_mailbox_inference(struct ethosu_rpmsg_mailbox *mbox,
+ struct ethosu_rpmsg_mailbox_msg *msg,
+ uint32_t ifm_count,
+ struct ethosu_buffer **ifm,
+ uint32_t ofm_count,
+ struct ethosu_buffer **ofm,
+ struct ethosu_rpmsg_network *network,
+ uint8_t *pmu_event_config,
+ uint8_t pmu_event_config_count,
+ uint8_t pmu_cycle_counter_enable);
/**
- * ethosu_mailbox_network_info_request() - Send network info request
+ * ethosu_rpmsg_mailbox_network_info_request() - Send network info request
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_network_info_request(struct ethosu_mailbox *mbox,
- struct ethosu_mailbox_msg *msg,
- struct ethosu_network *network);
+int ethosu_rpmsg_mailbox_network_info_request(struct ethosu_rpmsg_mailbox *mbox,
+ struct ethosu_rpmsg_mailbox_msg *msg,
+ struct ethosu_rpmsg_network *network);
/**
- * ethosu_mailbox_cancel_inference() - Send inference cancellation
+ * ethosu_rpmsg_mailbox_cancel_inference() - Send inference cancellation
*
* Return: 0 on success, else error code.
*/
-int ethosu_mailbox_cancel_inference(struct ethosu_mailbox *mbox,
- struct ethosu_mailbox_msg *msg,
- int inference_handle);
+int ethosu_rpmsg_mailbox_cancel_inference(struct ethosu_rpmsg_mailbox *mbox,
+ struct ethosu_rpmsg_mailbox_msg *msg,
+ int inference_handle);
-#endif /* ETHOSU_MAILBOX_H */
+#endif /* ETHOSU_RPMSG_MAILBOX_H */