drivers/fsl-mc: flib changes for mc 8.0.0

MC firware version 8.0.0 contains new command flags. This patch
contains modifications in FLIB files to support the new command flags.

Signed-off-by: Itai Katz <itai.katz@freescale.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
diff --git a/drivers/net/fsl-mc/dpbp.c b/drivers/net/fsl-mc/dpbp.c
index 3853e58..1517a70 100644
--- a/drivers/net/fsl-mc/dpbp.c
+++ b/drivers/net/fsl-mc/dpbp.c
@@ -10,14 +10,18 @@
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpbp.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_flags,
+					  0);
 	DPBP_CMD_OPEN(cmd, dpbp_id);
 
 	/* send command to mc*/
@@ -31,55 +35,66 @@
 	return err;
 }
 
-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);
 }
 
-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);
 }
 
-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);
 }
 
-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_get_attributes(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			struct dpbp_attr *attr)
 {
@@ -88,7 +103,8 @@
 
 	/* 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);
diff --git a/drivers/net/fsl-mc/dpio/dpio.c b/drivers/net/fsl-mc/dpio/dpio.c
index b07eff7..cd3fd50 100644
--- a/drivers/net/fsl-mc/dpio/dpio.c
+++ b/drivers/net/fsl-mc/dpio/dpio.c
@@ -8,14 +8,18 @@
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpio.h>
 
-int dpio_open(struct fsl_mc_io *mc_io, int dpio_id, uint16_t *token)
+int dpio_open(struct fsl_mc_io *mc_io,
+	      uint32_t cmd_flags,
+	      int dpio_id,
+	      uint16_t *token)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPIO_CMDID_OPEN,
-					  MC_CMD_PRI_LOW, 0);
+					  cmd_flags,
+					  0);
 	DPIO_CMD_OPEN(cmd, dpio_id);
 
 	/* send command to mc*/
@@ -29,56 +33,68 @@
 	return 0;
 }
 
-int dpio_close(struct fsl_mc_io *mc_io, uint16_t token)
+int dpio_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(DPIO_CMDID_CLOSE,
-					  MC_CMD_PRI_HIGH, token);
-
-	/* send command to mc*/
-	return mc_send_command(mc_io, &cmd);
-}
-
-int dpio_enable(struct fsl_mc_io *mc_io, uint16_t token)
-{
-	struct mc_command cmd = { 0 };
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPIO_CMDID_ENABLE,
-					  MC_CMD_PRI_LOW, token);
-
-	/* send command to mc*/
-	return mc_send_command(mc_io, &cmd);
-}
-
-int dpio_disable(struct fsl_mc_io *mc_io, uint16_t token)
-{
-	struct mc_command cmd = { 0 };
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPIO_CMDID_DISABLE,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
-int dpio_reset(struct fsl_mc_io *mc_io, uint16_t token)
+int dpio_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(DPIO_CMDID_ENABLE,
+					  cmd_flags,
+					  token);
+
+	/* send command to mc*/
+	return mc_send_command(mc_io, &cmd);
+}
+
+int dpio_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(DPIO_CMDID_DISABLE,
+					  cmd_flags,
+					  token);
+
+	/* send command to mc*/
+	return mc_send_command(mc_io, &cmd);
+}
+
+int dpio_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(DPIO_CMDID_RESET,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
 int dpio_get_attributes(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			struct dpio_attr *attr)
 {
@@ -87,7 +103,7 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPIO_CMDID_GET_ATTR,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 
 	/* send command to mc*/
diff --git a/drivers/net/fsl-mc/dpmng.c b/drivers/net/fsl-mc/dpmng.c
index 01ee112..d96e26b 100644
--- a/drivers/net/fsl-mc/dpmng.c
+++ b/drivers/net/fsl-mc/dpmng.c
@@ -7,14 +7,17 @@
 #include <fsl-mc/fsl_dpmng.h>
 #include "fsl_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);
diff --git a/drivers/net/fsl-mc/dpni.c b/drivers/net/fsl-mc/dpni.c
index 7bc2504..9111f35 100644
--- a/drivers/net/fsl-mc/dpni.c
+++ b/drivers/net/fsl-mc/dpni.c
@@ -8,14 +8,18 @@
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dpni.h>
 
-int dpni_open(struct fsl_mc_io *mc_io, int dpni_id, uint16_t *token)
+int dpni_open(struct fsl_mc_io *mc_io,
+	      uint32_t cmd_flags,
+	      int dpni_id,
+	      uint16_t *token)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_OPEN,
-					  MC_CMD_PRI_LOW, 0);
+					  cmd_flags,
+					  0);
 	DPNI_CMD_OPEN(cmd, dpni_id);
 
 	/* send command to mc*/
