xref: /linux/drivers/net/ethernet/sfc/efx_cxl.h (revision 91ec2035134982b98fab0609a9fd8480e8217dc1)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /****************************************************************************
3  * Driver for AMD network controllers and boards
4  * Copyright (C) 2025, Advanced Micro Devices, Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published
8  * by the Free Software Foundation, incorporated herein by reference.
9  */
10 
11 #ifndef EFX_CXL_H
12 #define EFX_CXL_H
13 
14 #ifdef CONFIG_SFC_CXL
15 
16 #include <cxl/cxl.h>
17 
18 struct efx_probe_data;
19 
20 struct efx_cxl {
21 	struct cxl_dev_state cxlds;
22 	struct cxl_memdev *cxlmd;
23 	void __iomem *ctpio_cxl;
24 };
25 
26 int efx_cxl_init(struct efx_probe_data *probe_data);
27 void efx_cxl_exit(struct efx_probe_data *probe_data);
28 #else
efx_cxl_init(struct efx_probe_data * probe_data)29 static inline int efx_cxl_init(struct efx_probe_data *probe_data) { return 0; }
efx_cxl_exit(struct efx_probe_data * probe_data)30 static inline void efx_cxl_exit(struct efx_probe_data *probe_data) {}
31 #endif
32 #endif
33