aboutsummaryrefslogtreecommitdiff
path: root/kernel/ethosu_mailbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/ethosu_mailbox.c')
-rw-r--r--kernel/ethosu_mailbox.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/kernel/ethosu_mailbox.c b/kernel/ethosu_mailbox.c
index 5cc2465..e499860 100644
--- a/kernel/ethosu_mailbox.c
+++ b/kernel/ethosu_mailbox.c
@@ -1,5 +1,6 @@
/*
- * Copyright 2020-2023 Arm Limited and/or its affiliates
+ * SPDX-FileCopyrightText: Copyright 2020-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
+ * SPDX-License-Identifier: GPL-2.0-only
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -14,8 +15,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
- *
- * SPDX-License-Identifier: GPL-2.0-only
*/
/****************************************************************************
@@ -125,17 +124,10 @@ static int ethosu_send_locked(struct ethosu_mailbox *mbox,
static void ethosu_core_set_size(struct ethosu_buffer *buf,
struct ethosu_core_buffer *cbuf)
{
- cbuf->ptr = (uint32_t)buf->dma_addr + buf->offset;
+ cbuf->ptr = (uint32_t)buf->dma_addr;
cbuf->size = (uint32_t)buf->size;
}
-static void ethosu_core_set_capacity(struct ethosu_buffer *buf,
- struct ethosu_core_buffer *cbuf)
-{
- cbuf->ptr = (uint32_t)buf->dma_addr + buf->offset + buf->size;
- cbuf->size = (uint32_t)buf->capacity - buf->offset - buf->size;
-}
-
int ethosu_mailbox_register(struct ethosu_mailbox *mbox,
struct ethosu_mailbox_msg *msg)
{
@@ -278,7 +270,7 @@ int ethosu_mailbox_inference(struct ethosu_mailbox *mbox,
ethosu_core_set_size(ifm[i], &inf_req->ifm[i]);
for (i = 0; i < ofm_count; i++)
- ethosu_core_set_capacity(ofm[i], &inf_req->ofm[i]);
+ ethosu_core_set_size(ofm[i], &inf_req->ofm[i]);
for (i = 0; i < ETHOSU_CORE_PMU_MAX; i++)
inf_req->pmu_event_config[i] = pmu_event_config[i];