diff options
author | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2023-01-04 17:09:28 +0100 |
---|---|---|
committer | Kristofer Jonsson <kristofer.jonsson@arm.com> | 2023-02-02 16:11:45 +0100 |
commit | b42bc0b95dcc5fac60d52e956056fd46bfe2beb9 (patch) | |
tree | 3e739e1d609a669cdfef21ffb302fcfb92423ada /kernel/ethosu_mailbox.c | |
parent | a70bfde653b44763e2f4d230d30aa8382c1ac5f9 (diff) | |
download | ethos-u-linux-driver-stack-b42bc0b95dcc5fac60d52e956056fd46bfe2beb9.tar.gz |
Removing watchdog and reset
Removing watchdog and firmware reset as a preparations for the
migrations to rpmsg.
Change-Id: Ic1053e3f4301ecadbde8c59dbaed437625a0a5ea
Diffstat (limited to 'kernel/ethosu_mailbox.c')
-rw-r--r-- | kernel/ethosu_mailbox.c | 58 |
1 files changed, 2 insertions, 56 deletions
diff --git a/kernel/ethosu_mailbox.c b/kernel/ethosu_mailbox.c index b5cde0d..870a4ef 100644 --- a/kernel/ethosu_mailbox.c +++ b/kernel/ethosu_mailbox.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022 Arm Limited. + * Copyright 2020-2023 Arm Limited and/or its affiliates * * 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 @@ -27,7 +27,6 @@ #include "ethosu_buffer.h" #include "ethosu_core_interface.h" #include "ethosu_device.h" -#include "ethosu_watchdog.h" #include <linux/jiffies.h> #include <linux/resource.h> @@ -49,36 +48,6 @@ * Functions ****************************************************************************/ -static void ethosu_wd_inc(struct ethosu_mailbox *mbox, - enum ethosu_core_msg_type type) -{ - switch (type) { - case ETHOSU_CORE_MSG_PING: - mbox->ping_count++; - fallthrough; - case ETHOSU_CORE_MSG_INFERENCE_REQ: - ethosu_watchdog_inc(mbox->wdog); - break; - default: - break; - } -} - -static void ethosu_wd_dec(struct ethosu_mailbox *mbox, - enum ethosu_core_msg_type type) -{ - switch (type) { - case ETHOSU_CORE_MSG_PONG: - mbox->ping_count--; - fallthrough; - case ETHOSU_CORE_MSG_INFERENCE_RSP: - ethosu_watchdog_dec(mbox->wdog); - break; - default: - break; - } -} - static void ethosu_core_set_size(struct ethosu_buffer *buf, struct ethosu_core_buffer *cbuf) { @@ -164,8 +133,6 @@ static int ethosu_queue_write_msg(struct ethosu_mailbox *mbox, if (ret) return ret; - ethosu_wd_inc(mbox, type); - return 0; } @@ -278,8 +245,6 @@ int ethosu_mailbox_read(struct ethosu_mailbox *mbox, return -EBADMSG; } - ethosu_wd_dec(mbox, header->type); - return 0; } @@ -321,22 +286,6 @@ void ethosu_mailbox_fail(struct ethosu_mailbox *mbox) } } -void ethosu_mailbox_resend(struct ethosu_mailbox *mbox) -{ - struct ethosu_mailbox_msg *cur; - int id; - int ret; - - idr_for_each_entry(&mbox->msg_idr, cur, id) { - ret = cur->resend(cur); - if (ret) { - dev_warn(mbox->dev, "Failed to resend msg. ret=%d", - ret); - cur->fail(cur); - } - } -} - int ethosu_mailbox_ping(struct ethosu_mailbox *mbox) { return ethosu_queue_write_msg(mbox, ETHOSU_CORE_MSG_PING, NULL, 0); @@ -481,16 +430,13 @@ int ethosu_mailbox_init(struct ethosu_mailbox *mbox, struct resource *in_queue, struct resource *out_queue, ethosu_mailbox_cb callback, - void *user_arg, - struct ethosu_watchdog *wdog) + void *user_arg) { int ret; mbox->dev = dev; mbox->callback = callback; mbox->user_arg = user_arg; - mbox->wdog = wdog; - mbox->ping_count = 0; idr_init(&mbox->msg_idr); mbox->client.dev = dev; |