18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci * Marvell OcteonTX CPT driver
38c2ecf20Sopenharmony_ci *
48c2ecf20Sopenharmony_ci * Copyright (C) 2019 Marvell International Ltd.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or modify
78c2ecf20Sopenharmony_ci * it under the terms of the GNU General Public License version 2 as
88c2ecf20Sopenharmony_ci * published by the Free Software Foundation.
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#ifndef __OTX_CPTPF_H
128c2ecf20Sopenharmony_ci#define __OTX_CPTPF_H
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include <linux/types.h>
158c2ecf20Sopenharmony_ci#include <linux/device.h>
168c2ecf20Sopenharmony_ci#include "otx_cptpf_ucode.h"
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci/*
198c2ecf20Sopenharmony_ci * OcteonTX CPT device structure
208c2ecf20Sopenharmony_ci */
218c2ecf20Sopenharmony_cistruct otx_cpt_device {
228c2ecf20Sopenharmony_ci	void __iomem *reg_base; /* Register start address */
238c2ecf20Sopenharmony_ci	struct pci_dev *pdev;	/* Pci device handle */
248c2ecf20Sopenharmony_ci	struct otx_cpt_eng_grps eng_grps;/* Engine groups information */
258c2ecf20Sopenharmony_ci	struct list_head list;
268c2ecf20Sopenharmony_ci	u8 pf_type;	/* PF type SE or AE */
278c2ecf20Sopenharmony_ci	u8 max_vfs;	/* Maximum number of VFs supported by the CPT */
288c2ecf20Sopenharmony_ci	u8 vfs_enabled;	/* Number of enabled VFs */
298c2ecf20Sopenharmony_ci};
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_civoid otx_cpt_mbox_intr_handler(struct otx_cpt_device *cpt, int mbx);
328c2ecf20Sopenharmony_civoid otx_cpt_disable_all_cores(struct otx_cpt_device *cpt);
338c2ecf20Sopenharmony_ci
348c2ecf20Sopenharmony_ci#endif /* __OTX_CPTPF_H */
35