RE: [PATCH 2/3] staging: fsl-mc: Move DPBP out of staging

2018-03-02 Thread Bogdan Purcareata
> -Original Message-
> From: Laurentiu Tudor
> Sent: Friday, March 02, 2018 11:18 AM
> To: Bogdan Purcareata <bogdan.purcare...@nxp.com>; gre...@linuxfoundation.org;
> Ruxandra Ioana Ciocoi Radulescu <ruxandra.radule...@nxp.com>
> Cc: stuyo...@gmail.com; Ioana Ciornei <ioana.cior...@nxp.com>; Nipun Gupta
> <nipun.gu...@nxp.com>; Roy Pledge <roy.ple...@nxp.com>; Horia Geantă
> <horia.gea...@nxp.com>; de...@driverdev.osuosl.org; linux-
> ker...@vger.kernel.org; linux-arm-ker...@lists.infradead.org
> Subject: Re: [PATCH 2/3] staging: fsl-mc: Move DPBP out of staging
> 
> Hi Bogdan,
> 
> On 03/01/2018 07:47 PM, Bogdan Purcareata wrote:
> > Move the source files out of staging into their final locations:
> > - dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure
> > - dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next
> >to the other internally used APIs
> > - dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public
> >API
> >
> > Update references in the dpaa2-eth staging driver.
> >
> > DPBP stands for Data Path Buffer Pool - you can read more about the
> > object in Documentation/networking/dpaa2/overview.rst
> >
> > Signed-off-by: Bogdan Purcareata <bogdan.purcare...@nxp.com>
> > ---
> >   drivers/bus/fsl-mc/Makefile   |  1 +
> >   drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c |  4 +-
> >   drivers/bus/fsl-mc/fsl-mc-private.h   | 39 +
> >   drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h|  2 +-
> >   drivers/staging/fsl-mc/bus/Makefile   |  3 +-
> >   drivers/staging/fsl-mc/bus/dpbp-cmd.h | 44 ---
> >   drivers/staging/fsl-mc/include/dpbp.h | 53 
> > 
> ---
> >   include/linux/fsl/mc.h| 42 ++
> >   8 files changed, 86 insertions(+), 102 deletions(-)
> >   rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (98%)
> >   delete mode 100644 drivers/staging/fsl-mc/bus/dpbp-cmd.h
> >   delete mode 100644 drivers/staging/fsl-mc/include/dpbp.h
> >
> > diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile
> > index 6a97f2c..da26e52 100644
> > --- a/drivers/bus/fsl-mc/Makefile
> > +++ b/drivers/bus/fsl-mc/Makefile
> > @@ -9,6 +9,7 @@ obj-$(CONFIG_FSL_MC_BUS) += mc-bus-driver.o
> >   mc-bus-driver-objs := fsl-mc-bus.o \
> >   mc-sys.o \
> >   mc-io.o \
> > + dpbp.o \
> >   dprc.o \
> >   dprc-driver.o \
> >   fsl-mc-allocator.o \
> > diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/bus/fsl-mc/dpbp.c
> > similarity index 98%
> > rename from drivers/staging/fsl-mc/bus/dpbp.c
> > rename to drivers/bus/fsl-mc/dpbp.c
> > index 85735bb..31a360b 100644
> > --- a/drivers/staging/fsl-mc/bus/dpbp.c
> > +++ b/drivers/bus/fsl-mc/dpbp.c
> > @@ -5,9 +5,9 @@
> >*/
> >   #include 
> >   #include 
> > -#include "../include/dpbp.h"
> > +#include "linux/fsl/mc.h"
> 
> I think we can use <> here, same comment for patch 3/3.
> 
> Other than that, the series looks ok to me so for all the patches:
> 
> Reviewed-by: Laurentiu Tudor <laurentiu.tu...@nxp.com>

Thank you!
I will update the patchset - seeing that the cleanup one has already been 
applied - and will send a v2 shortly.

