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)17roc_tim_to_tim_priv(struct roc_tim *roc_tim) 18 { 19 return (struct tim *)&roc_tim->reserved[0]; 20 } 21 22 int tim_free_lf_count_get(struct dev *dev, uint16_t *nb_lfs); 23 24 /* TIM IRQ*/ 25 int tim_register_irq_priv(struct roc_tim *roc_tim, 26 struct plt_intr_handle *handle, uint8_t ring_id, 27 uint16_t msix_offset); 28 void tim_unregister_irq_priv(struct roc_tim *roc_tim, 29 struct plt_intr_handle *handle, uint8_t ring_id, 30 uint16_t msix_offset); 31 32 #endif /* _ROC_TIM_PRIV_H_ */ 33