Add a new header file for the PCIe module.
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
drivers/net/nfp/meson.build | 2 +-
.../nfpcore/{nfp_cpp_pcie_ops.c => nfp6000_pcie.c} | 2 ++
drivers/net/nfp/nfpcore/nfp6000_pcie.h | 13 +++++++++++++
drivers/net/nfp/nfpcore/nfp_cpp.h | 6 ------
drivers/net/nfp/nfpcore/nfp_cppcore.c | 2 +-
5 files changed, 17 insertions(+), 8 deletions(-)
rename drivers/net/nfp/nfpcore/{nfp_cpp_pcie_ops.c => nfp6000_pcie.c} (99%)
create mode 100644 drivers/net/nfp/nfpcore/nfp6000_pcie.h
@@ -12,7 +12,6 @@ sources = files(
'flower/nfp_flower_representor.c',
'nfd3/nfp_nfd3_dp.c',
'nfdk/nfp_nfdk_dp.c',
- 'nfpcore/nfp_cpp_pcie_ops.c',
'nfpcore/nfp_nsp.c',
'nfpcore/nfp_cppcore.c',
'nfpcore/nfp_resource.c',
@@ -26,6 +25,7 @@ sources = files(
'nfpcore/nfp_nsp_eth.c',
'nfpcore/nfp_hwinfo.c',
'nfpcore/nfp_target.c',
+ 'nfpcore/nfp6000_pcie.c',
'nfp_common.c',
'nfp_rxtx.c',
'nfp_cpp_bridge.c',
similarity index 99%
rename from drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
rename to drivers/net/nfp/nfpcore/nfp6000_pcie.c
@@ -14,6 +14,8 @@
* The generic CPP bus abstraction builds upon this BAR interface.
*/
+#include "nfp6000_pcie.h"
+
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
new file mode 100644
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2023 Netronome Systems, Inc.
+ * All rights reserved.
+ */
+
+#ifndef __NFP6000_PCIE_H__
+#define __NFP6000_PCIE_H__
+
+#include "nfp_cpp.h"
+
+const struct nfp_cpp_operations *nfp_cpp_transport_operations(void);
+
+#endif /* __NFP6000_PCIE_H__ */
@@ -226,12 +226,6 @@ NFP_CPP_ID_ISLAND_of(uint32_t id)
return id & 0xff;
}
-/*
- * This should be the only external function the transport
- * module supplies
- */
-const struct nfp_cpp_operations *nfp_cpp_transport_operations(void);
-
void nfp_cpp_model_set(struct nfp_cpp *cpp, uint32_t model);
void nfp_cpp_interface_set(struct nfp_cpp *cpp, uint32_t interface);
@@ -14,12 +14,12 @@
#include <rte_byteorder.h>
#include <ethdev_pci.h>
-#include "nfp_cpp.h"
#include "nfp_logs.h"
#include "nfp_target.h"
#include "nfp6000/nfp6000.h"
#include "nfp6000/nfp_xpb.h"
#include "nfp_nffw.h"
+#include "nfp6000_pcie.h"
#define NFP_PL_DEVICE_ID 0x00000004
#define NFP_PL_DEVICE_ID_MASK 0xff