@@ -29,19 +33,23 @@
 	return 0;
 }
 
-int dpni_close(struct fsl_mc_io *mc_io, uint16_t token)
+int dpni_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(DPNI_CMDID_CLOSE,
-					  MC_CMD_PRI_HIGH, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
 int dpni_set_pools(struct fsl_mc_io *mc_io,
+		   uint32_t cmd_flags,
 		   uint16_t token,
 		   const struct dpni_pools_cfg *cfg)
 {
@@ -49,7 +57,7 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_POOLS,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 	DPNI_CMD_SET_POOLS(cmd, cfg);
 
@@ -57,44 +65,53 @@
 	return mc_send_command(mc_io, &cmd);
 }
 
-int dpni_enable(struct fsl_mc_io *mc_io, uint16_t token)
+int dpni_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(DPNI_CMDID_ENABLE,
-					  MC_CMD_PRI_LOW, token);
-
-	/* send command to mc*/
-	return mc_send_command(mc_io, &cmd);
-}
-
-int dpni_disable(struct fsl_mc_io *mc_io, uint16_t token)
-{
-	struct mc_command cmd = { 0 };
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPNI_CMDID_DISABLE,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
-int dpni_reset(struct fsl_mc_io *mc_io, uint16_t token)
+int dpni_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(DPNI_CMDID_DISABLE,
+					  cmd_flags,
+					  token);
+
+	/* send command to mc*/
+	return mc_send_command(mc_io, &cmd);
+}
+
+int dpni_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(DPNI_CMDID_RESET,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
 int dpni_get_attributes(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			struct dpni_attr *attr)
 {
@@ -103,7 +120,7 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_ATTR,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 
 	/* send command to mc*/
@@ -118,6 +135,7 @@
 }
 
 int dpni_get_rx_buffer_layout(struct fsl_mc_io *mc_io,
+			      uint32_t cmd_flags,
 			      uint16_t token,
 			      struct dpni_buffer_layout *layout)
 {
@@ -126,7 +144,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_RX_BUFFER_LAYOUT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -140,6 +159,7 @@
 }
 
 int dpni_set_rx_buffer_layout(struct fsl_mc_io *mc_io,
+			      uint32_t cmd_flags,
 			      uint16_t token,
 			      const struct dpni_buffer_layout *layout)
 {
@@ -147,7 +167,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_RX_BUFFER_LAYOUT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_RX_BUFFER_LAYOUT(cmd, layout);
 
 	/* send command to mc*/
@@ -155,6 +176,7 @@
 }
 
 int dpni_get_tx_buffer_layout(struct fsl_mc_io *mc_io,
+			      uint32_t cmd_flags,
 			      uint16_t token,
 			      struct dpni_buffer_layout *layout)
 {
@@ -163,7 +185,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_BUFFER_LAYOUT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -177,6 +200,7 @@
 }
 
 int dpni_set_tx_buffer_layout(struct fsl_mc_io *mc_io,
+			      uint32_t cmd_flags,
 			      uint16_t token,
 			      const struct dpni_buffer_layout *layout)
 {
@@ -184,7 +208,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_TX_BUFFER_LAYOUT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_TX_BUFFER_LAYOUT(cmd, layout);
 
 	/* send command to mc*/
@@ -192,6 +217,7 @@
 }
 
 int dpni_get_tx_conf_buffer_layout(struct fsl_mc_io *mc_io,
+				   uint32_t cmd_flags,
 				   uint16_t token,
 				   struct dpni_buffer_layout *layout)
 {
@@ -200,7 +226,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_CONF_BUFFER_LAYOUT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -214,6 +241,7 @@
 }
 
 int dpni_set_tx_conf_buffer_layout(struct fsl_mc_io *mc_io,
+				   uint32_t cmd_flags,
 				   uint16_t token,
 				   const struct dpni_buffer_layout *layout)
 {
@@ -221,21 +249,25 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_TX_CONF_BUFFER_LAYOUT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_TX_CONF_BUFFER_LAYOUT(cmd, layout);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
-int dpni_get_qdid(struct fsl_mc_io *mc_io, uint16_t token, uint16_t *qdid)
+int dpni_get_qdid(struct fsl_mc_io *mc_io,
+		  uint32_t cmd_flags,
+		  uint16_t token,
+		  uint16_t *qdid)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_QDID,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 
 	/* send command to mc*/
@@ -250,6 +282,7 @@
 }
 
 int dpni_get_tx_data_offset(struct fsl_mc_io *mc_io,
+			    uint32_t cmd_flags,
 			    uint16_t token,
 			    uint16_t *data_offset)
 {
@@ -258,7 +291,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_DATA_OFFSET,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -272,6 +306,7 @@
 }
 
 int dpni_get_counter(struct fsl_mc_io *mc_io,
+		     uint32_t cmd_flags,
 		     uint16_t token,
 		     enum dpni_counter counter,
 		     uint64_t *value)
@@ -281,7 +316,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_COUNTER,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_GET_COUNTER(cmd, counter);
 
 	/* send command to mc*/
@@ -296,6 +332,7 @@
 }
 
 int dpni_set_counter(struct fsl_mc_io *mc_io,
+		     uint32_t cmd_flags,
 		     uint16_t token,
 		     enum dpni_counter counter,
 		     uint64_t value)
