[v3,16/25] drivers: move platform module to common library

Message ID 20231026064324.177531-17-chaoyong.he@corigine.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers
Series add the NFP vDPA PMD |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Chaoyong He Oct. 26, 2023, 6:43 a.m. UTC
  Move the platform module to the common library.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/{net/nfp/nfpcore => common/nfp}/nfp_platform.h | 0
 drivers/net/nfp/nfdk/nfp_nfdk_dp.c                     | 2 +-
 drivers/net/nfp/nfp_net_ctrl.c                         | 3 +--
 drivers/net/nfp/nfpcore/nfp_cppcore.c                  | 3 ++-
 drivers/net/nfp/nfpcore/nfp_dev.c                      | 3 +--
 drivers/net/nfp/nfpcore/nfp_nsp.c                      | 2 +-
 drivers/net/nfp/nfpcore/nfp_nsp_eth.c                  | 3 ++-
 7 files changed, 8 insertions(+), 8 deletions(-)
 rename drivers/{net/nfp/nfpcore => common/nfp}/nfp_platform.h (100%)
  

Patch

diff --git a/drivers/net/nfp/nfpcore/nfp_platform.h b/drivers/common/nfp/nfp_platform.h
similarity index 100%
rename from drivers/net/nfp/nfpcore/nfp_platform.h
rename to drivers/common/nfp/nfp_platform.h
diff --git a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
index 3f8d25aa29..10e6982c95 100644
--- a/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
+++ b/drivers/net/nfp/nfdk/nfp_nfdk_dp.c
@@ -6,10 +6,10 @@ 
 #include "nfp_nfdk.h"
 
 #include <bus_pci_driver.h>
+#include <nfp_platform.h>
 #include <rte_malloc.h>
 
 #include "../flower/nfp_flower.h"
-#include "../nfpcore/nfp_platform.h"
 #include "../nfp_logs.h"
 
 #define NFDK_TX_DESC_GATHER_MAX         17
diff --git a/drivers/net/nfp/nfp_net_ctrl.c b/drivers/net/nfp/nfp_net_ctrl.c
index 8848fa38fe..5135a1ad27 100644
--- a/drivers/net/nfp/nfp_net_ctrl.c
+++ b/drivers/net/nfp/nfp_net_ctrl.c
@@ -6,8 +6,7 @@ 
 #include "nfp_net_ctrl.h"
 
 #include <ethdev_pci.h>
-
-#include "nfpcore/nfp_platform.h"
+#include <nfp_platform.h>
 
 #include "nfp_logs.h"
 #include "nfp_net_common.h"
diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c
index f9b08a12b6..0e6045f2f0 100644
--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c
+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c
@@ -5,8 +5,9 @@ 
 
 #include "nfp_cpp.h"
 
+#include <nfp_platform.h>
+
 #include "nfp_logs.h"
-#include "nfp_platform.h"
 #include "nfp_target.h"
 #include "nfp6000/nfp6000.h"
 #include "nfp6000/nfp_xpb.h"
diff --git a/drivers/net/nfp/nfpcore/nfp_dev.c b/drivers/net/nfp/nfpcore/nfp_dev.c
index 7799fa699a..f29b7e0711 100644
--- a/drivers/net/nfp/nfpcore/nfp_dev.c
+++ b/drivers/net/nfp/nfpcore/nfp_dev.c
@@ -5,10 +5,9 @@ 
 
 #include "nfp_dev.h"
 
+#include <nfp_platform.h>
 #include <rte_bitops.h>
 
-#include "nfp_platform.h"
-
 /*
  * Note: The value of 'max_qc_size' is different from kernel driver,
  * because DPDK use 'uint16_t' as the data type.
diff --git a/drivers/net/nfp/nfpcore/nfp_nsp.c b/drivers/net/nfp/nfpcore/nfp_nsp.c
index 5b804f6174..a680b972b8 100644
--- a/drivers/net/nfp/nfpcore/nfp_nsp.c
+++ b/drivers/net/nfp/nfpcore/nfp_nsp.c
@@ -5,10 +5,10 @@ 
 
 #include "nfp_nsp.h"
 
+#include <nfp_platform.h>
 #include <rte_common.h>
 
 #include "nfp_logs.h"
-#include "nfp_platform.h"
 #include "nfp_resource.h"
 
 /* Offsets relative to the CSR base */
diff --git a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c
index cc472907ca..75f6d40fea 100644
--- a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c
+++ b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c
@@ -3,9 +3,10 @@ 
  * All rights reserved.
  */
 
+#include <nfp_platform.h>
+
 #include "nfp_logs.h"
 #include "nfp_nsp.h"
-#include "nfp_platform.h"
 
 #define NSP_ETH_NBI_PORT_COUNT          24
 #define NSP_ETH_MAX_COUNT               (2 * NSP_ETH_NBI_PORT_COUNT)