otx2_cptvf.h 1014 B

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