blob: c5c02adc7b201c6c35989166a71fdc63908b0623 [file] [log] [blame]
Mikael Olsson7c843dc2023-08-03 12:41:48 +02001/*
2 * Copyright 2023 Arm Limited and/or its affiliates
3 *
4 * This program is free software and is provided to you under the terms of the
5 * GNU General Public License version 2 as published by the Free Software
6 * Foundation, and any use by you of this program is subject to the terms
7 * of such GNU licence.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, you can access it online at
16 * http://www.gnu.org/licenses/gpl-2.0.html.
17 *
18 * SPDX-License-Identifier: GPL-2.0-only
19 */
20
21#ifndef ETHOSU_VERSION_H
22#define ETHOSU_VERSION_H
23
24/****************************************************************************
25 * Includes
26 ****************************************************************************/
27
28#include "ethosu_mailbox.h"
29
30#include <linux/types.h>
31#include <linux/completion.h>
32
33/****************************************************************************
34 * Types
35 ****************************************************************************/
36
37struct ethosu_core_msg_version_rsp;
38
39/**
40 * struct ethosu_version - Protocol version internal struct
41 */
42struct ethosu_version {
43 struct device *dev;
44 struct completion done;
45 struct ethosu_mailbox_msg msg;
46 int errno;
47};
48
49/****************************************************************************
50 * Functions
51 ****************************************************************************/
52
53void ethosu_version_rsp(struct ethosu_mailbox *mailbox,
54 int msg_id,
55 struct ethosu_core_msg_version_rsp *rsp);
56
57int ethosu_version_check_request(struct device *dev,
58 struct ethosu_mailbox *mailbox);
59
60#endif /* ETHOSU_VERSION_H */