@@ -304,7 +341,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_COUNTER,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_COUNTER(cmd, counter, value);
 
 	/* send command to mc*/
@@ -312,14 +350,16 @@
 }
 
 int dpni_set_link_cfg(struct fsl_mc_io *mc_io,
+		      uint32_t cmd_flags,
 		      uint16_t token,
-		     const struct dpni_link_cfg *cfg)
+		      const struct dpni_link_cfg *cfg)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_LINK_CFG,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_LINK_CFG(cmd, cfg);
 
 	/* send command to mc*/
@@ -327,6 +367,7 @@
 }
 
 int dpni_get_link_state(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			struct dpni_link_state *state)
 {
@@ -335,7 +376,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_LINK_STATE,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -350,6 +392,7 @@
 
 
 int dpni_set_primary_mac_addr(struct fsl_mc_io *mc_io,
+			      uint32_t cmd_flags,
 			      uint16_t token,
 			      const uint8_t mac_addr[6])
 {
@@ -357,7 +400,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_PRIM_MAC,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_PRIMARY_MAC_ADDR(cmd, mac_addr);
 
 	/* send command to mc*/
@@ -365,6 +409,7 @@
 }
 
 int dpni_get_primary_mac_addr(struct fsl_mc_io *mc_io,
+			      uint32_t cmd_flags,
 			      uint16_t token,
 			      uint8_t mac_addr[6])
 {
@@ -373,7 +418,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_PRIM_MAC,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -387,6 +433,7 @@
 }
 
 int dpni_add_mac_addr(struct fsl_mc_io *mc_io,
+		      uint32_t cmd_flags,
 		      uint16_t token,
 		      const uint8_t mac_addr[6])
 {
@@ -394,7 +441,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_ADD_MAC_ADDR,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_ADD_MAC_ADDR(cmd, mac_addr);
 
 	/* send command to mc*/
@@ -402,6 +450,7 @@
 }
 
 int dpni_remove_mac_addr(struct fsl_mc_io *mc_io,
+			 uint32_t cmd_flags,
 			 uint16_t token,
 			 const uint8_t mac_addr[6])
 {
@@ -409,7 +458,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_REMOVE_MAC_ADDR,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_REMOVE_MAC_ADDR(cmd, mac_addr);
 
 	/* send command to mc*/
@@ -417,6 +467,7 @@
 }
 
 int dpni_set_tx_flow(struct fsl_mc_io *mc_io,
+		     uint32_t cmd_flags,
 		     uint16_t token,
 		     uint16_t *flow_id,
 		     const struct dpni_tx_flow_cfg *cfg)
@@ -426,7 +477,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_TX_FLOW,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_TX_FLOW(cmd, *flow_id, cfg);
 
 	/* send command to mc*/
@@ -441,6 +493,7 @@
 }
 
 int dpni_get_tx_flow(struct fsl_mc_io *mc_io,
+		     uint32_t cmd_flags,
 		     uint16_t token,
 		     uint16_t flow_id,
 		     struct dpni_tx_flow_attr *attr)
@@ -450,7 +503,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_TX_FLOW,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_GET_TX_FLOW(cmd, flow_id);
 
 	/* send command to mc*/
