Re: [PATCH] staging: fsl-mc: up-rev version of MC interface code

2015-09-16 Thread Greg KH
On Tue, Sep 15, 2015 at 03:22:00PM -0500, J. German Rivera wrote:
> The DPAA2 management complex has a versioned binary interface
> that has to be kept in sync with the DPAA2 drivers. This patch
> uprevs the APIs that build MC commands and parse results.
> This uprev is needed to support object interrupts.
> 
> MC binary interface changes
>-overall version from 6.0 to 8.0
>-dprc version from 3.0 to 4.0
>-dpbp and dpmcp versions from 2.0 to 2.1
>-new dprc commands -- set/get obj irq, set obj label,
> get obj descriptor
>-removed commands -- get portal paddr
>-object regions are reported as region offsets not physical
> addresses
> 
> build/parse API changes
>-flags arg is added to all APIs for future extensibility,
> hardcoded priority bit is now a flag
>-IRQ-related args are consolidated into an irq_cfg struct
> 
> Signed-off-by: J. German Rivera 
> ---
>  drivers/staging/fsl-mc/bus/dpbp.c   | 141 ++---
>  drivers/staging/fsl-mc/bus/dpmcp-cmd.h  |   2 +-
>  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|   8 +-
>  drivers/staging/fsl-mc/bus/dprc.c   | 464 
> +++-
>  drivers/staging/fsl-mc/bus/mc-allocator.c   |   6 +-
>  drivers/staging/fsl-mc/bus/mc-bus.c |  54 +++-
>  drivers/staging/fsl-mc/include/dpbp-cmd.h   |   2 +-
>  drivers/staging/fsl-mc/include/dpbp.h   |  91 --
>  drivers/staging/fsl-mc/include/dpcon-cmd.h  |   2 +-
>  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 |  15 +-
>  17 files changed, 1052 insertions(+), 355 deletions(-)

This patch does many things all at once.  Please break it up into
different logical patches, each one only doing one thing, and send it as
a series so that it can be properly reviewed and applied to the tree.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] staging: fsl-mc: up-rev version of MC interface code

2015-09-16 Thread Greg KH
On Tue, Sep 15, 2015 at 03:22:00PM -0500, J. German Rivera wrote:
> The DPAA2 management complex has a versioned binary interface
> that has to be kept in sync with the DPAA2 drivers. This patch
> uprevs the APIs that build MC commands and parse results.
> This uprev is needed to support object interrupts.
> 
> MC binary interface changes
>-overall version from 6.0 to 8.0
>-dprc version from 3.0 to 4.0
>-dpbp and dpmcp versions from 2.0 to 2.1
>-new dprc commands -- set/get obj irq, set obj label,
> get obj descriptor
>-removed commands -- get portal paddr
>-object regions are reported as region offsets not physical
> addresses
> 
> build/parse API changes
>-flags arg is added to all APIs for future extensibility,
> hardcoded priority bit is now a flag
>-IRQ-related args are consolidated into an irq_cfg struct
> 
> Signed-off-by: J. German Rivera 
> ---
>  drivers/staging/fsl-mc/bus/dpbp.c   | 141 ++---
>  drivers/staging/fsl-mc/bus/dpmcp-cmd.h  |   2 +-
>  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|   8 +-
>  drivers/staging/fsl-mc/bus/dprc.c   | 464 
> +++-
>  drivers/staging/fsl-mc/bus/mc-allocator.c   |   6 +-
>  drivers/staging/fsl-mc/bus/mc-bus.c |  54 +++-
>  drivers/staging/fsl-mc/include/dpbp-cmd.h   |   2 +-
>  drivers/staging/fsl-mc/include/dpbp.h   |  91 --
>  drivers/staging/fsl-mc/include/dpcon-cmd.h  |   2 +-
>  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 |  15 +-
>  17 files changed, 1052 insertions(+), 355 deletions(-)

This patch does many things all at once.  Please break it up into
different logical patches, each one only doing one thing, and send it as
a series so that it can be properly reviewed and applied to the tree.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] staging: fsl-mc: up-rev version of MC interface code

2015-09-15 Thread J. German Rivera
The DPAA2 management complex has a versioned binary interface
that has to be kept in sync with the DPAA2 drivers. This patch
uprevs the APIs that build MC commands and parse results.
This uprev is needed to support object interrupts.

