summaryrefstree
path: root/kernel/drivers/vision/npu/interface/loopback/mailbox_msg.h
blob: 835daaacd0b86be26d16abe7a10169459516b23f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/*
 * Samsung Exynos SoC series NPU driver
 *
 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
 *	http://www.samsung.com/
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef MAILBOX_MSG_H_
#define MAILBOX_MSG_H_

#define COMMAND_VERSION		1
#define COMMNAD_MAGIC		0xC00DCAFE

enum message_cmd {
	COMMAND_LOAD,
	COMMAND_UNLOAD,
	COMMAND_PROCESS
};

struct message {
	u32			magic_number;
	u32			mid; /* message id */
	u32			command;
	u32			length; /* size in bytes */
	void			*data;
};

struct cmd_load {
	u32			oid; /* object id */
	u32			tid; /* task id */
	u32			length; /* size in bytes, this length includes only header + vector */
	void			*data;
};

struct cmd_unload {
	u32			oid;
	u32			length;
	void			*data;
};

struct cmd_process {
	u32			oid;
	u32			fid; /* frame id */
	u32			length; /* the count of address vector */
	void			*data; /* the pointer of address vector */
};

#endif /* MAILBOX_MSG_H_ */