@@ -465,6 +519,7 @@
 }
 
 int dpni_set_rx_flow(struct fsl_mc_io *mc_io,
+		     uint32_t cmd_flags,
 		     uint16_t token,
 		     uint8_t tc_id,
 		     uint16_t flow_id,
@@ -474,7 +529,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_SET_RX_FLOW,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_SET_RX_FLOW(cmd, tc_id, flow_id, cfg);
 
 	/* send command to mc*/
@@ -482,6 +538,7 @@
 }
 
 int dpni_get_rx_flow(struct fsl_mc_io *mc_io,
+		     uint32_t cmd_flags,
 		     uint16_t token,
 		     uint8_t tc_id,
 		     uint16_t flow_id,
@@ -491,7 +548,8 @@
 	int err;
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPNI_CMDID_GET_RX_FLOW,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPNI_CMD_GET_RX_FLOW(cmd, tc_id, flow_id);
 
 	/* send command to mc*/
diff --git a/drivers/net/fsl-mc/dprc.c b/drivers/net/fsl-mc/dprc.c
index d481200..357aa48 100644
--- a/drivers/net/fsl-mc/dprc.c
+++ b/drivers/net/fsl-mc/dprc.c
@@ -11,14 +11,17 @@
 #include <fsl-mc/fsl_mc_cmd.h>
 #include <fsl-mc/fsl_dprc.h>
 
-int dprc_get_container_id(struct fsl_mc_io *mc_io, int *container_id)
+int dprc_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(DPRC_CMDID_GET_CONT_ID,
-					  MC_CMD_PRI_LOW, 0);
+					  cmd_flags,
+					  0);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -31,13 +34,16 @@
 	return 0;
 }
 
-int dprc_open(struct fsl_mc_io *mc_io, int container_id, uint16_t *token)
+int dprc_open(struct fsl_mc_io *mc_io,
+	      uint32_t cmd_flags,
+	      int container_id,
+	      uint16_t *token)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPRC_CMDID_OPEN, MC_CMD_PRI_LOW,
+	cmd.header = mc_encode_cmd_header(DPRC_CMDID_OPEN, cmd_flags,
 					  0);
 	DPRC_CMD_OPEN(cmd, container_id);
 
@@ -52,12 +58,14 @@
 	return 0;
 }
 
-int dprc_close(struct fsl_mc_io *mc_io, uint16_t token)
+int dprc_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(DPRC_CMDID_CLOSE, MC_CMD_PRI_HIGH,
+	cmd.header = mc_encode_cmd_header(DPRC_CMDID_CLOSE, cmd_flags,
 					  token);
 
 	/* send command to mc*/
@@ -65,6 +73,7 @@
 }
 
 int dprc_reset_container(struct fsl_mc_io *mc_io,
+			 uint32_t cmd_flags,
 			 uint16_t token,
 			 int child_container_id)
 {
@@ -72,7 +81,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_RESET_CONT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPRC_CMD_RESET_CONTAINER(cmd, child_container_id);
 
 	/* send command to mc*/
@@ -80,6 +90,7 @@
 }
 
 int dprc_get_attributes(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			struct dprc_attributes *attr)
 {
@@ -88,7 +99,7 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_ATTR,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 
 	/* send command to mc*/
@@ -102,14 +113,18 @@
 	return 0;
 }
 
-int dprc_get_obj_count(struct fsl_mc_io *mc_io, uint16_t token, int *obj_count)
+int dprc_get_obj_count(struct fsl_mc_io *mc_io,
+		       uint32_t cmd_flags,
+		       uint16_t token,
+		       int *obj_count)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_COUNT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -123,6 +138,7 @@
 }
 
 int dprc_get_obj(struct fsl_mc_io *mc_io,
+		 uint32_t cmd_flags,
 		 uint16_t token,
 		 int obj_index,
 		 struct dprc_obj_desc *obj_desc)
@@ -132,7 +148,7 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 	DPRC_CMD_GET_OBJ(cmd, obj_index);
 
@@ -148,6 +164,7 @@
 }
 
 int dprc_get_res_count(struct fsl_mc_io *mc_io,
+		       uint32_t cmd_flags,
 		       uint16_t token,
 		       char *type,
 		       int *res_count)
@@ -159,7 +176,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_RES_COUNT,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPRC_CMD_GET_RES_COUNT(cmd, type);
 
 	/* send command to mc*/
@@ -174,6 +192,7 @@
 }
 
 int dprc_get_res_ids(struct fsl_mc_io *mc_io,
+		     uint32_t cmd_flags,
 		     uint16_t token,
 		     char *type,
 		     struct dprc_res_ids_range_desc *range_desc)