Best regards,
Bogdan


RE: [PATCH 2/3] staging: fsl-mc: Move DPBP out of staging

2018-03-02 Thread Bogdan Purcareata
> -Original Message-
> From: Laurentiu Tudor
> Sent: Friday, March 02, 2018 11:18 AM
> To: Bogdan Purcareata ; gre...@linuxfoundation.org;
> Ruxandra Ioana Ciocoi Radulescu 
> Cc: stuyo...@gmail.com; Ioana Ciornei ; Nipun Gupta
> ; Roy Pledge ; Horia Geantă
> ; de...@driverdev.osuosl.org; linux-
> ker...@vger.kernel.org; linux-arm-ker...@lists.infradead.org
> Subject: Re: [PATCH 2/3] staging: fsl-mc: Move DPBP out of staging
> 
> Hi Bogdan,
> 
> On 03/01/2018 07:47 PM, Bogdan Purcareata wrote:
> > Move the source files out of staging into their final locations:
> > - dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure
> > - dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next
> >to the other internally used APIs
> > - dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public
> >API
> >
> > Update references in the dpaa2-eth staging driver.
> >
> > DPBP stands for Data Path Buffer Pool - you can read more about the
> > object in Documentation/networking/dpaa2/overview.rst
> >
> > Signed-off-by: Bogdan Purcareata 
> > ---
> >   drivers/bus/fsl-mc/Makefile   |  1 +
> >   drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c |  4 +-
> >   drivers/bus/fsl-mc/fsl-mc-private.h   | 39 +
> >   drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h|  2 +-
> >   drivers/staging/fsl-mc/bus/Makefile   |  3 +-
> >   drivers/staging/fsl-mc/bus/dpbp-cmd.h | 44 ---
> >   drivers/staging/fsl-mc/include/dpbp.h | 53 
> > 
> ---
> >   include/linux/fsl/mc.h| 42 ++
> >   8 files changed, 86 insertions(+), 102 deletions(-)
> >   rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (98%)
> >   delete mode 100644 drivers/staging/fsl-mc/bus/dpbp-cmd.h
> >   delete mode 100644 drivers/staging/fsl-mc/include/dpbp.h
> >
> > diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile
> > index 6a97f2c..da26e52 100644
> > --- a/drivers/bus/fsl-mc/Makefile
> > +++ b/drivers/bus/fsl-mc/Makefile
> > @@ -9,6 +9,7 @@ obj-$(CONFIG_FSL_MC_BUS) += mc-bus-driver.o
> >   mc-bus-driver-objs := fsl-mc-bus.o \
> >   mc-sys.o \
> >   mc-io.o \
> > + dpbp.o \
> >   dprc.o \
> >   dprc-driver.o \
> >   fsl-mc-allocator.o \
> > diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/bus/fsl-mc/dpbp.c
> > similarity index 98%
> > rename from drivers/staging/fsl-mc/bus/dpbp.c
> > rename to drivers/bus/fsl-mc/dpbp.c
> > index 85735bb..31a360b 100644
> > --- a/drivers/staging/fsl-mc/bus/dpbp.c
> > +++ b/drivers/bus/fsl-mc/dpbp.c
> > @@ -5,9 +5,9 @@
> >*/
> >   #include 
> >   #include 
> > -#include "../include/dpbp.h"
> > +#include "linux/fsl/mc.h"
> 
> I think we can use <> here, same comment for patch 3/3.
> 
> Other than that, the series looks ok to me so for all the patches:
> 
> Reviewed-by: Laurentiu Tudor 

Thank you!
I will update the patchset - seeing that the cleanup one has already been 
applied - and will send a v2 shortly.

Best regards,
Bogdan


Re: [PATCH 2/3] staging: fsl-mc: Move DPBP out of staging

2018-03-02 Thread Laurentiu Tudor
Hi Bogdan,

