| 1 |
/* SPDX-License-Identifier: GPL-2.0 */ |
| 2 |
/* Marvell RVU Admin Function driver |
| 3 |
* |
| 4 |
* Copyright (C) 2024 Marvell. |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
#ifndef CN20K_API_H |
| 9 |
#define CN20K_API_H |
| 10 |
|
| 11 |
#include "../rvu.h" |
| 12 |
|
| 13 |
struct ng_rvu { |
| 14 |
struct mbox_ops *rvu_mbox_ops; |
| 15 |
struct qmem *pf_mbox_addr; |
| 16 |
struct qmem *vf_mbox_addr; |
| 17 |
}; |
| 18 |
|
| 19 |
/* Mbox related APIs */ |
| 20 |
int cn20k_rvu_mbox_init(struct rvu *rvu, int type, int num); |
| 21 |
int cn20k_rvu_get_mbox_regions(struct rvu *rvu, void **mbox_addr, |
| 22 |
int num, int type, unsigned long *pf_bmap); |
| 23 |
void cn20k_free_mbox_memory(struct rvu *rvu); |
| 24 |
int cn20k_register_afpf_mbox_intr(struct rvu *rvu); |
| 25 |
int cn20k_register_afvf_mbox_intr(struct rvu *rvu, int pf_vec_start); |
| 26 |
void cn20k_rvu_enable_mbox_intr(struct rvu *rvu); |
| 27 |
void cn20k_rvu_unregister_interrupts(struct rvu *rvu); |
| 28 |
int cn20k_mbox_setup(struct otx2_mbox *mbox, struct pci_dev *pdev, |
| 29 |
void *reg_base, int direction, int ndevs); |
| 30 |
void cn20k_rvu_enable_afvf_intr(struct rvu *rvu, int vfs); |
| 31 |
void cn20k_rvu_disable_afvf_intr(struct rvu *rvu, int vfs); |
| 32 |
#endif /* CN20K_API_H */ |