aboutsummaryrefslogtreecommitdiff
path: root/kernel/rpmsg/ethosu_rpmsg_version.c
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/rpmsg/ethosu_rpmsg_version.c
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/rpmsg/ethosu_rpmsg_version.c')
-rw-r--r--kernel/rpmsg/ethosu_rpmsg_version.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/kernel/rpmsg/ethosu_rpmsg_version.c b/kernel/rpmsg/ethosu_rpmsg_version.c
index 03e164b..dc2d8e0 100644
--- a/kernel/rpmsg/ethosu_rpmsg_version.c
+++ b/kernel/rpmsg/ethosu_rpmsg_version.c
@@ -36,9 +36,9 @@
* Functions
****************************************************************************/
-static void ethosu_version_fail(struct ethosu_mailbox_msg *msg)
+static void ethosu_rpmsg_version_fail(struct ethosu_rpmsg_mailbox_msg *msg)
{
- struct ethosu_version *version =
+ struct ethosu_rpmsg_version *version =
container_of(msg, typeof(*version), msg);
if (completion_done(&version->done))
@@ -48,16 +48,16 @@ static void ethosu_version_fail(struct ethosu_mailbox_msg *msg)
complete(&version->done);
}
-void ethosu_version_rsp(struct ethosu_mailbox *mailbox,
- int msg_id,
- struct ethosu_core_msg_version_rsp *rsp)
+void ethosu_rpmsg_version_rsp(struct ethosu_rpmsg_mailbox *mailbox,
+ int msg_id,
+ struct ethosu_rpmsg_version_rsp *rsp)
{
struct device *dev = mailbox->dev;
- struct ethosu_mailbox_msg *msg;
- struct ethosu_version *version;
+ struct ethosu_rpmsg_mailbox_msg *msg;
+ struct ethosu_rpmsg_version *version;
- msg = ethosu_mailbox_find(mailbox, msg_id,
- ETHOSU_CORE_MSG_VERSION_REQ);
+ msg = ethosu_rpmsg_mailbox_find(mailbox, msg_id,
+ ETHOSU_RPMSG_VERSION_REQ);
if (IS_ERR(msg)) {
dev_warn(dev,
"Id for version msg not found. Id=0x%0x: %ld\n",
@@ -71,12 +71,12 @@ void ethosu_version_rsp(struct ethosu_mailbox *mailbox,
if (completion_done(&version->done))
return;
- if (rsp->major != ETHOSU_CORE_MSG_VERSION_MAJOR ||
- rsp->minor != ETHOSU_CORE_MSG_VERSION_MINOR) {
+ if (rsp->major != ETHOSU_RPMSG_VERSION_MAJOR ||
+ rsp->minor != ETHOSU_RPMSG_VERSION_MINOR) {
dev_warn(dev,
"Msg: Protocol version mismatch. Expected %u.%u.X but got %u.%u.%u",
- ETHOSU_CORE_MSG_VERSION_MAJOR,
- ETHOSU_CORE_MSG_VERSION_MINOR,
+ ETHOSU_RPMSG_VERSION_MAJOR,
+ ETHOSU_RPMSG_VERSION_MINOR,
rsp->major, rsp->minor, rsp->patch);
version->errno = -EPROTO;
} else {
@@ -86,10 +86,10 @@ void ethosu_version_rsp(struct ethosu_mailbox *mailbox,
complete(&version->done);
}
-int ethosu_version_check_request(struct device *dev,
- struct ethosu_mailbox *mailbox)
+int ethosu_rpmsg_version_check_request(struct device *dev,
+ struct ethosu_rpmsg_mailbox *mailbox)
{
- struct ethosu_version *version;
+ struct ethosu_rpmsg_version *version;
int ret;
int timeout;
@@ -99,16 +99,16 @@ int ethosu_version_check_request(struct device *dev,
version->dev = dev;
init_completion(&version->done);
- version->msg.fail = ethosu_version_fail;
+ version->msg.fail = ethosu_rpmsg_version_fail;
- ret = ethosu_mailbox_register(mailbox, &version->msg);
+ ret = ethosu_rpmsg_mailbox_register(mailbox, &version->msg);
if (ret < 0)
goto free_version;
dev_dbg(dev, "Protocol version request created. Id=0x%x, handle=%pK\n",
version->msg.id, version);
- ret = ethosu_mailbox_version_request(mailbox, &version->msg);
+ ret = ethosu_rpmsg_mailbox_version_request(mailbox, &version->msg);
if (ret)
goto deregister;
@@ -135,7 +135,7 @@ int ethosu_version_check_request(struct device *dev,
}
deregister:
- ethosu_mailbox_deregister(mailbox, &version->msg);
+ ethosu_rpmsg_mailbox_deregister(mailbox, &version->msg);
free_version:
dev_dbg(dev, "Protocol version destroy. Id=0x%x, handle=%pK\n",