Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/drivers/crypto/marvell/octeontx/otx_cpt_common.h
26285 views
1
/* SPDX-License-Identifier: GPL-2.0
2
* Marvell OcteonTX CPT driver
3
*
4
* Copyright (C) 2019 Marvell International Ltd.
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation.
9
*/
10
11
#ifndef __OTX_CPT_COMMON_H
12
#define __OTX_CPT_COMMON_H
13
14
#include <linux/types.h>
15
#include <linux/delay.h>
16
#include <linux/device.h>
17
18
#define OTX_CPT_MAX_MBOX_DATA_STR_SIZE 64
19
20
enum otx_cptpf_type {
21
OTX_CPT_AE = 2,
22
OTX_CPT_SE = 3,
23
BAD_OTX_CPTPF_TYPE,
24
};
25
26
enum otx_cptvf_type {
27
OTX_CPT_AE_TYPES = 1,
28
OTX_CPT_SE_TYPES = 2,
29
BAD_OTX_CPTVF_TYPE,
30
};
31
32
/* VF-PF message opcodes */
33
enum otx_cpt_mbox_opcode {
34
OTX_CPT_MSG_VF_UP = 1,
35
OTX_CPT_MSG_VF_DOWN,
36
OTX_CPT_MSG_READY,
37
OTX_CPT_MSG_QLEN,
38
OTX_CPT_MSG_QBIND_GRP,
39
OTX_CPT_MSG_VQ_PRIORITY,
40
OTX_CPT_MSG_PF_TYPE,
41
OTX_CPT_MSG_ACK,
42
OTX_CPT_MSG_NACK
43
};
44
45
/* OcteonTX CPT mailbox structure */
46
struct otx_cpt_mbox {
47
u64 msg; /* Message type MBOX[0] */
48
u64 data;/* Data MBOX[1] */
49
};
50
51
#endif /* __OTX_CPT_COMMON_H */
52
53