On 03/01/2018 07:47 PM, Bogdan Purcareata wrote:
> Move the source files out of staging into their final locations:
> - dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure
> - dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next
>to the other internally used APIs
> - dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public
>API
>
> Update references in the dpaa2-eth staging driver.
>
> DPBP stands for Data Path Buffer Pool - you can read more about the
> object in Documentation/networking/dpaa2/overview.rst
>
> Signed-off-by: Bogdan Purcareata 
> ---
>   drivers/bus/fsl-mc/Makefile   |  1 +
>   drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c |  4 +-
>   drivers/bus/fsl-mc/fsl-mc-private.h   | 39 +
>   drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h|  2 +-
>   drivers/staging/fsl-mc/bus/Makefile   |  3 +-
>   drivers/staging/fsl-mc/bus/dpbp-cmd.h | 44 ---
>   drivers/staging/fsl-mc/include/dpbp.h | 53 
> ---
>   include/linux/fsl/mc.h| 42 ++
>   8 files changed, 86 insertions(+), 102 deletions(-)
>   rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (98%)
>   delete mode 100644 drivers/staging/fsl-mc/bus/dpbp-cmd.h
>   delete mode 100644 drivers/staging/fsl-mc/include/dpbp.h
>
> diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile
> index 6a97f2c..da26e52 100644
> --- a/drivers/bus/fsl-mc/Makefile
> +++ b/drivers/bus/fsl-mc/Makefile
> @@ -9,6 +9,7 @@ obj-$(CONFIG_FSL_MC_BUS) += mc-bus-driver.o
>   mc-bus-driver-objs := fsl-mc-bus.o \
> mc-sys.o \
> mc-io.o \
> +   dpbp.o \
> dprc.o \
> dprc-driver.o \
> fsl-mc-allocator.o \
> diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/bus/fsl-mc/dpbp.c
> similarity index 98%
> rename from drivers/staging/fsl-mc/bus/dpbp.c
> rename to drivers/bus/fsl-mc/dpbp.c
> index 85735bb..31a360b 100644
> --- a/drivers/staging/fsl-mc/bus/dpbp.c
> +++ b/drivers/bus/fsl-mc/dpbp.c
> @@ -5,9 +5,9 @@
>*/
>   #include 
>   #include 
> -#include "../include/dpbp.h"
> +#include "linux/fsl/mc.h"

I think we can use <> here, same comment for patch 3/3.

Other than that, the series looks ok to me so for all the patches:

Reviewed-by: Laurentiu Tudor 

---
Best Regards, Laurentiu

