Skip to contentSkip to conversation

staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl

PATCH Superseded Roy Pledge 5 participants 9 messages Jul 5, 2018 – Jul 18, 2018

Subsystems (5)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Roy Pledge

author
#0 lore raw

cover staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl

Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio directory to the drivers/soc/fsl directory.

The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 Ethernet device driver from the staging directory.

Roy Pledge (2):
staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl drivers/staging: Remove fsl-mc driver from staging

 MAINTAINERS                                              |  2 +-
 drivers/crypto/caam/sg_sw_qm2.h                          |  2 +-
 drivers/crypto/caam/sg_sw_sec4.h                         |  2 +-
 drivers/soc/fsl/Kconfig                                  | 10 ++++++++++
 drivers/soc/fsl/Makefile                                 |  1 +
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile    |  0
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h  |  0
 .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c   |  2 +-
 .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt |  0
 .../{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c  |  2 +-
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c      |  0
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h      |  0
 .../{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c  |  2 +-
 .../{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h  |  2 +-
 drivers/staging/Kconfig                                  |  2 --
 drivers/staging/Makefile                                 |  1 -
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h           |  4 ++--
 drivers/staging/fsl-mc/Kconfig                           |  2 --
 drivers/staging/fsl-mc/Makefile                          |  3 ---
 drivers/staging/fsl-mc/bus/Kconfig                       | 16 ----------------
 drivers/staging/fsl-mc/bus/Makefile                      |  9 ---------
 .../fsl-mc/include => include/soc/fsl}/dpaa2-fd.h        |  0
 .../fsl-mc/include => include/soc/fsl}/dpaa2-global.h    |  0
 .../fsl-mc/include => include/soc/fsl}/dpaa2-io.h        |  0
 24 files changed, 20 insertions(+), 42 deletions(-)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c (99%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h (99%)
 delete mode 100644 drivers/staging/fsl-mc/Kconfig
 delete mode 100644 drivers/staging/fsl-mc/Makefile
 delete mode 100644 drivers/staging/fsl-mc/bus/Kconfig
 delete mode 100644 drivers/staging/fsl-mc/bus/Makefile
 rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h (100%)
 rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h (100%)
 rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h (100%)

--
2.7.4

author
#1 lore raw

PATCH 1/2 staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

Move the NXP DPIO (Datapath I/O Driver) out of the drivers/staging directory and into the drivers/soc/fsl directory.

The DPIO driver enables access to Queue and Buffer Manager (QBMAN) hardware on NXP DPAA2 devices. This is a prerequisite to moving the DPAA2 Ethernet driver out of staging.

---
 MAINTAINERS                                                    |  2 +-
 drivers/crypto/caam/sg_sw_qm2.h                                |  2 +-
 drivers/crypto/caam/sg_sw_sec4.h                               |  2 +-
 drivers/soc/fsl/Kconfig                                        | 10 ++++++++++
 drivers/soc/fsl/Makefile                                       |  1 +
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile          |  0
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h        |  0
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c     |  2 +-
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt   |  0
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c    |  2 +-
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c            |  0
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h            |  0
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c    |  2 +-
 drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h    |  2 +-
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h                 |  4 ++--
 drivers/staging/fsl-mc/bus/Kconfig                             |  9 ---------
 drivers/staging/fsl-mc/bus/Makefile                            |  2 --
 {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h |  0
 .../staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h  |  0
 {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h |  0
 20 files changed, 20 insertions(+), 20 deletions(-)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c (99%)
 rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h (99%)
 rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h (100%)
 rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h (100%)
 rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h (100%)
MAINTAINERS +1 -1
index f771ec1..5b41d0d 100644
@@ -4442,7 +4442,7 @@ DPAA2 DATAPATH I/O (DPIO) DRIVER
 M:	Roy Pledge <[email protected]>
 L:	linux-kernel at vger.kernel.org
 S:	Maintained
-F:	drivers/staging/fsl-mc/bus/dpio
+F:	drivers/soc/fsl/dpio
 
 DPAA2 ETHERNET DRIVER
 M:	Ioana Radulescu <[email protected]>
drivers/crypto/caam/sg_sw_qm2.h +1 -1
index 31b4407..b5b4c12 100644
@@ -35,7 +35,7 @@
 #ifndef _SG_SW_QM2_H_
 #define _SG_SW_QM2_H_
 
-#include "../../../drivers/staging/fsl-mc/include/dpaa2-fd.h"
+#include <soc/fsl/dpaa2-fd.h>
 
 static inline void dma_to_qm_sg_one(struct dpaa2_sg_entry *qm_sg_ptr,
 				    dma_addr_t dma, u32 len, u16 offset)
drivers/crypto/caam/sg_sw_sec4.h +1 -1
index e586ffa..dbfa9fc 100644
@@ -12,7 +12,7 @@
 #include "ctrl.h"
 #include "regs.h"
 #include "sg_sw_qm2.h"
-#include "../../../drivers/staging/fsl-mc/include/dpaa2-fd.h"
+#include <soc/fsl/dpaa2-fd.h>
 
 struct sec4_sg_entry {
 	u64 ptr;
drivers/soc/fsl/Kconfig +10 -0
index 7a9fb9b..c17bf38 100644
@@ -16,3 +16,13 @@ config FSL_GUTS
 	  Initially only reading SVR and registering soc device are supported.
 	  Other guts accesses, such as reading RCW, should eventually be moved
 	  into this driver as well.
+
+config FSL_MC_DPIO
+        tristate "QorIQ DPAA2 DPIO driver"
+        depends on FSL_MC_BUS
+        help
+	  Driver for the DPAA2 DPIO object.  A DPIO provides queue and
+	  buffer management facilities for software to interact with
+	  other DPAA2 objects. This driver does not expose the DPIO
+	  objects individually, but groups them under a service layer
+	  API.
drivers/soc/fsl/Makefile +1 -0
index 44b3beb..803ef1b 100644
@@ -6,3 +6,4 @@ obj-$(CONFIG_FSL_DPAA)                 += qbman/
 obj-$(CONFIG_QUICC_ENGINE)		+= qe/
 obj-$(CONFIG_CPM)			+= qe/
 obj-$(CONFIG_FSL_GUTS)			+= guts.o
+obj-$(CONFIG_FSL_MC_DPIO) 		+= dpio/
drivers/soc/fsl/dpio/Makefile renamed from drivers/staging/fsl-mc/bus/dpio/Makefile +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/Makefile
rename to drivers/soc/fsl/dpio/Makefile
drivers/soc/fsl/dpio/dpio-cmd.h renamed from drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h
rename to drivers/soc/fsl/dpio/dpio-cmd.h
drivers/soc/fsl/dpio/dpio-driver.c renamed from drivers/staging/fsl-mc/bus/dpio/dpio-driver.c +1 -1
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
rename to drivers/soc/fsl/dpio/dpio-driver.c
index 11a90a9..b60b77b 100644
@@ -16,7 +16,7 @@
 #include <linux/io.h>
 
 #include <linux/fsl/mc.h>
-#include "../../include/dpaa2-io.h"
+#include <soc/fsl/dpaa2-io.h>
 
 #include "qbman-portal.h"
 #include "dpio.h"
drivers/soc/fsl/dpio/dpio-driver.txt renamed from drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt
rename to drivers/soc/fsl/dpio/dpio-driver.txt
drivers/soc/fsl/dpio/dpio-service.c renamed from drivers/staging/fsl-mc/bus/dpio/dpio-service.c +1 -1
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dpio/dpio-service.c
rename to drivers/soc/fsl/dpio/dpio-service.c
index 14ed2be..9b17f72 100644
@@ -6,7 +6,7 @@
  */
 #include <linux/types.h>
 #include <linux/fsl/mc.h>
-#include "../../include/dpaa2-io.h"
+#include <soc/fsl/dpaa2-io.h>
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
drivers/soc/fsl/dpio/dpio.c renamed from drivers/staging/fsl-mc/bus/dpio/dpio.c +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio.c
rename to drivers/soc/fsl/dpio/dpio.c
drivers/soc/fsl/dpio/dpio.h renamed from drivers/staging/fsl-mc/bus/dpio/dpio.h +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio.h
rename to drivers/soc/fsl/dpio/dpio.h
drivers/soc/fsl/dpio/qbman-portal.c renamed from drivers/staging/fsl-mc/bus/dpio/qbman-portal.c +1 -1
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
rename to drivers/soc/fsl/dpio/qbman-portal.c
index 116fafb..cf1d448 100644
@@ -8,7 +8,7 @@
 #include <asm/cacheflush.h>
 #include <linux/io.h>
 #include <linux/slab.h>
-#include "../../include/dpaa2-global.h"
+#include <soc/fsl/dpaa2-global.h>
 
 #include "qbman-portal.h"
 
drivers/soc/fsl/dpio/qbman-portal.h renamed from drivers/staging/fsl-mc/bus/dpio/qbman-portal.h +1 -1
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dpio/qbman-portal.h
rename to drivers/soc/fsl/dpio/qbman-portal.h
index 69db3c8..89d1dd9 100644
@@ -7,7 +7,7 @@
 #ifndef __FSL_QBMAN_PORTAL_H
 #define __FSL_QBMAN_PORTAL_H
 
-#include "../../include/dpaa2-fd.h"
+#include <soc/fsl/dpaa2-fd.h>
 
 struct dpaa2_dq;
 struct qbman_swp;
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +2 -2
index 905a4e6..824dcd5 100644
@@ -37,8 +37,8 @@
 #include <linux/if_vlan.h>
 #include <linux/fsl/mc.h>
 
-#include "../../fsl-mc/include/dpaa2-io.h"
-#include "../../fsl-mc/include/dpaa2-fd.h"
+#include <soc/fsl/dpaa2-io.h>
+#include <soc/fsl/dpaa2-fd.h>
 #include "dpni.h"
 #include "dpni-cmd.h"
 
drivers/staging/fsl-mc/bus/Kconfig +0 -9
index 3424530..90f234d 100644
@@ -5,12 +5,3 @@
 # Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
 #
 
-config FSL_MC_DPIO
-        tristate "QorIQ DPAA2 DPIO driver"
-        depends on FSL_MC_BUS
-        help
-	  Driver for the DPAA2 DPIO object.  A DPIO provides queue and
-	  buffer management facilities for software to interact with
-	  other DPAA2 objects. This driver does not expose the DPIO
-	  objects individually, but groups them under a service layer
-	  API.
drivers/staging/fsl-mc/bus/Makefile +0 -2
index 21d8ebc..2141e4b 100644
@@ -5,5 +5,3 @@
 # Copyright (C) 2014 Freescale Semiconductor, Inc.
 #
 
-# MC DPIO driver
-obj-$(CONFIG_FSL_MC_DPIO) += dpio/
include/soc/fsl/dpaa2-fd.h renamed from drivers/staging/fsl-mc/include/dpaa2-fd.h +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpaa2-fd.h
rename to include/soc/fsl/dpaa2-fd.h
include/soc/fsl/dpaa2-global.h renamed from drivers/staging/fsl-mc/include/dpaa2-global.h +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpaa2-global.h
rename to include/soc/fsl/dpaa2-global.h
include/soc/fsl/dpaa2-io.h renamed from drivers/staging/fsl-mc/include/dpaa2-io.h +0 -0
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpaa2-io.h
rename to include/soc/fsl/dpaa2-io.h
Signature · 1 line
2.7.4
author
#5 lore raw

PATCH 2/2 drivers/staging: Remove fsl-mc driver from staging

In reply to Roy Pledge

Remove the staging/drivers/fsl-mc directory from the staging area now that all the components have been moved to the main kernel areas.

---
 drivers/staging/Kconfig             | 2 --
 drivers/staging/Makefile            | 1 -
 drivers/staging/fsl-mc/Kconfig      | 2 --
 drivers/staging/fsl-mc/Makefile     | 3 ---
 drivers/staging/fsl-mc/bus/Kconfig  | 7 -------
 drivers/staging/fsl-mc/bus/Makefile | 7 -------
 6 files changed, 22 deletions(-)
 delete mode 100644 drivers/staging/fsl-mc/Kconfig
 delete mode 100644 drivers/staging/fsl-mc/Makefile
 delete mode 100644 drivers/staging/fsl-mc/bus/Kconfig
 delete mode 100644 drivers/staging/fsl-mc/bus/Makefile
drivers/staging/Kconfig +0 -2
index 9339af2..344fcf1 100644
@@ -90,8 +90,6 @@ source "drivers/staging/clocking-wizard/Kconfig"
 
 source "drivers/staging/fbtft/Kconfig"
 
-source "drivers/staging/fsl-mc/Kconfig"
-
 source "drivers/staging/fsl-dpaa2/Kconfig"
 
 source "drivers/staging/wilc1000/Kconfig"
drivers/staging/Makefile +0 -1
index aa40b1f..2a84679 100644
@@ -35,7 +35,6 @@ obj-$(CONFIG_GS_FPGABOOT)	+= gs_fpgaboot/
 obj-$(CONFIG_UNISYSSPAR)	+= unisys/
 obj-$(CONFIG_COMMON_CLK_XLNX_CLKWZRD)	+= clocking-wizard/
 obj-$(CONFIG_FB_TFT)		+= fbtft/
-obj-$(CONFIG_FSL_MC_BUS)	+= fsl-mc/
 obj-$(CONFIG_FSL_DPAA2)		+= fsl-dpaa2/
 obj-$(CONFIG_WILC1000)		+= wilc1000/
 obj-$(CONFIG_MOST)		+= most/
drivers/staging/fsl-mc/Kconfig deleted +0 -2
deleted file mode 100644
index 3002229..0000000
@@ -1,2 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-source "drivers/staging/fsl-mc/bus/Kconfig"
drivers/staging/fsl-mc/Makefile deleted +0 -3
deleted file mode 100644
index 1468388..0000000
@@ -1,3 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-# Freescale Management Complex (MC) bus drivers
-obj-$(CONFIG_FSL_MC_BUS)	+= bus/
drivers/staging/fsl-mc/bus/Kconfig deleted +0 -7
deleted file mode 100644
index 90f234d..0000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# DPAA2 fsl-mc bus
-#
-# Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
-#
-
drivers/staging/fsl-mc/bus/Makefile deleted +0 -7
deleted file mode 100644
index 2141e4b..0000000
@@ -1,7 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Freescale Management Complex (MC) bus drivers
-#
-# Copyright (C) 2014 Freescale Semiconductor, Inc.
-#
-
Signature · 1 line
2.7.4
maintainer
#6 lore raw
In reply to Roy Pledge
Quoted 7 lines · Roy Pledge

Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio directory to the drivers/soc/fsl directory.

The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 Ethernet device driver from the staging directory.

Roy, Ioana,

Would it be ok to add the following patch on top of the series? It's a dependency for dpseci object.
If not added now I fear it won't be accepted until dpaa2-ethernet moves out of staging, thus gating dpseci upstreaming.

Thanks,
Horia

--->8---
Previous commits:
6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") added bits that are not specific to the WRIOP accelerator.

Move these where they belong (in DPIO) such that other accelerators can make use of them.

---
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c |  4 ++--
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +++++-------------
 drivers/staging/fsl-mc/include/dpaa2-fd.h      | 12 ++++++++++++
 3 files changed, 19 insertions(+), 15 deletions(-)
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +2 -2
index 396371728aa1..d5f0ac5c2d1f 100644
@@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv,
 	dpaa2_fd_set_format(fd, dpaa2_fd_sg);
 	dpaa2_fd_set_addr(fd, addr);
 	dpaa2_fd_set_len(fd, skb->len);
-	dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1);
+	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
 
 	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
 		enable_tx_tstamp(fd, sgt_buf);
@@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv,
 	dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start));
 	dpaa2_fd_set_len(fd, skb->len);
 	dpaa2_fd_set_format(fd, dpaa2_fd_single);
-	dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1);
+	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
 
 	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
 		enable_tx_tstamp(fd, buffer_start);
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +5 -13
index 905a4e6be8fa..9269cb05a84b 100644
@@ -124,21 +124,13 @@ struct dpaa2_eth_swa {
 #define DPAA2_FD_FRC_FAICFDV		0x0400
 
 /* Error bits in FD CTRL */
-#define DPAA2_FD_CTRL_UFD		0x00000004
-#define DPAA2_FD_CTRL_SBE		0x00000008
-#define DPAA2_FD_CTRL_FSE		0x00000020
-#define DPAA2_FD_CTRL_FAERR		0x00000040
-
-#define DPAA2_FD_RX_ERR_MASK		(DPAA2_FD_CTRL_SBE	| \
-					 DPAA2_FD_CTRL_FAERR)
-#define DPAA2_FD_TX_ERR_MASK		(DPAA2_FD_CTRL_UFD	| \
-					 DPAA2_FD_CTRL_SBE	| \
-					 DPAA2_FD_CTRL_FSE	| \
-					 DPAA2_FD_CTRL_FAERR)
+#define DPAA2_FD_RX_ERR_MASK		(FD_CTRL_SBE | FD_CTRL_FAERR)
+#define DPAA2_FD_TX_ERR_MASK		(FD_CTRL_UFD	| \
+					 FD_CTRL_SBE	| \
+					 FD_CTRL_FSE	| \
+					 FD_CTRL_FAERR)
 
 /* Annotation bits in FD CTRL */
