xref: /dpdk/drivers/common/cnxk/roc_tim_priv.h (revision 309b553c)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4 
5 #ifndef _ROC_TIM_PRIV_H_
6 #define _ROC_TIM_PRIV_H_
7 
8 struct tim {
9 	uint16_t tim_msix_offsets[MAX_RVU_BLKLF_CNT];
10 };
11 
12 enum tim_err_status {
13 	TIM_ERR_PARAM = -5120,
14 };
15 
16 static inline struct tim *
roc_tim_to_tim_priv(struct roc_tim * roc_tim)17 roc_tim_to_tim_priv(struct roc_tim *roc_tim)
18 {
19 	return (struct tim *)&roc_tim->reserved[0];
20 }
21 
22 /* TIM IRQ*/
23 int tim_register_irq_priv(struct roc_tim *roc_tim,
24 			  struct plt_intr_handle *handle, uint8_t ring_id,
25 			  uint16_t msix_offset);
26 void tim_unregister_irq_priv(struct roc_tim *roc_tim,
27 			     struct plt_intr_handle *handle, uint8_t ring_id,
28 			     uint16_t msix_offset);
29 
30 #endif /* _ROC_TIM_PRIV_H_ */
31