> -#include "dpbp-cmd.h"
> +#include "fsl-mc-private.h"
>
>   /**
>* dpbp_open() - Open a control session for the specified object.
> diff --git a/drivers/bus/fsl-mc/fsl-mc-private.h 
> b/drivers/bus/fsl-mc/fsl-mc-private.h
> index bed990c..4ef8d7e 100644
> --- a/drivers/bus/fsl-mc/fsl-mc-private.h
> +++ b/drivers/bus/fsl-mc/fsl-mc-private.h
> @@ -379,6 +379,45 @@ int dprc_get_container_id(struct fsl_mc_io *mc_io,
> u32 cmd_flags,
> int *container_id);
>
> +/*
> + * Data Path Buffer Pool (DPBP) API
> + */
> +
> +/* DPBP Version */
> +#define DPBP_VER_MAJOR   3
> +#define DPBP_VER_MINOR   2
> +
> +/* Command versioning */
> +#define DPBP_CMD_BASE_VERSION1
> +#define DPBP_CMD_ID_OFFSET   4
> +
> +#define DPBP_CMD(id) (((id) << DPBP_CMD_ID_OFFSET) | DPBP_CMD_BASE_VERSION)
> +
> +/* Command IDs */
> +#define DPBP_CMDID_CLOSE DPBP_CMD(0x800)
> +#define DPBP_CMDID_OPEN  DPBP_CMD(0x804)
> +
> +#define DPBP_CMDID_ENABLEDPBP_CMD(0x002)
> +#define DPBP_CMDID_DISABLE   DPBP_CMD(0x003)
> +#define DPBP_CMDID_GET_ATTR  DPBP_CMD(0x004)
> +#define DPBP_CMDID_RESET DPBP_CMD(0x005)
> +
> +struct dpbp_cmd_open {
> + __le32 dpbp_id;
> +};
> +
> +#define DPBP_ENABLE  0x1
> +
> +struct dpbp_rsp_get_attributes {
> + /* response word 0 */
> + __le16 pad;
> + __le16 bpid;
> + __le32 id;
> + /* response word 1 */
> + __le16 version_major;
> + __le16 version_minor;
> +};
> +
>   /**
>* Maximum number of total IRQs that can be pre-allocated for an MC bus'
>* IRQ pool
> diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h 
> b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
> index e577410..ce864ee 100644
> --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
> +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
> @@ -35,10 +35,10 @@
>
>   #include 
>   #include 
> +#include 
>
>   #include "../../fsl-mc/include/dpaa2-io.h"
>   #include "../../fsl-mc/include/dpaa2-fd.h"
> -#include "../../fsl-mc/include/dpbp.h"
>   #include "../../fsl-mc/include/dpcon.h"
>   #include "dpni.h"
>   #include "dpni-cmd.h"
> diff --git a/drivers/staging/fsl-mc/bus/Makefile 
> b/drivers/staging/fsl-mc/bus/Makefile
> index b67889e..ea6479f 100644
> --- 

Re: [PATCH 2/3] staging: fsl-mc: Move DPBP out of staging

2018-03-02 Thread Laurentiu Tudor
Hi Bogdan,

On 03/01/2018 07:47 PM, Bogdan Purcareata wrote:
> Move the source files out of staging into their final locations:
> - dpbp.c goes to drivers/bus/fsl-mc/, next to the core infrastructure
> - dpbp-cmd.h gets merged into drivers/bus/fsl-mc/fsl-mc-private.h, next
>to the other internally used APIs
> - dpbp.h gets merged into include/linux/fsl/mc.h, exposing the public
>API
>
> Update references in the dpaa2-eth staging driver.
>
> DPBP stands for Data Path Buffer Pool - you can read more about the
> object in Documentation/networking/dpaa2/overview.rst
>
> Signed-off-by: Bogdan Purcareata 
> ---
>   drivers/bus/fsl-mc/Makefile   |  1 +
>   drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c |  4 +-
>   drivers/bus/fsl-mc/fsl-mc-private.h   | 39 +
>   drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h|  2 +-
>   drivers/staging/fsl-mc/bus/Makefile   |  3 +-
>   drivers/staging/fsl-mc/bus/dpbp-cmd.h | 44 ---
>   drivers/staging/fsl-mc/include/dpbp.h | 53 
> ---
>   include/linux/fsl/mc.h| 42 ++
>   8 files changed, 86 insertions(+), 102 deletions(-)
>   rename drivers/{staging/fsl-mc/bus => bus/fsl-mc}/dpbp.c (98%)
>   delete mode 100644 drivers/staging/fsl-mc/bus/dpbp-cmd.h
>   delete mode 100644 drivers/staging/fsl-mc/include/dpbp.h
>
> diff --git a/drivers/bus/fsl-mc/Makefile b/drivers/bus/fsl-mc/Makefile
> index 6a97f2c..da26e52 100644
> --- a/drivers/bus/fsl-mc/Makefile
> +++ b/drivers/bus/fsl-mc/Makefile
> @@ -9,6 +9,7 @@ obj-$(CONFIG_FSL_MC_BUS) += mc-bus-driver.o
>   mc-bus-driver-objs := fsl-mc-bus.o \
> mc-sys.o \
> mc-io.o \
> +   dpbp.o \
> dprc.o \
> dprc-driver.o \
> fsl-mc-allocator.o \
> diff --git a/drivers/staging/fsl-mc/bus/dpbp.c b/drivers/bus/fsl-mc/dpbp.c
> similarity index 98%
> rename from drivers/staging/fsl-mc/bus/dpbp.c
> rename to drivers/bus/fsl-mc/dpbp.c
> index 85735bb..31a360b 100644
> --- a/drivers/staging/fsl-mc/bus/dpbp.c
> +++ b/drivers/bus/fsl-mc/dpbp.c
> @@ -5,9 +5,9 @@
>*/
>   #include 
>   #include 
> -#include "../include/dpbp.h"
> +#include "linux/fsl/mc.h"