MC binary interface changes
   -overall version from 6.0 to 8.0
   -dprc version from 3.0 to 4.0
   -dpbp and dpmcp versions from 2.0 to 2.1
   -new dprc commands -- set/get obj irq, set obj label,
get obj descriptor
   -removed commands -- get portal paddr
   -object regions are reported as region offsets not physical
addresses

build/parse API changes
   -flags arg is added to all APIs for future extensibility,
hardcoded priority bit is now a flag
   -IRQ-related args are consolidated into an irq_cfg struct

Signed-off-by: J. German Rivera 
---
 drivers/staging/fsl-mc/bus/dpbp.c   | 141 ++---
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h  |   2 +-
 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|   8 +-
 drivers/staging/fsl-mc/bus/dprc.c   | 464 +++-
 drivers/staging/fsl-mc/bus/mc-allocator.c   |   6 +-
 drivers/staging/fsl-mc/bus/mc-bus.c |  54 +++-
 drivers/staging/fsl-mc/include/dpbp-cmd.h   |   2 +-
 drivers/staging/fsl-mc/include/dpbp.h   |  91 --
 drivers/staging/fsl-mc/include/dpcon-cmd.h  |   2 +-
 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 |  15 +-
 17 files changed, 1052 insertions(+), 355 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpbp.c 
b/drivers/staging/fsl-mc/bus/dpbp.c
index d99ab6d..04775db8 100644
--- a/drivers/staging/fsl-mc/bus/dpbp.c
+++ b/drivers/staging/fsl-mc/bus/dpbp.c
@@ -34,14 +34,19 @@
 #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_flags,
+ 0);
+
cmd.params[0] |= mc_enc(0, 32, dpbp_id);
 
/* send command to mc*/
@@ -54,22 +59,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, );
 }
-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 +86,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, );
@@ -93,50 +100,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, );
 }
 
-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, 

[PATCH] staging: fsl-mc: up-rev version of MC interface code

2015-09-15 Thread J. German Rivera
The DPAA2 management complex has a versioned binary interface
that has to be kept in sync with the DPAA2 drivers. This patch
uprevs the APIs that build MC commands and parse results.
This uprev is needed to support object interrupts.

MC binary interface changes
   -overall version from 6.0 to 8.0
   -dprc version from 3.0 to 4.0
   -dpbp and dpmcp versions from 2.0 to 2.1
   -new dprc commands -- set/get obj irq, set obj label,
get obj descriptor
   -removed commands -- get portal paddr
   -object regions are reported as region offsets not physical
addresses

build/parse API changes
   -flags arg is added to all APIs for future extensibility,
hardcoded priority bit is now a flag
   -IRQ-related args are consolidated into an irq_cfg struct

Signed-off-by: J. German Rivera 
---
 drivers/staging/fsl-mc/bus/dpbp.c   | 141 ++---
 drivers/staging/fsl-mc/bus/dpmcp-cmd.h  |   2 +-
 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|   8 +-
 drivers/staging/fsl-mc/bus/dprc.c   | 464 +++-
 drivers/staging/fsl-mc/bus/mc-allocator.c   |   6 +-
 drivers/staging/fsl-mc/bus/mc-bus.c |  54 +++-
 drivers/staging/fsl-mc/include/dpbp-cmd.h   |   2 +-
 drivers/staging/fsl-mc/include/dpbp.h   |  91 --
 drivers/staging/fsl-mc/include/dpcon-cmd.h  |   2 +-
 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 |  15 +-
 17 files changed, 1052 insertions(+), 355 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dpbp.c 
b/drivers/staging/fsl-mc/bus/dpbp.c
index d99ab6d..04775db8 100644
--- a/drivers/staging/fsl-mc/bus/dpbp.c
+++ b/drivers/staging/fsl-mc/bus/dpbp.c
@@ -34,14 +34,19 @@
 #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_flags,
+ 0);
+
cmd.params[0] |= mc_enc(0, 32, dpbp_id);
 
/* send command to mc*/
@@ -54,22 +59,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, );
 }
-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 +86,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, );
@@ -93,50 +100,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, );
 }
 
-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 =