event/octeontx: probe timvf PCIe devices
[dpdk.git] / drivers / event / octeontx / timvf_evdev.h
1 /*
2  * SPDX-License-Identifier: BSD-3-Clause
3  * Copyright(c) 2017 Cavium, Inc
4  */
5
6 #ifndef __TIMVF_EVDEV_H__
7 #define __TIMVF_EVDEV_H__
8
9 #include <rte_common.h>
10
11 #include <octeontx_mbox.h>
12
13 #define timvf_log(level, fmt, args...) \
14         rte_log(RTE_LOG_ ## level, otx_logtype_timvf, \
15                         "[%s] %s() " fmt "\n", \
16                         RTE_STR(event_timer_octeontx), __func__, ## args)
17
18 #define timvf_log_info(fmt, ...) timvf_log(INFO, fmt, ##__VA_ARGS__)
19 #define timvf_log_dbg(fmt, ...) timvf_log(DEBUG, fmt, ##__VA_ARGS__)
20 #define timvf_log_err(fmt, ...) timvf_log(ERR, fmt, ##__VA_ARGS__)
21 #define timvf_func_trace timvf_log_dbg
22
23 extern int otx_logtype_timvf;
24
25 struct timvf_info {
26         uint16_t domain; /* Domain id */
27         uint8_t total_timvfs; /* Total timvf available in domain */
28 };
29
30 int timvf_info(struct timvf_info *tinfo);
31 void *timvf_bar(uint8_t id, uint8_t bar);
32
33 #endif /* __TIMVF_EVDEV_H__ */