Skip to contentSkip to conversation

staging: fsl-mc: Upgraded MC flibs used in MC bus driver

PATCH In review J. German Rivera 3 participants 4 messages Aug 19, 2015 – Sep 3, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: fsl-mc: Upgraded MC flibs used in MC bus driver

Since signatures of flib functions have changed, we had to change all the corresponding calls in the MC bus driver

---
 drivers/staging/fsl-mc/bus/dpbp.c           | 232 ++++++++------
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h      |  81 +----
 drivers/staging/fsl-mc/bus/dpmcp.c          | 123 +++++---
 drivers/staging/fsl-mc/bus/dpmcp.h          | 123 +++++---
 drivers/staging/fsl-mc/bus/dpmng.c          |  14 +-
 drivers/staging/fsl-mc/bus/dprc-cmd.h       |   7 +-
 drivers/staging/fsl-mc/bus/dprc-driver.c    |  61 +++-
 drivers/staging/fsl-mc/bus/dprc.c           | 464 +++++++++++++++++++++++-----
 drivers/staging/fsl-mc/bus/mc-allocator.c   | 122 ++++----
 drivers/staging/fsl-mc/bus/mc-bus.c         |  72 +++--
 drivers/staging/fsl-mc/bus/mc-sys.c         | 188 +++++++++--
 drivers/staging/fsl-mc/include/dpbp-cmd.h   | 147 +++++++--
 drivers/staging/fsl-mc/include/dpbp.h       |  91 ++++--
 drivers/staging/fsl-mc/include/dpcon-cmd.h  | 159 ++++++++--
 drivers/staging/fsl-mc/include/dpmng.h      |  14 +-
 drivers/staging/fsl-mc/include/dprc.h       | 313 +++++++++++++++----
 drivers/staging/fsl-mc/include/mc-cmd.h     |  28 +-
 drivers/staging/fsl-mc/include/mc-private.h |  17 +-
 drivers/staging/fsl-mc/include/mc-sys.h     |  51 ++-
 19 files changed, 1661 insertions(+), 646 deletions(-)
drivers/staging/fsl-mc/bus/dpbp.c +132 -100
index d99ab6d..6857a67 100644
@@ -1,48 +1,52 @@
-/* Copyright 2013-2014 Freescale Semiconductor Inc.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the above-listed copyright holders nor the
-* names of any contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-*
-* ALTERNATIVELY, this software may be distributed under the terms of the
-* GNU General Public License ("GPL") as published by the Free Software
-* Foundation, either version 2 of that License or (at your option) any
-* later version.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+/* Copyright 2013-2015 Freescale Semiconductor Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the above-listed copyright holders nor the
+ * names of any contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
 #include "../include/mc-sys.h"
 #include "../include/mc-cmd.h"
 #include "../include/dpbp.h"
 #include "../include/dpbp-cmd.h"
 
-int dpbp_open(struct fsl_mc_io *mc_io, int dpbp_id, uint16_t *token)
+int dpbp_open(struct fsl_mc_io *mc_io,
+	      uint32_t cmd_flags,
+	      int dpbp_id,
+	      uint16_t *token)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_OPEN,
-					  MC_CMD_PRI_LOW, 0);
-	cmd.params[0] |= mc_enc(0, 32, dpbp_id);
+					  cmd_flags,
+					  0);
+	DPBP_CMD_OPEN(cmd, dpbp_id);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -54,22 +58,23 @@ int dpbp_open(struct fsl_mc_io *mc_io, int dpbp_id, uint16_t *token)
 
 	return err;
 }
-EXPORT_SYMBOL(dpbp_open);
 
-int dpbp_close(struct fsl_mc_io *mc_io, uint16_t token)
+int dpbp_close(struct fsl_mc_io *mc_io,
+	       uint32_t cmd_flags,
+	       uint16_t token)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPBP_CMDID_CLOSE, MC_CMD_PRI_HIGH,
+	cmd.header = mc_encode_cmd_header(DPBP_CMDID_CLOSE, cmd_flags,
 					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
-EXPORT_SYMBOL(dpbp_close);
 
 int dpbp_create(struct fsl_mc_io *mc_io,
+		uint32_t cmd_flags,
 		const struct dpbp_cfg *cfg,
 		uint16_t *token)
 {
@@ -80,7 +85,8 @@ int dpbp_create(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_CREATE,
-					  MC_CMD_PRI_LOW, 0);
+					  cmd_flags,
+					  0);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -93,50 +99,59 @@ int dpbp_create(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-int dpbp_destroy(struct fsl_mc_io *mc_io, uint16_t token)
+int dpbp_destroy(struct fsl_mc_io *mc_io,
+		 uint32_t cmd_flags,
+		 uint16_t token)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_DESTROY,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
-int dpbp_enable(struct fsl_mc_io *mc_io, uint16_t token)
+int dpbp_enable(struct fsl_mc_io *mc_io,
+		uint32_t cmd_flags,
+		uint16_t token)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPBP_CMDID_ENABLE, MC_CMD_PRI_LOW,
+	cmd.header = mc_encode_cmd_header(DPBP_CMDID_ENABLE, cmd_flags,
 					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
-EXPORT_SYMBOL(dpbp_enable);
 
-int dpbp_disable(struct fsl_mc_io *mc_io, uint16_t token)
+int dpbp_disable(struct fsl_mc_io *mc_io,
+		 uint32_t cmd_flags,
+		 uint16_t token)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_DISABLE,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
-EXPORT_SYMBOL(dpbp_disable);
 
-int dpbp_is_enabled(struct fsl_mc_io *mc_io, uint16_t token, int *en)
+int dpbp_is_enabled(struct fsl_mc_io *mc_io,
+		    uint32_t cmd_flags,
+		    uint16_t token,
+		    int *en)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPBP_CMDID_IS_ENABLED, MC_CMD_PRI_LOW,
+	cmd.header = mc_encode_cmd_header(DPBP_CMDID_IS_ENABLED, cmd_flags,
 					  token);
 
 	/* send command to mc*/