-#define DPAA2_FD_CTRL_PTA		0x00800000
-#define DPAA2_FD_CTRL_PTV1		0x00400000
 #define DPAA2_FD_CTRL_ASAL		0x00020000	/* ASAL = 128B */
 
 /* Frame annotation status */
drivers/staging/fsl-mc/include/dpaa2-fd.h +12 -0
index b55b89ba4eda..2576abaa7779 100644
@@ -67,6 +67,18 @@ struct dpaa2_fd {
 #define SG_FINAL_FLAG_MASK	0x1
 #define SG_FINAL_FLAG_SHIFT	15
 
+/* Error bits in FD CTRL */
+#define FD_CTRL_ERR_MASK	0x000000FF
+#define FD_CTRL_UFD		0x00000004
+#define FD_CTRL_SBE		0x00000008
+#define FD_CTRL_FLC		0x00000010
+#define FD_CTRL_FSE		0x00000020
+#define FD_CTRL_FAERR		0x00000040
+
+/* Annotation bits in FD CTRL */
+#define FD_CTRL_PTA		0x00800000
+#define FD_CTRL_PTV1		0x00400000
+
 enum dpaa2_fd_format {
 	dpaa2_fd_single = 0,
 	dpaa2_fd_list,
Signature · 1 line
2.16.2
author
#7 lore raw
Quoted 10 lines · Horia Geanta
Quoted 7 lines · Roy Pledge

Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-mc/bus/dpio directory to the drivers/soc/fsl directory.

The DPIO driver enables access to the Queue and Buffer Managemer (QBMAN) hardware of NXP DPAA2 devices. This is a prerequiste for moving the DPAA2 Ethernet device driver from the staging directory.

Roy, Ioana,

Quoted 7 lines

Would it be ok to add the following patch on top of the series? It's a dependency for dpseci object.
If not added now I fear it won't be accepted until dpaa2-ethernet moves out of staging, thus gating dpseci upstreaming.

Thanks,
Horia

I can add this to the series - I will respin and send a v2.

Quoted 93 lines

--->8---
Previous commits:
6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") 39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") added bits that are not specific to the WRIOP accelerator.

Move these where they belong (in DPIO) such that other accelerators can make use of them.

---
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c |  4 ++--
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +++++-------------
 drivers/staging/fsl-mc/include/dpaa2-fd.h      | 12 ++++++++++++
 3 files changed, 19 insertions(+), 15 deletions(-)
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +2 -2
index 396371728aa1..d5f0ac5c2d1f 100644
@@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv,
 	dpaa2_fd_set_format(fd, dpaa2_fd_sg);
 	dpaa2_fd_set_addr(fd, addr);
 	dpaa2_fd_set_len(fd, skb->len);
-	dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1);
+	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
 
 	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
 		enable_tx_tstamp(fd, sgt_buf);
