common/cnxk: support SSO device
[dpdk.git] / drivers / common / cnxk / roc_sso_priv.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2021 Marvell.
3  */
4
5 #ifndef _ROC_SSO_PRIV_H_
6 #define _ROC_SSO_PRIV_H_
7
8 struct sso_rsrc {
9         uint16_t rsrc_id;
10         uint64_t base;
11 };
12
13 struct sso {
14         struct plt_pci_device *pci_dev;
15         struct dev dev;
16 } __plt_cache_aligned;
17
18 enum sso_err_status {
19         SSO_ERR_PARAM = -4096,
20 };
21
22 enum sso_lf_type {
23         SSO_LF_TYPE_HWS,
24         SSO_LF_TYPE_HWGRP,
25 };
26
27 static inline struct sso *
28 roc_sso_to_sso_priv(struct roc_sso *roc_sso)
29 {
30         return (struct sso *)&roc_sso->reserved[0];
31 }
32
33 #endif /* _ROC_SSO_PRIV_H_ */