2018-03-21 14:43:33

by Roy Pledge

[permalink] [raw]
Subject: [v2] 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.

Signed-off-by: Roy Pledge <[email protected]>

---
Changes in v2:
- Fix minor conflict in latest linux-next branch
- Generate patch using -M so patch is smaller
---
MAINTAINERS | 2 +-
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/Makefile | 2 --
{drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-fd.h | 0
{drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-global.h | 0
{drivers/staging/fsl-mc/include => include/soc/fsl}/dpaa2-io.h | 0
16 files changed, 8 insertions(+), 9 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%)

diff --git a/MAINTAINERS b/MAINTAINERS
index dc74106..e2f234c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4375,7 +4375,7 @@ DPAA2 DATAPATH I/O (DPIO) DRIVER
M: Roy Pledge <[email protected]>
L: [email protected]
S: Maintained
-F: drivers/staging/fsl-mc/bus/dpio
+F: drivers/soc/fsl/dpio

DPAA2 ETHERNET DRIVER
M: Ioana Radulescu <[email protected]>
diff --git a/drivers/soc/fsl/Makefile b/drivers/soc/fsl/Makefile
index 44b3beb..803ef1b 100644
--- a/drivers/soc/fsl/Makefile
+++ b/drivers/soc/fsl/Makefile
@@ -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/
diff --git a/drivers/staging/fsl-mc/bus/dpio/Makefile b/drivers/soc/fsl/dpio/Makefile
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/Makefile
rename to drivers/soc/fsl/dpio/Makefile
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h b/drivers/soc/fsl/dpio/dpio-cmd.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio-cmd.h
rename to drivers/soc/fsl/dpio/dpio-cmd.h
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c b/drivers/soc/fsl/dpio/dpio-driver.c
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
rename to drivers/soc/fsl/dpio/dpio-driver.c
index 182b384..732f025 100644
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c
+++ b/drivers/soc/fsl/dpio/dpio-driver.c
@@ -15,7 +15,7 @@
#include <linux/delay.h>

#include <linux/fsl/mc.h>
-#include "../../include/dpaa2-io.h"
+#include <soc/fsl/dpaa2-io.h>

#include "qbman-portal.h"
#include "dpio.h"
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt b/drivers/soc/fsl/dpio/dpio-driver.txt
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio-driver.txt
rename to drivers/soc/fsl/dpio/dpio-driver.txt
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c b/drivers/soc/fsl/dpio/dpio-service.c
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
--- a/drivers/staging/fsl-mc/bus/dpio/dpio-service.c
+++ b/drivers/soc/fsl/dpio/dpio-service.c
@@ -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>
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio.c b/drivers/soc/fsl/dpio/dpio.c
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio.c
rename to drivers/soc/fsl/dpio/dpio.c
diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio.h b/drivers/soc/fsl/dpio/dpio.h
similarity index 100%
rename from drivers/staging/fsl-mc/bus/dpio/dpio.h
rename to drivers/soc/fsl/dpio/dpio.h
diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c b/drivers/soc/fsl/dpio/qbman-portal.c
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
--- a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.c
+++ b/drivers/soc/fsl/dpio/qbman-portal.c
@@ -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"

diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h b/drivers/soc/fsl/dpio/qbman-portal.h
similarity index 99%
rename from drivers/staging/fsl-mc/bus/dpio/qbman-portal.h
rename to drivers/soc/fsl/dpio/qbman-portal.h
index 4488a44..b2eed20 100644
--- a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h
+++ b/drivers/soc/fsl/dpio/qbman-portal.h
@@ -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;
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
index b8990cf..24ae387 100644
--- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
+++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
@@ -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"

diff --git a/drivers/staging/fsl-mc/bus/Makefile b/drivers/staging/fsl-mc/bus/Makefile
index 21d8ebc..2141e4b 100644
--- a/drivers/staging/fsl-mc/bus/Makefile
+++ b/drivers/staging/fsl-mc/bus/Makefile
@@ -5,5 +5,3 @@
# Copyright (C) 2014 Freescale Semiconductor, Inc.
#

-# MC DPIO driver
-obj-$(CONFIG_FSL_MC_DPIO) += dpio/
diff --git a/drivers/staging/fsl-mc/include/dpaa2-fd.h b/include/soc/fsl/dpaa2-fd.h
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpaa2-fd.h
rename to include/soc/fsl/dpaa2-fd.h
diff --git a/drivers/staging/fsl-mc/include/dpaa2-global.h b/include/soc/fsl/dpaa2-global.h
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpaa2-global.h
rename to include/soc/fsl/dpaa2-global.h
diff --git a/drivers/staging/fsl-mc/include/dpaa2-io.h b/include/soc/fsl/dpaa2-io.h
similarity index 100%
rename from drivers/staging/fsl-mc/include/dpaa2-io.h
rename to include/soc/fsl/dpaa2-io.h
--
2.7.4



2018-03-23 05:18:23

by kernel test robot

[permalink] [raw]
Subject: Re: [v2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

Hi Roy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on staging/staging-testing]
[also build test WARNING on next-20180322]
[cannot apply to linus/master v4.16-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Roy-Pledge/staging-fsl-mc-Move-DPIO-from-staging-to-drivers-soc-fsl/20180323-102325
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/soc/fsl/dpio/qbman-portal.c:163:22: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] <asn:2>*addr_cena @@ got ef] <asn:2>*addr_cena @@
drivers/soc/fsl/dpio/qbman-portal.c:163:22: expected void [noderef] <asn:2>*addr_cena
drivers/soc/fsl/dpio/qbman-portal.c:163:22: got void *const cena_bar
>> drivers/soc/fsl/dpio/qbman-portal.c:164:22: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] <asn:2>*addr_cinh @@ got ef] <asn:2>*addr_cinh @@
drivers/soc/fsl/dpio/qbman-portal.c:164:22: expected void [noderef] <asn:2>*addr_cinh
drivers/soc/fsl/dpio/qbman-portal.c:164:22: got void *const cinh_bar
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/qbman-portal.c:92:29: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] <avoid * @@
drivers/soc/fsl/dpio/qbman-portal.c:92:29: expected void *
drivers/soc/fsl/dpio/qbman-portal.c:92:29: got void [noderef] <asn:2>*
--
>> drivers/soc/fsl/dpio/dpio-driver.c:149:24: sparse: incorrect type in assignment (different address spaces) @@ expected void *[assigned] regs_cena @@ got void [void *[assigned] regs_cena @@
drivers/soc/fsl/dpio/dpio-driver.c:149:24: expected void *[assigned] regs_cena
drivers/soc/fsl/dpio/dpio-driver.c:149:24: got void [noderef] <asn:2>*
>> drivers/soc/fsl/dpio/dpio-driver.c:151:24: sparse: incorrect type in assignment (different address spaces) @@ expected void *[assigned] regs_cinh @@ got void [void *[assigned] regs_cinh @@
drivers/soc/fsl/dpio/dpio-driver.c:151:24: expected void *[assigned] regs_cinh
drivers/soc/fsl/dpio/dpio-driver.c:151:24: got void [noderef] <asn:2>*

vim +163 drivers/soc/fsl/dpio/qbman-portal.c

321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 89
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 90 static inline void *qbman_get_cmd(struct qbman_swp *p, u32 offset)
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 91 {
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 @92 return p->addr_cena + offset;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 93 }
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 94
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 95 #define QBMAN_CINH_SWP_CFG 0xd00
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 96
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 97 #define SWP_CFG_DQRR_MF_SHIFT 20
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 98 #define SWP_CFG_EST_SHIFT 16
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 99 #define SWP_CFG_WN_SHIFT 14
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 100 #define SWP_CFG_RPM_SHIFT 12
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 101 #define SWP_CFG_DCM_SHIFT 10
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 102 #define SWP_CFG_EPM_SHIFT 8
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 103 #define SWP_CFG_SD_SHIFT 5
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 104 #define SWP_CFG_SP_SHIFT 4
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 105 #define SWP_CFG_SE_SHIFT 3
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 106 #define SWP_CFG_DP_SHIFT 2
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 107 #define SWP_CFG_DE_SHIFT 1
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 108 #define SWP_CFG_EP_SHIFT 0
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 109
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 110 static inline u32 qbman_set_swp_cfg(u8 max_fill, u8 wn, u8 est, u8 rpm, u8 dcm,
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 111 u8 epm, int sd, int sp, int se,
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 112 int dp, int de, int ep)
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 113 {
2584f385 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Bogdan Purcareata 2017-07-20 114 return (max_fill << SWP_CFG_DQRR_MF_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 115 est << SWP_CFG_EST_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 116 wn << SWP_CFG_WN_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 117 rpm << SWP_CFG_RPM_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 118 dcm << SWP_CFG_DCM_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 119 epm << SWP_CFG_EPM_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 120 sd << SWP_CFG_SD_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 121 sp << SWP_CFG_SP_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 122 se << SWP_CFG_SE_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 123 dp << SWP_CFG_DP_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 124 de << SWP_CFG_DE_SHIFT |
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 125 ep << SWP_CFG_EP_SHIFT);
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 126 }
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 127
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 128 /**
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 129 * qbman_swp_init() - Create a functional object representing the given
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 130 * QBMan portal descriptor.
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 131 * @d: the given qbman swp descriptor
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 132 *
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 133 * Return qbman_swp portal for success, NULL if the object cannot
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 134 * be created.
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 135 */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 136 struct qbman_swp *qbman_swp_init(const struct qbman_swp_desc *d)
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 137 {
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 138 struct qbman_swp *p = kmalloc(sizeof(*p), GFP_KERNEL);
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 139 u32 reg;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 140
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 141 if (!p)
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 142 return NULL;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 143 p->desc = d;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 144 p->mc.valid_bit = QB_VALID_BIT;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 145 p->sdq = 0;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 146 p->sdq |= qbman_sdqcr_dct_prio_ics << QB_SDQCR_DCT_SHIFT;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 147 p->sdq |= qbman_sdqcr_fc_up_to_3 << QB_SDQCR_FC_SHIFT;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 148 p->sdq |= QMAN_SDQCR_TOKEN << QB_SDQCR_TOK_SHIFT;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 149
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 150 atomic_set(&p->vdq.available, 1);
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 151 p->vdq.valid_bit = QB_VALID_BIT;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 152 p->dqrr.next_idx = 0;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 153 p->dqrr.valid_bit = QB_VALID_BIT;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 154
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 155 if ((p->desc->qman_version & QMAN_REV_MASK) < QMAN_REV_4100) {
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 156 p->dqrr.dqrr_size = 4;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 157 p->dqrr.reset_bug = 1;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 158 } else {
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 159 p->dqrr.dqrr_size = 8;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 160 p->dqrr.reset_bug = 0;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 161 }
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 162
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 @163 p->addr_cena = d->cena_bar;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 @164 p->addr_cinh = d->cinh_bar;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 165
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 166 reg = qbman_set_swp_cfg(p->dqrr.dqrr_size,
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 167 1, /* Writes Non-cacheable */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 168 0, /* EQCR_CI stashing threshold */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 169 3, /* RPM: Valid bit mode, RCR in array mode */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 170 2, /* DCM: Discrete consumption ack mode */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 171 3, /* EPM: Valid bit mode, EQCR in array mode */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 172 0, /* mem stashing drop enable == FALSE */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 173 1, /* mem stashing priority == TRUE */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 174 0, /* mem stashing enable == FALSE */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 175 1, /* dequeue stashing priority == TRUE */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 176 0, /* dequeue stashing enable == FALSE */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 177 0); /* EQCR_CI stashing priority == FALSE */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 178
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 179 qbman_write_register(p, QBMAN_CINH_SWP_CFG, reg);
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 180 reg = qbman_read_register(p, QBMAN_CINH_SWP_CFG);
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 181 if (!reg) {
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 182 pr_err("qbman: the portal is not enabled!\n");
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 183 return NULL;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 184 }
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 185
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 186 /*
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 187 * SDQCR needs to be initialized to 0 when no channels are
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 188 * being dequeued from or else the QMan HW will indicate an
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 189 * error. The values that were calculated above will be
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 190 * applied when dequeues from a specific channel are enabled.
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 191 */
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 192 qbman_write_register(p, QBMAN_CINH_SWP_SDQCR, 0);
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 193 return p;
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 194 }
321eecb0 drivers/staging/fsl-mc/bus/dpio/qbman-portal.c Roy Pledge 2017-03-13 195

:::::: The code at line 163 was first introduced by commit
:::::: 321eecb06bfba0522f33582335f0b09e5003b1e3 bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2

:::::: TO: Roy Pledge <[email protected]>
:::::: CC: Greg Kroah-Hartman <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

2018-03-23 06:48:51

by kernel test robot

[permalink] [raw]
Subject: Re: [v2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

Hi Roy,

I love your patch! Yet something to improve:

[auto build test ERROR on staging/staging-testing]
[also build test ERROR on next-20180322]
[cannot apply to linus/master v4.16-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Roy-Pledge/staging-fsl-mc-Move-DPIO-from-staging-to-drivers-soc-fsl/20180323-102325
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

In file included from drivers/crypto/caam/sg_sw_sec4.h:14:0,
from drivers/crypto/caam/caamalg.c:55:
>> drivers/crypto/caam/sg_sw_qm2.h:38:10: fatal error: ../../../drivers/staging/fsl-mc/include/dpaa2-fd.h: No such file or directory
#include "../../../drivers/staging/fsl-mc/include/dpaa2-fd.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

vim +38 drivers/crypto/caam/sg_sw_qm2.h

297b9ceb Horia Geantă 2017-07-18 37
297b9ceb Horia Geantă 2017-07-18 @38 #include "../../../drivers/staging/fsl-mc/include/dpaa2-fd.h"
297b9ceb Horia Geantă 2017-07-18 39

:::::: The code at line 38 was first introduced by commit
:::::: 297b9cebd2fc020f0bd3e0aac68b0758ab84e8d8 crypto: caam/jr - add support for DPAA2 parts

:::::: TO: Horia Geantă <[email protected]>
:::::: CC: Herbert Xu <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (1.85 kB)
.config.gz (63.44 kB)
Download all attachments

2018-03-23 20:06:01

by Leo Li

[permalink] [raw]
Subject: Re: [v2] staging:fsl-mc: Move DPIO from staging to drivers/soc/fsl

On Fri, Mar 23, 2018 at 1:46 AM, kbuild test robot <[email protected]> wrote:
> Hi Roy,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on staging/staging-testing]
> [also build test ERROR on next-20180322]
> [cannot apply to linus/master v4.16-rc6]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Roy-Pledge/staging-fsl-mc-Move-DPIO-from-staging-to-drivers-soc-fsl/20180323-102325
> config: arm-allmodconfig (attached as .config)
> compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=arm
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/crypto/caam/sg_sw_sec4.h:14:0,
> from drivers/crypto/caam/caamalg.c:55:
>>> drivers/crypto/caam/sg_sw_qm2.h:38:10: fatal error: ../../../drivers/staging/fsl-mc/include/dpaa2-fd.h: No such file or directory
> #include "../../../drivers/staging/fsl-mc/include/dpaa2-fd.h"
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi Roy,

As complained by this auto build error, we should update all the
references to the moved header files. A quick search shows not only
thecaam driver but also the dpaa2-eth driver need to be updated.

Regards,
Leo

> compilation terminated.
>
> vim +38 drivers/crypto/caam/sg_sw_qm2.h
>
> 297b9ceb Horia Geantă 2017-07-18 37
> 297b9ceb Horia Geantă 2017-07-18 @38 #include "../../../drivers/staging/fsl-mc/include/dpaa2-fd.h"
> 297b9ceb Horia Geantă 2017-07-18 39
>
> :::::: The code at line 38 was first introduced by commit
> :::::: 297b9cebd2fc020f0bd3e0aac68b0758ab84e8d8 crypto: caam/jr - add support for DPAA2 parts
>
> :::::: TO: Horia Geantă <[email protected]>
> :::::: CC: Herbert Xu <[email protected]>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation