These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / staging / fsl-mc / bus / dpmng.c
index 58328e8..f633fcd 100644 (file)
 #include "../include/dpmng.h"
 #include "dpmng-cmd.h"
 
-int mc_get_version(struct fsl_mc_io *mc_io, struct mc_version *mc_ver_info)
+/**
+ * mc_get_version() - Retrieves the Management Complex firmware
+ *                     version information
+ * @mc_io:             Pointer to opaque I/O object
+ * @cmd_flags:         Command flags; one or more of 'MC_CMD_FLAG_'
+ * @mc_ver_info:       Returned version information structure
+ *
+ * Return:     '0' on Success; Error code otherwise.
+ */
+int mc_get_version(struct fsl_mc_io *mc_io,
+                  u32 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 +68,25 @@ 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)
+/**
+ * dpmng_get_container_id() - Get container ID associated with a given portal.
+ * @mc_io:             Pointer to MC portal's I/O object
+ * @cmd_flags:         Command flags; one or more of 'MC_CMD_FLAG_'
+ * @container_id:      Requested container ID
+ *
+ * Return:     '0' on Success; Error code otherwise.
+ */
+int dpmng_get_container_id(struct fsl_mc_io *mc_io,
+                          u32 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);