@@ -145,59 +160,61 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io, uint16_t token, int *en)
 		return err;
 
 	/* retrieve response parameters */
-	*en = (int)mc_dec(cmd.params[0], 0, 1);
+	DPBP_RSP_IS_ENABLED(cmd, *en);
 
 	return 0;
 }
 
-int dpbp_reset(struct fsl_mc_io *mc_io, uint16_t token)
+int dpbp_reset(struct fsl_mc_io *mc_io,
+	       uint32_t cmd_flags,
+	       uint16_t token)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_RESET,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
-int dpbp_set_irq(struct fsl_mc_io *mc_io,
-		 uint16_t token,
-		 uint8_t irq_index,
-		 uint64_t irq_paddr,
-		 uint32_t irq_val,
-		 int user_irq_id)
+int dpbp_set_irq(struct fsl_mc_io	*mc_io,
+		 uint32_t		cmd_flags,
+		 uint16_t		token,
+		 uint8_t		irq_index,
+		 struct dpbp_irq_cfg	*irq_cfg)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_SET_IRQ,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(0, 8, irq_index);
-	cmd.params[0] |= mc_enc(32, 32, irq_val);
-	cmd.params[1] |= mc_enc(0, 64, irq_paddr);
-	cmd.params[2] |= mc_enc(0, 32, user_irq_id);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_SET_IRQ(cmd, irq_index, irq_cfg);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
-int dpbp_get_irq(struct fsl_mc_io *mc_io,
-		 uint16_t token,
-		 uint8_t irq_index,
-		 int *type,
-		 uint64_t *irq_paddr,
-		 uint32_t *irq_val,
-		 int *user_irq_id)
+int dpbp_get_irq(struct fsl_mc_io	*mc_io,
+		 uint32_t		cmd_flags,
+		 uint16_t		token,
+		 uint8_t		irq_index,
+		 int			*type,
+		 struct dpbp_irq_cfg	*irq_cfg)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_IRQ,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(32, 8, irq_index);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_GET_IRQ(cmd, irq_index);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -205,14 +222,13 @@ int dpbp_get_irq(struct fsl_mc_io *mc_io,
 		return err;
 
 	/* retrieve response parameters */
-	*irq_val = (uint32_t)mc_dec(cmd.params[0], 0, 32);
-	*irq_paddr = (uint64_t)mc_dec(cmd.params[1], 0, 64);
-	*user_irq_id = (int)mc_dec(cmd.params[2], 0, 32);
-	*type = (int)mc_dec(cmd.params[2], 32, 32);
+	DPBP_RSP_GET_IRQ(cmd, *type, irq_cfg);
+
 	return 0;
 }
 
 int dpbp_set_irq_enable(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t irq_index,
 			uint8_t en)