@@ -183,7 +202,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_RES_IDS,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPRC_CMD_GET_RES_IDS(cmd, range_desc, type);
 
 	/* send command to mc*/
@@ -198,6 +218,7 @@
 }
 
 int dprc_get_obj_region(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
 			char *obj_type,
 			int obj_id,
@@ -209,7 +230,8 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_REG,
-					  MC_CMD_PRI_LOW, token);
+					  cmd_flags,
+					  token);
 	DPRC_CMD_GET_OBJ_REGION(cmd, obj_type, obj_id, region_index);
 
 	/* send command to mc*/
@@ -224,23 +246,26 @@
 }
 
 int dprc_connect(struct fsl_mc_io *mc_io,
+		 uint32_t cmd_flags,
 		 uint16_t token,
 		 const struct dprc_endpoint *endpoint1,
-		 const struct dprc_endpoint *endpoint2)
+		 const struct dprc_endpoint *endpoint2,
+		 const struct dprc_connection_cfg *cfg)
 {
 	struct mc_command cmd = { 0 };
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_CONNECT,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
-	DPRC_CMD_CONNECT(cmd, endpoint1, endpoint2);
+	DPRC_CMD_CONNECT(cmd, endpoint1, endpoint2, cfg);
 
 	/* send command to mc*/
 	return mc_send_command(mc_io, &cmd);
 }
 
 int dprc_disconnect(struct fsl_mc_io *mc_io,
+		    uint32_t cmd_flags,
 		    uint16_t token,
 		    const struct dprc_endpoint *endpoint)
 {
@@ -248,7 +273,7 @@
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_DISCONNECT,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 	DPRC_CMD_DISCONNECT(cmd, endpoint);
 
@@ -257,17 +282,18 @@
 }
 
 int dprc_get_connection(struct fsl_mc_io *mc_io,
+			uint32_t cmd_flags,
 			uint16_t token,
-					const struct dprc_endpoint *endpoint1,
-					struct dprc_endpoint *endpoint2,
-					int *state)
+			const struct dprc_endpoint *endpoint1,
+			struct dprc_endpoint *endpoint2,
+			int *state)
 {
 	struct mc_command cmd = { 0 };
 	int err;
 
 	/* prepare command */
 	cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_CONNECTION,
-					  MC_CMD_PRI_LOW,
+					  cmd_flags,
 					  token);
 	DPRC_CMD_GET_CONNECTION(cmd, endpoint1);
 
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 62a68c2..ea987d7 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -547,7 +547,7 @@
 	debug("Checking access to MC portal of root DPRC container (portal_id %d, portal physical addr %p)\n",
 	      portal_id, dflt_mc_io->mmio_regs);
 
