1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
5 #ifndef _ROC_CPT_PRIV_H_
6 #define _ROC_CPT_PRIV_H_
8 /* Set number of hystbits to 6.
9 * This will trigger the FC writes whenever number of outstanding commands in
10 * the queue becomes multiple of 32.
12 #define CPT_FC_NUM_HYST_BITS 6
15 struct plt_pci_device *pci_dev;
17 uint16_t lf_msix_off[ROC_CPT_MAX_LFS];
18 uint8_t lf_blkaddr[ROC_CPT_MAX_LFS];
19 } __plt_cache_aligned;
21 static inline struct cpt *
22 roc_cpt_to_cpt_priv(struct roc_cpt *roc_cpt)
24 return (struct cpt *)&roc_cpt->reserved[0];
27 int cpt_lfs_attach(struct dev *dev, uint8_t blkaddr, bool modify,
29 int cpt_lfs_detach(struct dev *dev);
30 int cpt_lfs_alloc(struct dev *dev, uint8_t eng_grpmsk, uint8_t blk,
32 int cpt_lfs_free(struct dev *dev);
34 int cpt_get_msix_offset(struct dev *dev, struct msix_offset_rsp **msix_rsp);
35 uint64_t cpt_get_blkaddr(struct dev *dev);
37 #endif /* _ROC_CPT_PRIV_H_ */