@@ -221,15 +237,17 @@ int dpbp_set_irq_enable(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_SET_IRQ_ENABLE,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(0, 8, en);
-	cmd.params[0] |= mc_enc(32, 8, irq_index);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_SET_IRQ_ENABLE(cmd, irq_index, en);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
 int dpbp_get_irq_enable(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t irq_index,
 			uint8_t *en)
@@ -239,8 +257,10 @@ int dpbp_get_irq_enable(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_IRQ_ENABLE,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(32, 8, irq_index);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_GET_IRQ_ENABLE(cmd, irq_index);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -248,11 +268,13 @@ int dpbp_get_irq_enable(struct fsl_mc_io *mc_io,
 		return err;
 
 	/* retrieve response parameters */
-	*en = (uint8_t)mc_dec(cmd.params[0], 0, 8);
+	DPBP_RSP_GET_IRQ_ENABLE(cmd, *en);
+
 	return 0;
 }
 
 int dpbp_set_irq_mask(struct fsl_mc_io *mc_io,
+		      uint32_t cmd_flags,
 		      uint16_t token,
 		      uint8_t irq_index,
 		      uint32_t mask)
@@ -261,15 +283,17 @@ int dpbp_set_irq_mask(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_SET_IRQ_MASK,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(0, 32, mask);
-	cmd.params[0] |= mc_enc(32, 8, irq_index);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_SET_IRQ_MASK(cmd, irq_index, mask);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
 int dpbp_get_irq_mask(struct fsl_mc_io *mc_io,
+		      uint32_t cmd_flags,
 		      uint16_t token,
 		      uint8_t irq_index,
 		      uint32_t *mask)
@@ -279,8 +303,10 @@ int dpbp_get_irq_mask(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_IRQ_MASK,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(32, 8, irq_index);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_GET_IRQ_MASK(cmd, irq_index);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -288,11 +314,13 @@ int dpbp_get_irq_mask(struct fsl_mc_io *mc_io,
 		return err;
 
 	/* retrieve response parameters */
-	*mask = (uint32_t)mc_dec(cmd.params[0], 0, 32);
+	DPBP_RSP_GET_IRQ_MASK(cmd, *mask);
+
 	return 0;
 }
 
 int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t irq_index,
 			uint32_t *status)
@@ -302,8 +330,10 @@ int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_IRQ_STATUS,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(32, 8, irq_index);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_GET_IRQ_STATUS(cmd, irq_index);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -311,11 +341,13 @@ int dpbp_get_irq_status(struct fsl_mc_io *mc_io,
 		return err;
 
 	/* retrieve response parameters */
-	*status = (uint32_t)mc_dec(cmd.params[0], 0, 32);
+	DPBP_RSP_GET_IRQ_STATUS(cmd, *status);
+
 	return 0;
 }
 
 int dpbp_clear_irq_status(struct fsl_mc_io *mc_io,
+			  uint32_t cmd_flags,
 			  uint16_t token,
 			  uint8_t irq_index,
 			  uint32_t status)
@@ -324,15 +356,17 @@ int dpbp_clear_irq_status(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_CLEAR_IRQ_STATUS,
-					  MC_CMD_PRI_LOW, token);
-	cmd.params[0] |= mc_enc(0, 32, status);
-	cmd.params[0] |= mc_enc(32, 8, irq_index);
+					  cmd_flags,
+					  token);
+
+	DPBP_CMD_CLEAR_IRQ_STATUS(cmd, irq_index, status);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
 int dpbp_get_attributes(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			struct dpbp_attr *attr)
 {
@@ -341,7 +375,8 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io,
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_ATTR,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -349,10 +384,7 @@ int dpbp_get_attributes(struct fsl_mc_io *mc_io,
 		return err;
 
 	/* retrieve response parameters */
-	attr->bpid = (uint16_t)mc_dec(cmd.params[0], 16, 16);
-	attr->id = (int)mc_dec(cmd.params[0], 32, 32);
-	attr->version.major = (uint16_t)mc_dec(cmd.params[1], 0, 16);
-	attr->version.minor = (uint16_t)mc_dec(cmd.params[1], 16, 16);
+	DPBP_RSP_GET_ATTRIBUTES(cmd, attr);
+
 	return 0;
 }
-EXPORT_SYMBOL(dpbp_get_attributes);
drivers/staging/fsl-mc/bus/dpmcp-cmd.h +1 -80

91 lines not on this page · raw message

drivers/staging/fsl-mc/bus/dpmcp.c +76 -47

298 lines not on this page · raw message

drivers/staging/fsl-mc/bus/dpmcp.h +77 -46

286 lines not on this page · raw message

drivers/staging/fsl-mc/bus/dpmng.c +10 -4
index 58328e8..1aeca05 100644
@@ -34,14 +34,17 @@
 #include "../include/dpmng.h"
 #include "dpmng-cmd.h"
 
-int mc_get_version(struct fsl_mc_io *mc_io, struct mc_version *mc_ver_info)
+int mc_get_version(struct fsl_mc_io *mc_io,
+		   uint32_t cmd_flags,
+		   struct mc_version *mc_ver_info)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPMNG_CMDID_GET_VERSION,
-					  MC_CMD_PRI_LOW, 0);
+					  cmd_flags,
+					  0);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -56,14 +59,17 @@ int mc_get_version(struct fsl_mc_io *mc_io, struct mc_version *mc_ver_info)
 	return 0;
 }
 
