1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
2 /* Copyright (c) 2019 Mellanox Technologies. */
4 #ifndef __MLX5_ECPF_H__
5 #define __MLX5_ECPF_H__
7 #include <linux/mlx5/driver.h>
10 #ifdef CONFIG_MLX5_ESWITCH
13 MLX5_ECPU_BIT_NUM = 23,
16 bool mlx5_read_embedded_cpu(struct mlx5_core_dev *dev);
17 int mlx5_ec_init(struct mlx5_core_dev *dev);
18 void mlx5_ec_cleanup(struct mlx5_core_dev *dev);
20 #else /* CONFIG_MLX5_ESWITCH */
23 mlx5_read_embedded_cpu(struct mlx5_core_dev *dev) { return false; }
24 static inline int mlx5_ec_init(struct mlx5_core_dev *dev) { return 0; }
25 static inline void mlx5_ec_cleanup(struct mlx5_core_dev *dev) {}
27 #endif /* CONFIG_MLX5_ESWITCH */
29 #endif /* __MLX5_ECPF_H__ */