@@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv *priv,
 	dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start));
 	dpaa2_fd_set_len(fd, skb->len);
 	dpaa2_fd_set_format(fd, dpaa2_fd_single);
-	dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA | DPAA2_FD_CTRL_PTV1);
+	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
 
 	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP)
 		enable_tx_tstamp(fd, buffer_start);
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +5 -13
index 905a4e6be8fa..9269cb05a84b 100644
@@ -124,21 +124,13 @@ struct dpaa2_eth_swa {
 #define DPAA2_FD_FRC_FAICFDV		0x0400
 
 /* Error bits in FD CTRL */
-#define DPAA2_FD_CTRL_UFD		0x00000004
-#define DPAA2_FD_CTRL_SBE		0x00000008
-#define DPAA2_FD_CTRL_FSE		0x00000020
-#define DPAA2_FD_CTRL_FAERR		0x00000040
-
-#define DPAA2_FD_RX_ERR_MASK		(DPAA2_FD_CTRL_SBE	| \
-					 DPAA2_FD_CTRL_FAERR)
-#define DPAA2_FD_TX_ERR_MASK		(DPAA2_FD_CTRL_UFD	| \
-					 DPAA2_FD_CTRL_SBE	| \
-					 DPAA2_FD_CTRL_FSE	| \
-					 DPAA2_FD_CTRL_FAERR)
+#define DPAA2_FD_RX_ERR_MASK		(FD_CTRL_SBE | FD_CTRL_FAERR)
+#define DPAA2_FD_TX_ERR_MASK		(FD_CTRL_UFD	| \
+					 FD_CTRL_SBE	| \
+					 FD_CTRL_FSE	| \
+					 FD_CTRL_FAERR)
 
 /* Annotation bits in FD CTRL */