-	error = mc_get_version(dflt_mc_io, &mc_ver_info);
+	error = mc_get_version(dflt_mc_io, MC_CMD_NO_FLAGS, &mc_ver_info);
 	if (error != 0) {
 		printf("fsl-mc: ERROR: Firmware version check failed (error: %d)\n",
 		       error);
@@ -634,19 +634,21 @@
 
 	dflt_dpio->dpio_id = obj_desc.id;
 
-	err = dpio_open(dflt_mc_io, obj_desc.id, &dflt_dpio_handle);
+	err = dpio_open(dflt_mc_io, MC_CMD_NO_FLAGS, obj_desc.id,
+			&dflt_dpio_handle);
 	if (err) {
 		printf("dpio_open() failed\n");
 		goto err_open;
 	}
 
-	err = dpio_get_attributes(dflt_mc_io, dflt_dpio_handle, &attr);
+	err = dpio_get_attributes(dflt_mc_io, MC_CMD_NO_FLAGS,
+				  dflt_dpio_handle, &attr);
 	if (err) {
 		printf("dpio_get_attributes() failed %d\n", err);
 		goto err_get_attr;
 	}
 
-	err = dpio_enable(dflt_mc_io, dflt_dpio_handle);
+	err = dpio_enable(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpio_handle);
 	if (err) {
 		printf("dpio_enable() failed %d\n", err);
 		goto err_get_enable;
@@ -671,9 +673,9 @@
 
 err_get_swp_init:
 err_get_enable:
-	dpio_disable(dflt_mc_io, dflt_dpio_handle);
+	dpio_disable(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpio_handle);
 err_get_attr:
-	dpio_close(dflt_mc_io, dflt_dpio_handle);
+	dpio_close(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dpio_handle);
 err_open:
 	free(dflt_dpio);
 	return err;
@@ -710,8 +712,9 @@
 	} else if (!strcmp(obj_desc.type, "dpni")) {
 		strcpy(dpni_endpoint.type, obj_desc.type);
 		dpni_endpoint.id = obj_desc.id;
-		error = dprc_get_connection(dflt_mc_io, dprc_handle,
-				     &dpni_endpoint, &dpmac_endpoint, &state);
+		error = dprc_get_connection(dflt_mc_io, MC_CMD_NO_FLAGS,
+					    dprc_handle, &dpni_endpoint,
+					    &dpmac_endpoint, &state);
 		if (!strcmp(dpmac_endpoint.type, "dpmac"))
 			error = ldpaa_eth_init(obj_desc);
 		if (error < 0)
@@ -728,7 +731,7 @@
 
 	memset((void *)&obj_desc, 0x00, sizeof(struct dprc_obj_desc));
 
-	error = dprc_get_obj(dflt_mc_io, dprc_handle,
+	error = dprc_get_obj(dflt_mc_io, MC_CMD_NO_FLAGS, dprc_handle,
 			     i, &obj_desc);
 	if (error < 0) {
 		printf("dprc_get_obj(i=%d) failed: %d\n",
@@ -761,7 +764,8 @@
 	if (error < 0)
 		goto error;
 
-	error = dprc_get_container_id(dflt_mc_io, &container_id);
+	error = dprc_get_container_id(dflt_mc_io, MC_CMD_NO_FLAGS,
+				      &container_id);
 	if (error < 0) {
 		printf("dprc_get_container_id() failed: %d\n", error);
 		goto error;
@@ -769,7 +773,8 @@
 
 	debug("fsl-mc: Container id=0x%x\n", container_id);
 
-	error = dprc_open(dflt_mc_io, container_id, &dflt_dprc_handle);
+	error = dprc_open(dflt_mc_io, MC_CMD_NO_FLAGS, container_id,
+			  &dflt_dprc_handle);
 	if (error < 0) {
 		printf("dprc_open() failed: %d\n", error);
 		goto error;
@@ -777,7 +782,7 @@
 	dprc_opened = true;
 
 	error = dprc_get_obj_count(dflt_mc_io,
-				   dflt_dprc_handle,
+				   MC_CMD_NO_FLAGS, dflt_dprc_handle,
 				   &num_child_objects);
 	if (error < 0) {
 		printf("dprc_get_obj_count() failed: %d\n", error);
@@ -804,7 +809,7 @@
 	}
 error:
 	if (dprc_opened)
-		dprc_close(dflt_mc_io, dflt_dprc_handle);
+		dprc_close(dflt_mc_io, MC_CMD_NO_FLAGS, dflt_dprc_handle);
 
 	return error;
 }
@@ -814,17 +819,20 @@
 	int err;
 
 	if (get_mc_boot_status() == 0) {
-		err = dpio_disable(dflt_mc_io, dflt_dpio_handle);
+		err = dpio_disable(dflt_mc_io, MC_CMD_NO_FLAGS,
+				   dflt_dpio_handle);
 		if (err < 0) {
 			printf("dpio_disable() failed: %d\n", err);
 			return;
 		}
-		err = dpio_reset(dflt_mc_io, dflt_dpio_handle);
+		err = dpio_reset(dflt_mc_io, MC_CMD_NO_FLAGS,
+				 dflt_dpio_handle);
 		if (err < 0) {
 			printf("dpio_reset() failed: %d\n", err);
 			return;
 		}
-		err = dpio_close(dflt_mc_io, dflt_dpio_handle);
+		err = dpio_close(dflt_mc_io, MC_CMD_NO_FLAGS,
+				 dflt_dpio_handle);
 		if (err < 0) {
 			printf("dpio_close() failed: %d\n", err);
 			return;
diff --git a/drivers/net/fsl-mc/mc_sys.c b/drivers/net/fsl-mc/mc_sys.c
index 3fc1f98..2136670 100644
--- a/drivers/net/fsl-mc/mc_sys.c
+++ b/drivers/net/fsl-mc/mc_sys.c
@@ -14,7 +14,7 @@
 #include <asm/io.h>
 
 #define MC_CMD_HDR_READ_CMDID(_hdr) \
-	((uint16_t)u64_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S))
+	((uint16_t)mc_dec((_hdr), MC_CMD_HDR_CMDID_O, MC_CMD_HDR_CMDID_S))
 
 /**
  * mc_send_command - Send MC command and wait for response