xref: /dpdk/drivers/common/cnxk/roc_ml_priv.h (revision dfcf94749ac9a899eb091bb99ac78d57ed7b215b)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2022 Marvell.
3  */
4 
5 #ifndef _ROC_ML_PRIV_H_
6 #define _ROC_ML_PRIV_H_
7 
8 #include "roc_api.h"
9 
10 struct ml {
11 	struct plt_pci_device *pci_dev;
12 	struct dev dev;
13 	uint8_t *ml_reg_addr;
14 	uint64_t ml_mlr_base;
15 	bool ml_mlr_base_saved;
16 } __plt_cache_aligned;
17 
18 static inline struct ml *
roc_ml_to_ml_priv(struct roc_ml * roc_ml)19 roc_ml_to_ml_priv(struct roc_ml *roc_ml)
20 {
21 	return (struct ml *)&roc_ml->reserved[0];
22 }
23 
24 #endif /* _ROC_ML_PRIV_H_ */
25