-#define DPAA2_FD_CTRL_PTA		0x00800000
-#define DPAA2_FD_CTRL_PTV1		0x00400000
 #define DPAA2_FD_CTRL_ASAL		0x00020000	/* ASAL = 128B */
 
 /* Frame annotation status */
drivers/staging/fsl-mc/include/dpaa2-fd.h +12 -0
index b55b89ba4eda..2576abaa7779 100644
@@ -67,6 +67,18 @@ struct dpaa2_fd {
 #define SG_FINAL_FLAG_MASK	0x1
 #define SG_FINAL_FLAG_SHIFT	15
 
+/* Error bits in FD CTRL */
+#define FD_CTRL_ERR_MASK	0x000000FF
+#define FD_CTRL_UFD		0x00000004
+#define FD_CTRL_SBE		0x00000008
+#define FD_CTRL_FLC		0x00000010
+#define FD_CTRL_FSE		0x00000020
+#define FD_CTRL_FAERR		0x00000040
+
+/* Annotation bits in FD CTRL */
+#define FD_CTRL_PTA		0x00800000
+#define FD_CTRL_PTV1		0x00400000
+
 enum dpaa2_fd_format {
 	dpaa2_fd_single = 0,
 	dpaa2_fd_list,
#8 lore raw
Quoted 27 lines

-----Original Message-----
From: Roy Pledge
Sent: Friday, July 6, 2018 9:52 PM
To: Horia Geanta <[email protected]>; devel at driverdev.osuosl.org; linux-arm-kernel at lists.infradead.org; gregkh at linuxfoundation.org; Leo Li <[email protected]>; Ioana Ciocoi Radulescu <[email protected]>
Cc: Laurentiu Tudor <[email protected]>; linux-
kernel at vger.kernel.org; arnd at arndb.de; catalin.marinas at arm.com; robin.murphy at arm.com
Subject: Re: [PATCH 0/2] staging/fsl-mc/bus: Move DPIO from staging to drivers/soc/fsl

Quoted 2 lines · Horia Geanta
Quoted 1 line · Roy Pledge

Move the NXP DPIO (Datapath I/O driver) from the staging/fsl-

mc/bus/dpio

Quoted 3 lines
Quoted 3 lines

directory to the drivers/soc/fsl directory.

The DPIO driver enables access to the Queue and Buffer Managemer

(QBMAN)

Quoted 1 line
Quoted 1 line

hardware of NXP DPAA2 devices. This is a prerequiste for moving the

DPAA2

Quoted 4 lines
Quoted 2 lines

Ethernet device driver from the staging directory.

Roy, Ioana,

Quoted 8 lines
Quoted 7 lines

Would it be ok to add the following patch on top of the series? It's a dependency for dpseci object.
If not added now I fear it won't be accepted until dpaa2-ethernet moves out of staging, thus gating dpseci upstreaming.

Thanks,
Horia

I can add this to the series - I will respin and send a v2.

Roy, when you send the v2 you can also add for this patch:

Quoted 105 lines
Quoted 4 lines

--->8---
Previous commits:
6e2387e8f19ed ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet

driver")

Quoted 6 lines

39163c0ce0f48 ("staging: fsl-dpaa2/eth: Errors checking update") added bits that are not specific to the WRIOP accelerator.

Move these where they belong (in DPIO) such that other accelerators can make use of them.

Review

Quoted 8 lines
---
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c |  4 ++--
 drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h | 18 +++++-------------
 drivers/staging/fsl-mc/include/dpaa2-fd.h      | 12 ++++++++++++
 3 files changed, 19 insertions(+), 15 deletions(-)
(quoted diff) +0 -0

b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c static int build_sg_fd(struct dpaa2_eth_priv *priv, · line 458

Quoted 8 lines

index 396371728aa1..d5f0ac5c2d1f 100644

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +0 -1
@@ -455,7 +455,7 @@ static int build_sg_fd(struct dpaa2_eth_priv *priv,
 	dpaa2_fd_set_format(fd, dpaa2_fd_sg);
 	dpaa2_fd_set_addr(fd, addr);
 	dpaa2_fd_set_len(fd, skb->len);
-	dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA |

DPAA2_FD_CTRL_PTV1);

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c static int build_sg_fd(struct dpaa2_eth_priv *priv,

Quoted 3 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +1 -0
+	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
 
 	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags &

SKBTX_HW_TSTAMP)

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c static int build_single_fd(struct dpaa2_eth_priv

Quoted 2 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +0 -0
 		enable_tx_tstamp(fd, sgt_buf);
@@ -508,7 +508,7 @@ static int build_single_fd(struct dpaa2_eth_priv

*priv,

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c static int build_single_fd(struct dpaa2_eth_priv *priv,

Quoted 4 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +0 -1
 	dpaa2_fd_set_offset(fd, (u16)(skb->data - buffer_start));
 	dpaa2_fd_set_len(fd, skb->len);
 	dpaa2_fd_set_format(fd, dpaa2_fd_single);
-	dpaa2_fd_set_ctrl(fd, DPAA2_FD_CTRL_PTA |

DPAA2_FD_CTRL_PTV1);

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c static int build_sg_fd(struct dpaa2_eth_priv *priv,

Quoted 3 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +1 -0
+	dpaa2_fd_set_ctrl(fd, FD_CTRL_PTA | FD_CTRL_PTV1);
 
 	if (priv->tx_tstamp && skb_shinfo(skb)->tx_flags &

SKBTX_HW_TSTAMP)

Review

Quoted 2 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +0 -0
 		enable_tx_tstamp(fd, buffer_start);
(quoted diff) +0 -0

b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h

Quoted 9 lines

index 905a4e6be8fa..9269cb05a84b 100644

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +0 -2
@@ -124,21 +124,13 @@ struct dpaa2_eth_swa {
 #define DPAA2_FD_FRC_FAICFDV		0x0400
 
 /* Error bits in FD CTRL */
-#define DPAA2_FD_CTRL_UFD		0x00000004
-#define DPAA2_FD_CTRL_SBE		0x00000008

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h struct dpaa2_eth_swa { · line 127

Quoted 10 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +1 -9
-#define DPAA2_FD_CTRL_FSE		0x00000020
-#define DPAA2_FD_CTRL_FAERR		0x00000040
-
-#define DPAA2_FD_RX_ERR_MASK		(DPAA2_FD_CTRL_SBE	| \
-					 DPAA2_FD_CTRL_FAERR)
-#define DPAA2_FD_TX_ERR_MASK		(DPAA2_FD_CTRL_UFD	| \
-					 DPAA2_FD_CTRL_SBE	| \
-					 DPAA2_FD_CTRL_FSE	| \
-					 DPAA2_FD_CTRL_FAERR)
+#define DPAA2_FD_RX_ERR_MASK		(FD_CTRL_SBE |

FD_CTRL_FAERR)

drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h struct dpaa2_eth_swa {

Quoted 9 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +4 -2
+#define DPAA2_FD_TX_ERR_MASK		(FD_CTRL_UFD	| \
+					 FD_CTRL_SBE	| \
+					 FD_CTRL_FSE	| \
+					 FD_CTRL_FAERR)
 
 /* Annotation bits in FD CTRL */
-#define DPAA2_FD_CTRL_PTA		0x00800000
-#define DPAA2_FD_CTRL_PTV1		0x00400000
 #define DPAA2_FD_CTRL_ASAL		0x00020000	/* ASAL =

128B */

drivers/staging/fsl-

Quoted 3 lines
drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h +0 -0
 /* Frame annotation status */
drivers/staging/fsl- renamed from drivers/staging/fsl-mc/include/dpaa2-fd.h +0 -0

mc/include/dpaa2-fd.h

Quoted 22 lines

index b55b89ba4eda..2576abaa7779 100644

drivers/staging/fsl-mc/include/dpaa2-fd.h +12 -0
@@ -67,6 +67,18 @@ struct dpaa2_fd {
 #define SG_FINAL_FLAG_MASK	0x1
 #define SG_FINAL_FLAG_SHIFT	15
 
+/* Error bits in FD CTRL */
+#define FD_CTRL_ERR_MASK	0x000000FF
+#define FD_CTRL_UFD		0x00000004
+#define FD_CTRL_SBE		0x00000008
+#define FD_CTRL_FLC		0x00000010
+#define FD_CTRL_FSE		0x00000020
+#define FD_CTRL_FAERR		0x00000040
+
+/* Annotation bits in FD CTRL */
+#define FD_CTRL_PTA		0x00800000
+#define FD_CTRL_PTV1		0x00400000
+
 enum dpaa2_fd_format {
 	dpaa2_fd_single = 0,
 	dpaa2_fd_list,
#2 lore raw

Re: [PATCH 1/2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

In reply to Roy Pledge

Hi Roy,

Couple of comments inline.

Quoted 8 lines · Roy Pledge

Move the NXP DPIO (Datapath I/O Driver) out of the drivers/staging directory and into the drivers/soc/fsl directory.

The DPIO driver enables access to Queue and Buffer Manager (QBMAN) hardware on NXP DPAA2 devices. This is a prerequisite to moving the DPAA2 Ethernet driver out of staging.

Quoted 10 lines
---
  MAINTAINERS                                                    |  2 +-
  drivers/crypto/caam/sg_sw_qm2.h                                |  2 +-
  drivers/crypto/caam/sg_sw_sec4.h                               |  2 +-
  drivers/soc/fsl/Kconfig                                        | 10 ++++++++++
  drivers/soc/fsl/Makefile                                       |  1 +
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile          |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h        |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c     |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt   |  0

Maybe this should be converted to .rst and go in the already existing Documentation/networking/dpaa2/?

Quoted 12 lines
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c    |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c            |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h            |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c    |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h    |  2 +-
  drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h                 |  4 ++--
  drivers/staging/fsl-mc/bus/Kconfig                             |  9 ---------
  drivers/staging/fsl-mc/bus/Makefile                            |  2 --
  {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h |  0
  .../staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h  |  0
  {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h |  0
  20 files changed, 20 insertions(+), 20 deletions(-)
Quoted 12 lines

rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h (99%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h (100%)

I received feedback in the past on mc-bus that a driver should limit to only one public header and one private one. Would it make sense to do the same for dpio too?

---
Best Regards, Laurentiu

author
#3 lore raw

Re: [PATCH 1/2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

Quoted 23 lines · Laurentiu Tudor

Hi Roy,

Couple of comments inline.

Quoted 8 lines · Roy Pledge

Move the NXP DPIO (Datapath I/O Driver) out of the drivers/staging directory and into the drivers/soc/fsl directory.

The DPIO driver enables access to Queue and Buffer Manager (QBMAN) hardware on NXP DPAA2 devices. This is a prerequisite to moving the DPAA2 Ethernet driver out of staging.

Quoted 10 lines
---
  MAINTAINERS                                                    |  2 +-
  drivers/crypto/caam/sg_sw_qm2.h                                |  2 +-
  drivers/crypto/caam/sg_sw_sec4.h                               |  2 +-
  drivers/soc/fsl/Kconfig                                        | 10 ++++++++++
  drivers/soc/fsl/Makefile                                       |  1 +
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile          |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h        |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c     |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt   |  0
Quoted 2 lines

Maybe this should be converted to .rst and go in the already existing Documentation/networking/dpaa2/?

I can look into converting this to RST but I'm not sure it belongs in the networking documentation folder since
it will be used by other non networking drivers in the near future - compress/decompress for example.

Quoted 25 lines
Quoted 13 lines
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c    |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c            |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h            |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c    |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h    |  2 +-
  drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h                 |  4 ++--
  drivers/staging/fsl-mc/bus/Kconfig                             |  9 ---------
  drivers/staging/fsl-mc/bus/Makefile                            |  2 --
  {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h |  0
  .../staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h  |  0
  {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h |  0
  20 files changed, 20 insertions(+), 20 deletions(-)
Quoted 12 lines

rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h (99%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h (100%) rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h (100%)

Quoted 3 lines

I received feedback in the past on mc-bus that a driver should limit to only one public header and one private one. Would it make sense to do the same for dpio too?

Looking at this the dpaa-2global.h file should probably be integrated into the dpaa2-io.h file.
The dpaaa2-fd.h can be used by devices that don't need to used DPIO - the definition of a frame descriptor
isn't DPIO specific so I would argue it should be kept in a seperate file.

Quoted 3 lines

---
Best Regards, Laurentiu

#4 lore raw

RE: [PATCH 1/2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

Quoted 75 lines

-----Original Message-----
From: Roy Pledge
Sent: Monday, July 9, 2018 10:24 AM
To: Laurentiu Tudor <[email protected]>;
devel at driverdev.osuosl.org; linux-arm-kernel at lists.infradead.org; gregkh at linuxfoundation.org; Leo Li <[email protected]>
Cc: Ioana Ciocoi Radulescu <[email protected]>; Horia Geanta <[email protected]>; linux-kernel at vger.kernel.org; arnd at arndb.de; catalin.marinas at arm.com; robin.murphy at arm.com
Subject: Re: [PATCH 1/2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

Quoted 23 lines · Laurentiu Tudor

Hi Roy,

Couple of comments inline.

Quoted 8 lines · Roy Pledge

Move the NXP DPIO (Datapath I/O Driver) out of the drivers/staging directory and into the drivers/soc/fsl directory.

The DPIO driver enables access to Queue and Buffer Manager (QBMAN) hardware on NXP DPAA2 devices. This is a prerequisite to moving the DPAA2 Ethernet driver out of staging.

Quoted 10 lines
---
  MAINTAINERS                                                    |  2 +-
  drivers/crypto/caam/sg_sw_qm2.h                                |  2 +-
  drivers/crypto/caam/sg_sw_sec4.h                               |  2 +-
  drivers/soc/fsl/Kconfig                                        | 10 ++++++++++
  drivers/soc/fsl/Makefile                                       |  1 +
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile          |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h        |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c     |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt   |  0
Quoted 2 lines

Maybe this should be converted to .rst and go in the already existing Documentation/networking/dpaa2/?

I can look into converting this to RST but I'm not sure it belongs in the networking documentation folder since it will be used by other non networking drivers in the near future - compress/decompress for example.

Quoted 17 lines
Quoted 13 lines
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c    |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c            |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h            |  0
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c    |  2 +-
  drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h    |  2 +-
  drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h                 |  4 ++--
  drivers/staging/fsl-mc/bus/Kconfig                             |  9 ---------
  drivers/staging/fsl-mc/bus/Makefile                            |  2 --
  {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h |  0
  .../staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h  |  0
  {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h |  0
  20 files changed, 20 insertions(+), 20 deletions(-)
Quoted 4 lines

rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/Makefile (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-cmd.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-driver.txt

(100%)

Quoted 4 lines
Quoted 4 lines

rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio-service.c (99%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.c (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/dpio.h (100%) rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.c

(99%)

Quoted 1 line
Quoted 1 line

rename drivers/{staging/fsl-mc/bus => soc/fsl}/dpio/qbman-portal.h

(99%)

Quoted 1 line
Quoted 1 line

rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h

(100%)

Quoted 1 line
Quoted 1 line

rename {drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-

global.h (100%)

Quoted 2 lines
Quoted 2 lines

rename {drivers/staging/fsl-mc/include =>
include/soc/fsl}/dpaa2-io.h (100%)

Quoted 8 lines
Quoted 3 lines

I received feedback in the past on mc-bus that a driver should limit to only one public header and one private one. Would it make sense to do the same for dpio too?

Looking at this the dpaa-2global.h file should probably be integrated into the dpaa2-io.h file.
The dpaaa2-fd.h can be used by devices that don't need to used DPIO - the definition of a frame descriptor isn't DPIO specific so I would argue it should be kept in a seperate file.

Hi Roy,

Will there be a re-spin of the patch soon so that we can probably catch the next merge window?

Regards,
Leo