New upstream version 18.08
[deb_dpdk.git] / drivers / crypto / ccp / ccp_pci.h
1 /*   SPDX-License-Identifier: BSD-3-Clause
2  *   Copyright(c) 2018 Advanced Micro Devices, Inc. All rights reserved.
3  */
4
5 #ifndef _CCP_PCI_H_
6 #define _CCP_PCI_H_
7
8 #include <stdint.h>
9
10 #include <rte_bus_pci.h>
11
12 #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices"
13 #define PROC_MODULES "/proc/modules"
14
15 int ccp_check_pci_uio_module(void);
16
17 int ccp_parse_pci_addr_format(const char *buf, int bufsize, uint16_t *domain,
18                               uint8_t *bus, uint8_t *devid, uint8_t *function);
19
20 int ccp_pci_parse_sysfs_value(const char *filename, unsigned long *val);
21
22 int ccp_pci_parse_sysfs_resource(const char *filename,
23                                  struct rte_pci_device *dev);
24
25 int ccp_find_uio_devname(const char *dirname);
26
27 #endif /* _CCP_PCI_H_ */