-int dpmng_get_container_id(struct fsl_mc_io *mc_io, int *container_id)
+int dpmng_get_container_id(struct fsl_mc_io *mc_io,
+			   uint32_t cmd_flags,
+			   int *container_id)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPMNG_CMDID_GET_CONT_ID,
-					  MC_CMD_PRI_LOW, 0);
+					  cmd_flags,
+					  0);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
drivers/staging/fsl-mc/bus/dprc-cmd.h +5 -2
index 0920248..6552c20 100644
@@ -41,7 +41,7 @@
 #define _FSL_DPRC_CMD_H
 
 /* DPRC Version */
-#define DPRC_VER_MAJOR				3
+#define DPRC_VER_MAJOR				4
 #define DPRC_VER_MINOR				0
 
 /* Command IDs */
@@ -72,12 +72,15 @@
 #define DPRC_CMDID_GET_RES_COUNT		0x15B
 #define DPRC_CMDID_GET_RES_IDS			0x15C
 #define DPRC_CMDID_GET_OBJ_REG			0x15E
+#define DPRC_CMDID_SET_OBJ_IRQ			0x15F
+#define DPRC_CMDID_GET_OBJ_IRQ			0x160
+#define DPRC_CMDID_SET_OBJ_LABEL		0x161
+#define DPRC_CMDID_GET_OBJ_DESC			0x162
 
 #define DPRC_CMDID_CONNECT			0x167
 #define DPRC_CMDID_DISCONNECT			0x168
 #define DPRC_CMDID_GET_POOL			0x169
 #define DPRC_CMDID_GET_POOL_COUNT		0x16A
-#define DPRC_CMDID_GET_PORTAL_PADDR		0x16B
 
 #define DPRC_CMDID_GET_CONNECTION		0x16C
 
drivers/staging/fsl-mc/bus/dprc-driver.c +54 -7

127 lines not on this page · raw message

drivers/staging/fsl-mc/bus/dprc.c +383 -81

887 lines not on this page · raw message

drivers/staging/fsl-mc/bus/mc-allocator.c +70 -52

191 lines not on this page · raw message

drivers/staging/fsl-mc/bus/mc-bus.c +47 -25

187 lines not on this page · raw message

drivers/staging/fsl-mc/bus/mc-sys.c +158 -30

252 lines not on this page · raw message

drivers/staging/fsl-mc/include/dpbp-cmd.h +115 -32

159 lines not on this page · raw message

drivers/staging/fsl-mc/include/dpbp.h +68 -23

9 lines not on this page · raw message

drivers/staging/fsl-mc/include/dpcon-cmd.h +128 -31

159 lines not on this page · raw message

drivers/staging/fsl-mc/include/dpmng.h +10 -4
index 1b052b8..4a0996c 100644

Lines of this file are not shown. View the raw message.

drivers/staging/fsl-mc/include/dprc.h +250 -63

313 lines not on this page · raw message

drivers/staging/fsl-mc/include/mc-cmd.h +22 -6
index 32501e0..57fefd2 100644

Lines of this file are not shown. View the raw message.

drivers/staging/fsl-mc/include/mc-private.h +11 -6
index c045f49..03809d2 100644

Lines of this file are not shown. View the raw message.

drivers/staging/fsl-mc/include/mc-sys.h +44 -7

51 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.3.3

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 3 lines · J. German Rivera

Since signatures of flib functions have changed, we had to change all the corresponding calls in the MC bus driver

What does upgrade mean here? I feel like this is the kind of patch we reject without reading the patch because the description is too vague and you can tell from the diff stats that it is going to be too huge to review.

