1 /* SPDX-License-Identifier: GPL-2.0-only
2  * Copyright (C) 2020 Marvell.
3  */
4 
5 #ifndef __OTX2_CPTVF_H
6 #define __OTX2_CPTVF_H
7 
8 #include "mbox.h"
9 #include "otx2_cptlf.h"
10 
11 struct otx2_cptvf_dev {
12 	void __iomem *reg_base;		/* Register start address */
13 	void __iomem *pfvf_mbox_base;	/* PF-VF mbox start address */
14 	struct pci_dev *pdev;		/* PCI device handle */
15 	struct otx2_cptlfs_info lfs;	/* CPT LFs attached to this VF */
16 	u8 vf_id;			/* Virtual function index */
17 
18 	/* PF <=> VF mbox */
19 	struct otx2_mbox	pfvf_mbox;
20 	struct work_struct	pfvf_mbox_work;
21 	struct workqueue_struct *pfvf_mbox_wq;
22 };
23 
24 irqreturn_t otx2_cptvf_pfvf_mbox_intr(int irq, void *arg);
25 void otx2_cptvf_pfvf_mbox_handler(struct work_struct *work);
26 int otx2_cptvf_send_eng_grp_num_msg(struct otx2_cptvf_dev *cptvf, int eng_type);
27 int otx2_cptvf_send_kvf_limits_msg(struct otx2_cptvf_dev *cptvf);
28 
29 #endif /* __OTX2_CPTVF_H */
30