1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
5 #ifndef _ROC_SSO_PRIV_H_
6 #define _ROC_SSO_PRIV_H_
14 struct plt_pci_device *pci_dev;
16 /* Interrupt handler args. */
17 struct sso_rsrc hws_rsrc[MAX_RVU_BLKLF_CNT];
18 struct sso_rsrc hwgrp_rsrc[MAX_RVU_BLKLF_CNT];
20 uint16_t hws_msix_offset[MAX_RVU_BLKLF_CNT];
21 uint16_t hwgrp_msix_offset[MAX_RVU_BLKLF_CNT];
22 /* SSO link mapping. */
23 struct plt_bitmap **link_map;
25 } __plt_cache_aligned;
28 SSO_ERR_PARAM = -4096,
36 static inline struct sso *
37 roc_sso_to_sso_priv(struct roc_sso *roc_sso)
39 return (struct sso *)&roc_sso->reserved[0];
43 int sso_lf_alloc(struct dev *dev, enum sso_lf_type lf_type, uint16_t nb_lf,
45 int sso_lf_free(struct dev *dev, enum sso_lf_type lf_type, uint16_t nb_lf);
46 void sso_hws_link_modify(uint8_t hws, uintptr_t base, struct plt_bitmap *bmp,
47 uint16_t hwgrp[], uint16_t n, uint16_t enable);
48 int sso_hwgrp_alloc_xaq(struct dev *dev, uint32_t npa_aura_id, uint16_t hwgrps);
49 int sso_hwgrp_release_xaq(struct dev *dev, uint16_t hwgrps);
52 int sso_register_irqs_priv(struct roc_sso *roc_sso,
53 struct plt_intr_handle *handle, uint16_t nb_hws,
55 void sso_unregister_irqs_priv(struct roc_sso *roc_sso,
56 struct plt_intr_handle *handle, uint16_t nb_hws,
59 #endif /* _ROC_SSO_PRIV_H_ */