crypto/bcmfs: introduce BCMFS driver
[dpdk.git] / drivers / crypto / bcmfs / bcmfs_device.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2020 Broadcom.
3  * All rights reserved.
4  */
5
6 #ifndef _BCMFS_DEVICE_H_
7 #define _BCMFS_DEVICE_H_
8
9 #include <sys/queue.h>
10
11 #include <rte_bus_vdev.h>
12
13 #include "bcmfs_logs.h"
14
15 /* max number of dev nodes */
16 #define BCMFS_MAX_NODES         4
17 #define BCMFS_MAX_PATH_LEN      512
18 #define BCMFS_DEV_NAME_LEN      64
19
20 /* Path for BCM-Platform device directory */
21 #define SYSFS_BCM_PLTFORM_DEVICES    "/sys/bus/platform/devices"
22
23 #define BCMFS_SYM_FS4_VERSION   0x76303031
24 #define BCMFS_SYM_FS5_VERSION   0x76303032
25
26 /* Supported devices */
27 enum bcmfs_device_type {
28         BCMFS_SYM_FS4,
29         BCMFS_SYM_FS5,
30         BCMFS_UNKNOWN
31 };
32
33 struct bcmfs_device {
34         TAILQ_ENTRY(bcmfs_device) next;
35         /* Directory path for vfio */
36         char dirname[BCMFS_MAX_PATH_LEN];
37         /* BCMFS device name */
38         char name[BCMFS_DEV_NAME_LEN];
39         /* Parent vdev */
40         struct rte_vdev_device *vdev;
41 };
42
43 #endif /* _BCMFS_DEVICE_H_ */