I think we can use <> here, same comment for patch 3/3.

Other than that, the series looks ok to me so for all the patches:

Reviewed-by: Laurentiu Tudor 

---
Best Regards, Laurentiu

> -#include "dpbp-cmd.h"
> +#include "fsl-mc-private.h"
>
>   /**
>* dpbp_open() - Open a control session for the specified object.
> diff --git a/drivers/bus/fsl-mc/fsl-mc-private.h 
> b/drivers/bus/fsl-mc/fsl-mc-private.h
> index bed990c..4ef8d7e 100644
> --- a/drivers/bus/fsl-mc/fsl-mc-private.h
> +++ b/drivers/bus/fsl-mc/fsl-mc-private.h
> @@ -379,6 +379,45 @@ int dprc_get_container_id(struct fsl_mc_io *mc_io,
> u32 cmd_flags,
> int *container_id);
>
> +/*
> + * Data Path Buffer Pool (DPBP) API
> + */
> +
> +/* DPBP Version */
> +#define DPBP_VER_MAJOR   3
> +#define DPBP_VER_MINOR   2
> +
> +/* Command versioning */
> +#define DPBP_CMD_BASE_VERSION1
> +#define DPBP_CMD_ID_OFFSET   4
> +
> +#define DPBP_CMD(id) (((id) << DPBP_CMD_ID_OFFSET) | DPBP_CMD_BASE_VERSION)
> +
> +/* Command IDs */
> +#define DPBP_CMDID_CLOSE DPBP_CMD(0x800)
> +#define DPBP_CMDID_OPEN  DPBP_CMD(0x804)
> +
> +#define DPBP_CMDID_ENABLEDPBP_CMD(0x002)
> +#define DPBP_CMDID_DISABLE   DPBP_CMD(0x003)
> +#define DPBP_CMDID_GET_ATTR  DPBP_CMD(0x004)
> +#define DPBP_CMDID_RESET DPBP_CMD(0x005)
> +
> +struct dpbp_cmd_open {
> + __le32 dpbp_id;
> +};
> +
> +#define DPBP_ENABLE  0x1
> +
> +struct dpbp_rsp_get_attributes {
> + /* response word 0 */
> + __le16 pad;
> + __le16 bpid;
> + __le32 id;
> + /* response word 1 */
> + __le16 version_major;
> + __le16 version_minor;
> +};
> +
>   /**
>* Maximum number of total IRQs that can be pre-allocated for an MC bus'
>* IRQ pool
> diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h 
> b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
> index e577410..ce864ee 100644
> --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
> +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
> @@ -35,10 +35,10 @@
>
>   #include 
>   #include 
> +#include 
>
>   #include "../../fsl-mc/include/dpaa2-io.h"
>   #include "../../fsl-mc/include/dpaa2-fd.h"
> -#include "../../fsl-mc/include/dpbp.h"
>   #include "../../fsl-mc/include/dpcon.h"
>   #include "dpni.h"
>   #include "dpni-cmd.h"
> diff --git a/drivers/staging/fsl-mc/bus/Makefile 
> b/drivers/staging/fsl-mc/bus/Makefile
> index b67889e..ea6479f 100644
> --- a/drivers/staging/fsl-mc/bus/Makefile
> +++