blob: aa8083547c61b7dcb84f6a4889c98e3da5529f28 [file] [log] [blame]
Mikael Olsson7c843dc2023-08-03 12:41:48 +02001/*
Mikael Olssond4ad9e52024-02-07 11:22:26 +01002 * SPDX-FileCopyrightText: Copyright 2023-2024 Arm Limited and/or its affiliates <open-source-office@arm.com>
3 * SPDX-License-Identifier: GPL-2.0-only
Mikael Olsson7c843dc2023-08-03 12:41:48 +02004 *
5 * This program is free software and is provided to you under the terms of the
6 * GNU General Public License version 2 as published by the Free Software
7 * Foundation, and any use by you of this program is subject to the terms
8 * of such GNU licence.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, you can access it online at
17 * http://www.gnu.org/licenses/gpl-2.0.html.
Mikael Olsson7c843dc2023-08-03 12:41:48 +020018 */
19
Mikael Olsson16be2852024-02-12 09:56:56 +010020#ifndef ETHOSU_RPMSG_VERSION_H
21#define ETHOSU_RPMSG_VERSION_H
Mikael Olsson7c843dc2023-08-03 12:41:48 +020022
23/****************************************************************************
24 * Includes
25 ****************************************************************************/
26
Mikael Olssond4ad9e52024-02-07 11:22:26 +010027#include <rpmsg/ethosu_rpmsg_mailbox.h>
Mikael Olsson7c843dc2023-08-03 12:41:48 +020028
29#include <linux/types.h>
30#include <linux/completion.h>
31
32/****************************************************************************
33 * Types
34 ****************************************************************************/
35
Mikael Olsson16be2852024-02-12 09:56:56 +010036struct ethosu_rpmsg_version_rsp;
Mikael Olsson7c843dc2023-08-03 12:41:48 +020037
38/**
Mikael Olsson16be2852024-02-12 09:56:56 +010039 * struct ethosu_rpmsg_version - Protocol version internal struct
Mikael Olsson7c843dc2023-08-03 12:41:48 +020040 */
Mikael Olsson16be2852024-02-12 09:56:56 +010041struct ethosu_rpmsg_version {
42 struct device *dev;
43 struct completion done;
44 struct ethosu_rpmsg_mailbox_msg msg;
45 int errno;
Mikael Olsson7c843dc2023-08-03 12:41:48 +020046};
47
48/****************************************************************************
49 * Functions
50 ****************************************************************************/
51
Mikael Olsson16be2852024-02-12 09:56:56 +010052void ethosu_rpmsg_version_rsp(struct ethosu_rpmsg_mailbox *mailbox,
53 int msg_id,
54 struct ethosu_rpmsg_version_rsp *rsp);
Mikael Olsson7c843dc2023-08-03 12:41:48 +020055
Mikael Olsson16be2852024-02-12 09:56:56 +010056int ethosu_rpmsg_version_check_request(struct device *dev,
57 struct ethosu_rpmsg_mailbox *mailbox);
Mikael Olsson7c843dc2023-08-03 12:41:48 +020058
Mikael Olsson16be2852024-02-12 09:56:56 +010059#endif /* ETHOSU_RPMSG_VERSION_H */