crypto/nitrox: introduce Nitrox driver
[dpdk.git] / drivers / crypto / nitrox / nitrox_hal.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2019 Marvell International Ltd.
3  */
4
5 #ifndef _NITROX_HAL_H_
6 #define _NITROX_HAL_H_
7
8 #include <rte_cycles.h>
9 #include <rte_byteorder.h>
10
11 #include "nitrox_csr.h"
12
13 union aqmq_qsz {
14         uint64_t u64;
15         struct {
16 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
17                 uint64_t raz : 32;
18                 uint64_t host_queue_size : 32;
19 #else
20                 uint64_t host_queue_size : 32;
21                 uint64_t raz : 32;
22 #endif
23         } s;
24 };
25
26 enum nitrox_vf_mode {
27         NITROX_MODE_PF = 0x0,
28         NITROX_MODE_VF16 = 0x1,
29         NITROX_MODE_VF32 = 0x2,
30         NITROX_MODE_VF64 = 0x3,
31         NITROX_MODE_VF128 = 0x4,
32 };
33
34 int vf_get_vf_config_mode(uint8_t *bar_addr);
35 int vf_config_mode_to_nr_queues(enum nitrox_vf_mode vf_mode);
36
37 #endif /* _NITROX_HAL_H_ */