From: "J. German Rivera" <German.Rivera@freescale.com>
To: <gregkh@linuxfoundation.org>, <arnd@arndb.de>,
<devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>
Cc: <stuart.yoder@freescale.com>, <itai.katz@freescale.com>,
<leoli@freescale.com>, <scottwood@freescale.com>, <agraf@suse.de>,
<bhamciu1@freescale.com>, <R89243@freescale.com>,
<bhupesh.sharma@freescale.com>, <nir.erez@freescale.com>,
<richard.schmitt@freescale.com>, <dan.carpenter@oracle.com>,
"J. German Rivera" <German.Rivera@freescale.com>
Subject: [PATCH v2 2/6] staging: fsl-mc: uprev dpmng binary interface to v8.0
Date: Tue, 22 Sep 2015 18:08:55 -0500 [thread overview]
Message-ID: <1442963339-32084-3-git-send-email-German.Rivera@freescale.com> (raw)
In-Reply-To: <1442963339-32084-1-git-send-email-German.Rivera@freescale.com>
Add cmd_flags parameter to all dpmng APIs to comply
with 8.0 MC firmware interface. Updated MC version
major number.
---
drivers/staging/fsl-mc/bus/dpmng.c | 14 ++++++++++----
drivers/staging/fsl-mc/bus/mc-bus.c | 4 ++--
drivers/staging/fsl-mc/include/dpmng.h | 14 ++++++++++----
3 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/dpmng.c b/drivers/staging/fsl-mc/bus/dpmng.c
index 58328e8..1aeca05 100644
--- a/drivers/staging/fsl-mc/bus/dpmng.c
+++ b/drivers/staging/fsl-mc/bus/dpmng.c
@@ -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);
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
index b3a60a0..f3718a3 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -630,7 +630,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
if (error < 0)
return error;
- error = mc_get_version(mc_io, &mc_version);
+ error = mc_get_version(mc_io, 0, &mc_version);
if (error != 0) {
dev_err(&pdev->dev,
"mc_get_version() failed with error %d\n", error);
@@ -661,7 +661,7 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
if (error < 0)
goto error_cleanup_mc_io;
- error = dpmng_get_container_id(mc_io, &container_id);
+ error = dpmng_get_container_id(mc_io, 0, &container_id);
if (error < 0) {
dev_err(&pdev->dev,
"dpmng_get_container_id() failed: %d\n", error);
diff --git a/drivers/staging/fsl-mc/include/dpmng.h b/drivers/staging/fsl-mc/include/dpmng.h
index 1b052b8..4a0996c 100644
--- a/drivers/staging/fsl-mc/include/dpmng.h
+++ b/drivers/staging/fsl-mc/include/dpmng.h
@@ -41,11 +41,11 @@ struct fsl_mc_io;
/**
* Management Complex firmware version information
*/
-#define MC_VER_MAJOR 6
+#define MC_VER_MAJOR 8
#define MC_VER_MINOR 0
/**
- * struct mc_versoin
+ * struct mc_version
* @major: Major version number: incremented on API compatibility changes
* @minor: Minor version number: incremented on API additions (that are
* backward compatible); reset when major version is incremented
@@ -62,19 +62,25 @@ struct mc_version {
* 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, 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);
/**
* 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, int *container_id);
+int dpmng_get_container_id(struct fsl_mc_io *mc_io,
+ uint32_t cmd_flags,
+ int *container_id);
#endif /* __FSL_DPMNG_H */
--
2.3.3
next prev parent reply other threads:[~2015-09-22 23:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 23:08 [PATCH v2 0/6] staging: fsl-mc: up-rev version of MC interface code J. German Rivera
2015-09-22 23:08 ` [PATCH v2 1/6] staging: fsl-mc: Add new flags field to MC command header J. German Rivera
2015-09-22 23:08 ` J. German Rivera [this message]
2015-09-22 23:08 ` [PATCH v2 3/6] staging: fsl-mc: up-rev dpbp binary interface to v2.0 J. German Rivera
2015-09-23 3:08 ` Greg KH
2015-09-22 23:08 ` [PATCH v2 4/6] staging: fsl-mc: up-rev dpmcp " J. German Rivera
2015-09-22 23:08 ` [PATCH v2 5/6] staging: fsl-mc: up-rev dpcon " J. German Rivera
2015-09-22 23:08 ` [PATCH v2 6/6] staging: fsl-mc: up-rev dprc binary interface to v4.0 J. German Rivera
2015-09-23 9:26 ` Dan Carpenter
2015-09-24 18:39 ` Jose Rivera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442963339-32084-3-git-send-email-German.Rivera@freescale.com \
--to=german.rivera@freescale.com \
--cc=R89243@freescale.com \
--cc=agraf@suse.de \
--cc=arnd@arndb.de \
--cc=bhamciu1@freescale.com \
--cc=bhupesh.sharma@freescale.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=itai.katz@freescale.com \
--cc=leoli@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nir.erez@freescale.com \
--cc=richard.schmitt@freescale.com \
--cc=scottwood@freescale.com \
--cc=stuart.yoder@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®