I looked at the first few lines and we are making a ball of changes. Copyright notices, adding function parameters, renaming functions. This needs to be explained a lot better and probably split into multiple patches.

Btw, the trees are closed for the next 3-4 weeks until after 4.3-rc2 is released.

regards,
dan carpenter

#2 lore raw
Quoted 13 lines

-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Thursday, August 20, 2015 2:35 AM
To: Rivera Jose-B46482
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Yoder Stuart- B08248; katz Itai-RM05202; Wood Scott-B07421; [email protected]; Hamciuc Bogdan-BHAMCIU1; Marginean Alexandru-R89243; Sharma Bhupesh-B45370; Erez Nir-RM30794; Schmitt Richard-B43082
Subject: Re: [PATCH] staging: fsl-mc: Upgraded MC flibs used in MC bus driver

On Wed, Aug 19, 2015 at 11:52:40AM -0500, J. German Rivera wrote:

Quoted 8 lines
Quoted 3 lines

Since signatures of flib functions have changed, we had to change all the corresponding calls in the MC bus driver

What does upgrade mean here? I feel like this is the kind of patch we reject without reading the patch because the description is too vague and you can tell from the diff stats that it is going to be too huge to review.

We will do some refactoring to make this easier to review.

Thanks,

german

Quoted 11 lines

I looked at the first few lines and we are making a ball of changes. Copyright notices, adding function parameters, renaming functions. This needs to be explained a lot better and probably split into multiple patches.

Btw, the trees are closed for the next 3-4 weeks until after 4.3-rc2 is released.

regards,
dan carpenter

maintainer
#3 lore raw
In reply to J. German Rivera
Quoted 83 lines · J. German Rivera

Since signatures of flib functions have changed, we had to change all the corresponding calls in the MC bus driver

---
 drivers/staging/fsl-mc/bus/dpbp.c           | 232 ++++++++------
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h      |  81 +----
 drivers/staging/fsl-mc/bus/dpmcp.c          | 123 +++++---
 drivers/staging/fsl-mc/bus/dpmcp.h          | 123 +++++---
 drivers/staging/fsl-mc/bus/dpmng.c          |  14 +-
 drivers/staging/fsl-mc/bus/dprc-cmd.h       |   7 +-
 drivers/staging/fsl-mc/bus/dprc-driver.c    |  61 +++-
 drivers/staging/fsl-mc/bus/dprc.c           | 464 +++++++++++++++++++++++-----
 drivers/staging/fsl-mc/bus/mc-allocator.c   | 122 ++++----
 drivers/staging/fsl-mc/bus/mc-bus.c         |  72 +++--
 drivers/staging/fsl-mc/bus/mc-sys.c         | 188 +++++++++--
 drivers/staging/fsl-mc/include/dpbp-cmd.h   | 147 +++++++--
 drivers/staging/fsl-mc/include/dpbp.h       |  91 ++++--
 drivers/staging/fsl-mc/include/dpcon-cmd.h  | 159 ++++++++--
 drivers/staging/fsl-mc/include/dpmng.h      |  14 +-
 drivers/staging/fsl-mc/include/dprc.h       | 313 +++++++++++++++----
 drivers/staging/fsl-mc/include/mc-cmd.h     |  28 +-
 drivers/staging/fsl-mc/include/mc-private.h |  17 +-
 drivers/staging/fsl-mc/include/mc-sys.h     |  51 ++-
 19 files changed, 1661 insertions(+), 646 deletions(-)
drivers/staging/fsl-mc/bus/dpbp.c +21 -31
index d99ab6d..6857a67 100644
@@ -1,48 +1,52 @@
-/* Copyright 2013-2014 Freescale Semiconductor Inc.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the above-listed copyright holders nor the
-* names of any contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-*
-* ALTERNATIVELY, this software may be distributed under the terms of the
-* GNU General Public License ("GPL") as published by the Free Software
-* Foundation, either version 2 of that License or (at your option) any
-* later version.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
-* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-* POSSIBILITY OF SUCH DAMAGE.
-*/
+/* Copyright 2013-2015 Freescale Semiconductor Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the above-listed copyright holders nor the
+ * names of any contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

drivers/staging/fsl-mc/bus/dpbp.c line 31

Quoted 10 lines
drivers/staging/fsl-mc/bus/dpbp.c +10 -0
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */

Changing the header of a file is not changing an API, please break this up into logical pieces, this can't be taken as-is at all :(