RE: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host Bridge IP driver

2019-03-29 Thread Z.q. Hou
Hi Lorenzo,

Thanks a lot for your comments!

> -Original Message-
> From: Lorenzo Pieralisi 
> Sent: 2019年3月29日 0:09
> To: Z.q. Hou 
> Cc: linux-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
> devicet...@vger.kernel.org; linux-kernel@vger.kernel.org;
> bhelg...@google.com; robh...@kernel.org; mark.rutl...@arm.com;
> l.subrahma...@mobiveil.co.in; shawn...@kernel.org; Leo Li
> ; catalin.mari...@arm.com; will.dea...@arm.com;
> Mingkai Hu ; M.h. Lian ;
> Xiaowei Bao 
> Subject: Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host
> Bridge IP driver
> 
> On Thu, Mar 28, 2019 at 02:09:55AM +, Z.q. Hou wrote:
> 
> [...]
> 
> > > > > On Mon, Mar 11, 2019 at 09:32:04AM +, Z.q. Hou wrote:
> > > > > > From: Hou Zhiqiang 
> > > > > >
> > > > > > As the Mobiveil PCIe controller support RC DAUL mode, and to
> make
> > > > > > platforms which integrated the Mobiveil PCIe IP more easy to add
> their
> > > > > > drivers, this patch moved the Mobiveil driver to a new directory
> > > > > > 'drivers/pci/controller/mobiveil' and refactored it according to the
> > > > > > abstraction of RC (EP driver will be added later).
> > > > >
> > > > > I do not want to create a subdirectory for every controller that can
> work in
> > > > > RC so drop this patch, more so given that it will be required 
> > > > > "later",
> we
> > > > > will create a directory when and if we actually have to.
> > > >
> > > > Please don't drop this patch, Xiaowei Bao has sent v1 of the EP mode
> > > > driver, which is depends on this patch.
> > >
> > > I understand but he will have to rebase that code anyway, I do
> > > not want to create a directory for mobiveil before I see other
> > > IPs built on it, we did not do it for the cadence and rockchip
> > > controllers either. So you will have to drop this patch and
> > > rework it.
> >
> > It's different from cadence and rockchip cases, they only have 1
> > driver, so do not need to create a directory, while we have NXP's
> > LX2160 platform and Mobiveil's FPGA platform both use Mobiveil's GPEX
> > IP, so we already have 2 drivers, so I think it is reasonable to
> > collect into an new directory.
> 
> Wrap your messages to 80 characters per line. OK, please follow
> Bjorn's guidelines when reposting and split the series as
> discussed.

OK, I will.

Thanks,
Zhiqiang

> Thanks,
> Lorenzo
> 
> > Thanks,
> > Zhiqiang
> >
> > > Thanks,
> > > Lorenzo
> > >
> > > > > Thanks,
> > > > > Lorenzo
> > > > >
> > > > > > Signed-off-by: Hou Zhiqiang 
> > > > > > Reviewed-by: Minghuan Lian 
> > > > > > Reviewed-by: Subrahmanya Lingappa
> 
> > > > > > ---
> > > > > > V4:
> > > > > >  - no change
> > > > > >
> > > > > >  MAINTAINERS   |   2 +-
> > > > > >  drivers/pci/controller/Kconfig|  11 +-
> > > > > >  drivers/pci/controller/Makefile   |   2 +-
> > > > > >  drivers/pci/controller/mobiveil/Kconfig   |  24 +
> > > > > >  drivers/pci/controller/mobiveil/Makefile  |   4 +
> > > > > >  .../pcie-mobiveil-host.c} | 528
> > > +++---
> > > > > >  .../controller/mobiveil/pcie-mobiveil-plat.c  |  54 ++
> > > > > >  .../pci/controller/mobiveil/pcie-mobiveil.c   | 228 
> > > > > >  .../pci/controller/mobiveil/pcie-mobiveil.h   | 187 +++
> > > > > >  9 files changed, 587 insertions(+), 453 deletions(-)  create mode
> > > > > > 100644 drivers/pci/controller/mobiveil/Kconfig
> > > > > >  create mode 100644 drivers/pci/controller/mobiveil/Makefile
> > > > > >  rename drivers/pci/controller/{pcie-mobiveil.c =>
> > > > > > mobiveil/pcie-mobiveil-host.c} (55%)  create mode 100644
> > > > > > drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c
> > > > > >  create mode 100644
> drivers/pci/controller/mobiveil/pcie-mobiveil.c
> > > > > >  create mode 100644
> drivers/pci/controller/mobiveil/pcie-mobiveil.h
> > > > > >
> > > > > > diff --git a/MAINTAINERS b/MAINTAINERS index
> > > &

Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host Bridge IP driver

2019-03-28 Thread Lorenzo Pieralisi
On Thu, Mar 28, 2019 at 02:09:55AM +, Z.q. Hou wrote:

[...]

> > > > On Mon, Mar 11, 2019 at 09:32:04AM +, Z.q. Hou wrote:
> > > > > From: Hou Zhiqiang 
> > > > >
> > > > > As the Mobiveil PCIe controller support RC DAUL mode, and to make
> > > > > platforms which integrated the Mobiveil PCIe IP more easy to add their
> > > > > drivers, this patch moved the Mobiveil driver to a new directory
> > > > > 'drivers/pci/controller/mobiveil' and refactored it according to the
> > > > > abstraction of RC (EP driver will be added later).
> > > >
> > > > I do not want to create a subdirectory for every controller that can 
> > > > work in
> > > > RC so drop this patch, more so given that it will be required 
> > > > "later", we
> > > > will create a directory when and if we actually have to.
> > >
> > > Please don't drop this patch, Xiaowei Bao has sent v1 of the EP mode
> > > driver, which is depends on this patch.
> > 
> > I understand but he will have to rebase that code anyway, I do
> > not want to create a directory for mobiveil before I see other
> > IPs built on it, we did not do it for the cadence and rockchip
> > controllers either. So you will have to drop this patch and
> > rework it.
> 
> It's different from cadence and rockchip cases, they only have 1
> driver, so do not need to create a directory, while we have NXP's
> LX2160 platform and Mobiveil's FPGA platform both use Mobiveil's GPEX
> IP, so we already have 2 drivers, so I think it is reasonable to
> collect into an new directory.

Wrap your messages to 80 characters per line. OK, please follow
Bjorn's guidelines when reposting and split the series as
discussed.

Thanks,
Lorenzo

> Thanks,
> Zhiqiang
> 
> > Thanks,
> > Lorenzo
> > 
> > > > Thanks,
> > > > Lorenzo
> > > >
> > > > > Signed-off-by: Hou Zhiqiang 
> > > > > Reviewed-by: Minghuan Lian 
> > > > > Reviewed-by: Subrahmanya Lingappa 
> > > > > ---
> > > > > V4:
> > > > >  - no change
> > > > >
> > > > >  MAINTAINERS   |   2 +-
> > > > >  drivers/pci/controller/Kconfig|  11 +-
> > > > >  drivers/pci/controller/Makefile   |   2 +-
> > > > >  drivers/pci/controller/mobiveil/Kconfig   |  24 +
> > > > >  drivers/pci/controller/mobiveil/Makefile  |   4 +
> > > > >  .../pcie-mobiveil-host.c} | 528
> > +++---
> > > > >  .../controller/mobiveil/pcie-mobiveil-plat.c  |  54 ++
> > > > >  .../pci/controller/mobiveil/pcie-mobiveil.c   | 228 
> > > > >  .../pci/controller/mobiveil/pcie-mobiveil.h   | 187 +++
> > > > >  9 files changed, 587 insertions(+), 453 deletions(-)  create mode
> > > > > 100644 drivers/pci/controller/mobiveil/Kconfig
> > > > >  create mode 100644 drivers/pci/controller/mobiveil/Makefile
> > > > >  rename drivers/pci/controller/{pcie-mobiveil.c =>
> > > > > mobiveil/pcie-mobiveil-host.c} (55%)  create mode 100644
> > > > > drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c
> > > > >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.c
> > > > >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.h
> > > > >
> > > > > diff --git a/MAINTAINERS b/MAINTAINERS index
> > > > > 1e64279f338a..1013e74b14f2 100644
> > > > > --- a/MAINTAINERS
> > > > > +++ b/MAINTAINERS
> > > > > @@ -11877,7 +11877,7 @@ M:Subrahmanya Lingappa
> > > > 
> > > > >  L:   linux-...@vger.kernel.org
> > > > >  S:   Supported
> > > > >  F:   Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
> > > > > -F:   drivers/pci/controller/pcie-mobiveil.c
> > > > > +F:   drivers/pci/controller/mobiveil/pcie-mobiveil*
> > > > >
> > > > >  PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC
> > > > support)
> > > > >  M:   Thomas Petazzoni 
> > > > > diff --git a/drivers/pci/controller/Kconfig
> > > > > b/drivers/pci/controller/Kconfig index 6671946dbf66..0e981ed00a75
> > > > > 100644
> > > > > --- a/drivers/pci/controller/Kconfig
> > > > > +++ b/drivers/pci/controller/Kconfig
> > > > > @@ -241,16 +241,6 @@ config PCIE_MEDIATEK
> > > > > Say Y here if you want to enable PCIe controller support on
> > > > > MediaTek SoCs.
> > > > >
> > > > > -config PCIE_MOBIVEIL
> > > > > - bool "Mobiveil AXI PCIe controller"
> > > > > - depends on ARCH_ZYNQMP || COMPILE_TEST
> > > > > - depends on OF
> > > > > - depends on PCI_MSI_IRQ_DOMAIN
> > > > > - help
> > > > > -   Say Y here if you want to enable support for the Mobiveil AXI 
> > > > > PCIe
> > > > > -   Soft IP. It has up to 8 outbound and inbound windows
> > > > > -   for address translation and it is a PCIe Gen4 IP.
> > > > > -
> > > > >  config PCIE_TANGO_SMP8759
> > > > >   bool "Tango SMP8759 PCIe controller (DANGEROUS)"
> > > > >   depends on ARCH_TANGO && PCI_MSI && OF @@ -281,4 +271,5
> > @@
> > > > config
> > > > > VMD
> > > > > module will be called vmd.
> > > > >
> > > > >  source "drivers/pci/controller/dwc/Kconfig"
> > > > > +source 

RE: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host Bridge IP driver

2019-03-27 Thread Z.q. Hou
Hi Lorenzo,

Thanks a lot for your comments!

> -Original Message-
> From: Lorenzo Pieralisi 
> Sent: 2019年3月28日 1:39
> To: Z.q. Hou 
> Cc: linux-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
> devicet...@vger.kernel.org; linux-kernel@vger.kernel.org;
> bhelg...@google.com; robh...@kernel.org; mark.rutl...@arm.com;
> l.subrahma...@mobiveil.co.in; shawn...@kernel.org; Leo Li
> ; catalin.mari...@arm.com; will.dea...@arm.com;
> Mingkai Hu ; M.h. Lian ;
> Xiaowei Bao 
> Subject: Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host
> Bridge IP driver
> 
> On Wed, Mar 27, 2019 at 02:04:00AM +, Z.q. Hou wrote:
> > Hi Lorenzo,
> >
> > Thanks for your comments!
> >
> > > -Original Message-
> > > From: Lorenzo Pieralisi 
> > > Sent: 2019年3月27日 1:34
> > > To: Z.q. Hou 
> > > Cc: linux-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
> > > devicet...@vger.kernel.org; linux-kernel@vger.kernel.org;
> > > bhelg...@google.com; robh...@kernel.org; mark.rutl...@arm.com;
> > > l.subrahma...@mobiveil.co.in; shawn...@kernel.org; Leo Li
> > > ; catalin.mari...@arm.com;
> will.dea...@arm.com;
> > > Mingkai Hu ; M.h. Lian
> ;
> > > Xiaowei Bao 
> > > Subject: Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host
> > > Bridge IP driver
> > >
> > > On Mon, Mar 11, 2019 at 09:32:04AM +, Z.q. Hou wrote:
> > > > From: Hou Zhiqiang 
> > > >
> > > > As the Mobiveil PCIe controller support RC DAUL mode, and to make
> > > > platforms which integrated the Mobiveil PCIe IP more easy to add their
> > > > drivers, this patch moved the Mobiveil driver to a new directory
> > > > 'drivers/pci/controller/mobiveil' and refactored it according to the
> > > > abstraction of RC (EP driver will be added later).
> > >
> > > I do not want to create a subdirectory for every controller that can work 
> > > in
> > > RC so drop this patch, more so given that it will be required "later", 
> > > we
> > > will create a directory when and if we actually have to.
> >
> > Please don't drop this patch, Xiaowei Bao has sent v1 of the EP mode
> > driver, which is depends on this patch.
> 
> I understand but he will have to rebase that code anyway, I do
> not want to create a directory for mobiveil before I see other
> IPs built on it, we did not do it for the cadence and rockchip
> controllers either. So you will have to drop this patch and
> rework it.

It's different from cadence and rockchip cases, they only have 1 driver, so do 
not need to create a directory, while we have NXP's LX2160 platform and 
Mobiveil's FPGA platform both use Mobiveil's GPEX IP, so we already have 2 
drivers, so I think it is reasonable to collect into an new directory.

Thanks,
Zhiqiang

> Thanks,
> Lorenzo
> 
> > > Thanks,
> > > Lorenzo
> > >
> > > > Signed-off-by: Hou Zhiqiang 
> > > > Reviewed-by: Minghuan Lian 
> > > > Reviewed-by: Subrahmanya Lingappa 
> > > > ---
> > > > V4:
> > > >  - no change
> > > >
> > > >  MAINTAINERS   |   2 +-
> > > >  drivers/pci/controller/Kconfig|  11 +-
> > > >  drivers/pci/controller/Makefile   |   2 +-
> > > >  drivers/pci/controller/mobiveil/Kconfig   |  24 +
> > > >  drivers/pci/controller/mobiveil/Makefile  |   4 +
> > > >  .../pcie-mobiveil-host.c} | 528
> +++---
> > > >  .../controller/mobiveil/pcie-mobiveil-plat.c  |  54 ++
> > > >  .../pci/controller/mobiveil/pcie-mobiveil.c   | 228 
> > > >  .../pci/controller/mobiveil/pcie-mobiveil.h   | 187 +++
> > > >  9 files changed, 587 insertions(+), 453 deletions(-)  create mode
> > > > 100644 drivers/pci/controller/mobiveil/Kconfig
> > > >  create mode 100644 drivers/pci/controller/mobiveil/Makefile
> > > >  rename drivers/pci/controller/{pcie-mobiveil.c =>
> > > > mobiveil/pcie-mobiveil-host.c} (55%)  create mode 100644
> > > > drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c
> > > >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.c
> > > >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.h
> > > >
> > > > diff --git a/MAINTAINERS b/MAINTAINERS index
> > > > 1e64279f338a..1013e74b14f2 100644
> > > > --- a/MAINTAINERS
> >

Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host Bridge IP driver

2019-03-27 Thread Lorenzo Pieralisi
On Wed, Mar 27, 2019 at 02:04:00AM +, Z.q. Hou wrote:
> Hi Lorenzo,
> 
> Thanks for your comments!
> 
> > -Original Message-
> > From: Lorenzo Pieralisi 
> > Sent: 2019年3月27日 1:34
> > To: Z.q. Hou 
> > Cc: linux-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
> > devicet...@vger.kernel.org; linux-kernel@vger.kernel.org;
> > bhelg...@google.com; robh...@kernel.org; mark.rutl...@arm.com;
> > l.subrahma...@mobiveil.co.in; shawn...@kernel.org; Leo Li
> > ; catalin.mari...@arm.com; will.dea...@arm.com;
> > Mingkai Hu ; M.h. Lian ;
> > Xiaowei Bao 
> > Subject: Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host
> > Bridge IP driver
> > 
> > On Mon, Mar 11, 2019 at 09:32:04AM +, Z.q. Hou wrote:
> > > From: Hou Zhiqiang 
> > >
> > > As the Mobiveil PCIe controller support RC DAUL mode, and to make
> > > platforms which integrated the Mobiveil PCIe IP more easy to add their
> > > drivers, this patch moved the Mobiveil driver to a new directory
> > > 'drivers/pci/controller/mobiveil' and refactored it according to the
> > > abstraction of RC (EP driver will be added later).
> > 
> > I do not want to create a subdirectory for every controller that can work in
> > RC so drop this patch, more so given that it will be required "later", we
> > will create a directory when and if we actually have to.
> 
> Please don't drop this patch, Xiaowei Bao has sent v1 of the EP mode
> driver, which is depends on this patch.

I understand but he will have to rebase that code anyway, I do
not want to create a directory for mobiveil before I see other
IPs built on it, we did not do it for the cadence and rockchip
controllers either. So you will have to drop this patch and
rework it.

Thanks,
Lorenzo

> > Thanks,
> > Lorenzo
> > 
> > > Signed-off-by: Hou Zhiqiang 
> > > Reviewed-by: Minghuan Lian 
> > > Reviewed-by: Subrahmanya Lingappa 
> > > ---
> > > V4:
> > >  - no change
> > >
> > >  MAINTAINERS   |   2 +-
> > >  drivers/pci/controller/Kconfig|  11 +-
> > >  drivers/pci/controller/Makefile   |   2 +-
> > >  drivers/pci/controller/mobiveil/Kconfig   |  24 +
> > >  drivers/pci/controller/mobiveil/Makefile  |   4 +
> > >  .../pcie-mobiveil-host.c} | 528 +++---
> > >  .../controller/mobiveil/pcie-mobiveil-plat.c  |  54 ++
> > >  .../pci/controller/mobiveil/pcie-mobiveil.c   | 228 
> > >  .../pci/controller/mobiveil/pcie-mobiveil.h   | 187 +++
> > >  9 files changed, 587 insertions(+), 453 deletions(-)  create mode
> > > 100644 drivers/pci/controller/mobiveil/Kconfig
> > >  create mode 100644 drivers/pci/controller/mobiveil/Makefile
> > >  rename drivers/pci/controller/{pcie-mobiveil.c =>
> > > mobiveil/pcie-mobiveil-host.c} (55%)  create mode 100644
> > > drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c
> > >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.c
> > >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.h
> > >
> > > diff --git a/MAINTAINERS b/MAINTAINERS index
> > > 1e64279f338a..1013e74b14f2 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -11877,7 +11877,7 @@ M:Subrahmanya Lingappa
> > 
> > >  L:   linux-...@vger.kernel.org
> > >  S:   Supported
> > >  F:   Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
> > > -F:   drivers/pci/controller/pcie-mobiveil.c
> > > +F:   drivers/pci/controller/mobiveil/pcie-mobiveil*
> > >
> > >  PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC
> > support)
> > >  M:   Thomas Petazzoni 
> > > diff --git a/drivers/pci/controller/Kconfig
> > > b/drivers/pci/controller/Kconfig index 6671946dbf66..0e981ed00a75
> > > 100644
> > > --- a/drivers/pci/controller/Kconfig
> > > +++ b/drivers/pci/controller/Kconfig
> > > @@ -241,16 +241,6 @@ config PCIE_MEDIATEK
> > > Say Y here if you want to enable PCIe controller support on
> > > MediaTek SoCs.
> > >
> > > -config PCIE_MOBIVEIL
> > > - bool "Mobiveil AXI PCIe controller"
> > > - depends on ARCH_ZYNQMP || COMPILE_TEST
> > > - depends on OF
> > > - depends on PCI_MSI_IRQ_DOMAIN
> > > - help
> > > -   Say Y here if you want to enable support for the Mobiveil 

RE: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host Bridge IP driver

2019-03-26 Thread Z.q. Hou
Hi Lorenzo,

Thanks for your comments!

> -Original Message-
> From: Lorenzo Pieralisi 
> Sent: 2019年3月27日 1:34
> To: Z.q. Hou 
> Cc: linux-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
> devicet...@vger.kernel.org; linux-kernel@vger.kernel.org;
> bhelg...@google.com; robh...@kernel.org; mark.rutl...@arm.com;
> l.subrahma...@mobiveil.co.in; shawn...@kernel.org; Leo Li
> ; catalin.mari...@arm.com; will.dea...@arm.com;
> Mingkai Hu ; M.h. Lian ;
> Xiaowei Bao 
> Subject: Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host
> Bridge IP driver
> 
> On Mon, Mar 11, 2019 at 09:32:04AM +, Z.q. Hou wrote:
> > From: Hou Zhiqiang 
> >
> > As the Mobiveil PCIe controller support RC DAUL mode, and to make
> > platforms which integrated the Mobiveil PCIe IP more easy to add their
> > drivers, this patch moved the Mobiveil driver to a new directory
> > 'drivers/pci/controller/mobiveil' and refactored it according to the
> > abstraction of RC (EP driver will be added later).
> 
> I do not want to create a subdirectory for every controller that can work in
> RC so drop this patch, more so given that it will be required "later", we
> will create a directory when and if we actually have to.

Please don't drop this patch, Xiaowei Bao has sent v1 of the EP mode driver, 
which is depends on this patch.

> Thanks,
> Lorenzo
> 
> > Signed-off-by: Hou Zhiqiang 
> > Reviewed-by: Minghuan Lian 
> > Reviewed-by: Subrahmanya Lingappa 
> > ---
> > V4:
> >  - no change
> >
> >  MAINTAINERS   |   2 +-
> >  drivers/pci/controller/Kconfig|  11 +-
> >  drivers/pci/controller/Makefile   |   2 +-
> >  drivers/pci/controller/mobiveil/Kconfig   |  24 +
> >  drivers/pci/controller/mobiveil/Makefile  |   4 +
> >  .../pcie-mobiveil-host.c} | 528 +++---
> >  .../controller/mobiveil/pcie-mobiveil-plat.c  |  54 ++
> >  .../pci/controller/mobiveil/pcie-mobiveil.c   | 228 
> >  .../pci/controller/mobiveil/pcie-mobiveil.h   | 187 +++
> >  9 files changed, 587 insertions(+), 453 deletions(-)  create mode
> > 100644 drivers/pci/controller/mobiveil/Kconfig
> >  create mode 100644 drivers/pci/controller/mobiveil/Makefile
> >  rename drivers/pci/controller/{pcie-mobiveil.c =>
> > mobiveil/pcie-mobiveil-host.c} (55%)  create mode 100644
> > drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c
> >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.c
> >  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.h
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS index
> > 1e64279f338a..1013e74b14f2 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -11877,7 +11877,7 @@ M:  Subrahmanya Lingappa
> 
> >  L: linux-...@vger.kernel.org
> >  S: Supported
> >  F: Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
> > -F: drivers/pci/controller/pcie-mobiveil.c
> > +F: drivers/pci/controller/mobiveil/pcie-mobiveil*
> >
> >  PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC
> support)
> >  M: Thomas Petazzoni 
> > diff --git a/drivers/pci/controller/Kconfig
> > b/drivers/pci/controller/Kconfig index 6671946dbf66..0e981ed00a75
> > 100644
> > --- a/drivers/pci/controller/Kconfig
> > +++ b/drivers/pci/controller/Kconfig
> > @@ -241,16 +241,6 @@ config PCIE_MEDIATEK
> >   Say Y here if you want to enable PCIe controller support on
> >   MediaTek SoCs.
> >
> > -config PCIE_MOBIVEIL
> > -   bool "Mobiveil AXI PCIe controller"
> > -   depends on ARCH_ZYNQMP || COMPILE_TEST
> > -   depends on OF
> > -   depends on PCI_MSI_IRQ_DOMAIN
> > -   help
> > - Say Y here if you want to enable support for the Mobiveil AXI PCIe
> > - Soft IP. It has up to 8 outbound and inbound windows
> > - for address translation and it is a PCIe Gen4 IP.
> > -
> >  config PCIE_TANGO_SMP8759
> > bool "Tango SMP8759 PCIe controller (DANGEROUS)"
> > depends on ARCH_TANGO && PCI_MSI && OF @@ -281,4 +271,5 @@
> config
> > VMD
> >   module will be called vmd.
> >
> >  source "drivers/pci/controller/dwc/Kconfig"
> > +source "drivers/pci/controller/mobiveil/Kconfig"
> >  endmenu
> > diff --git a/drivers/pci/controller/Makefile
> > b/drivers/pci/controller/Makefile index d56a507495c5..b79a615041a0
> > 100644
> > --- a/drivers/pci/controller/Makefile
> > +++ b/drivers/pci/controller/Makef

Re: [PATCHv4 16/28] PCI: mobiveil: refactor Mobiveil PCIe Host Bridge IP driver

2019-03-26 Thread Lorenzo Pieralisi
On Mon, Mar 11, 2019 at 09:32:04AM +, Z.q. Hou wrote:
> From: Hou Zhiqiang 
> 
> As the Mobiveil PCIe controller support RC DAUL mode, and to
> make platforms which integrated the Mobiveil PCIe IP more easy
> to add their drivers, this patch moved the Mobiveil driver to
> a new directory 'drivers/pci/controller/mobiveil' and refactored
> it according to the abstraction of RC (EP driver will be added
> later).

I do not want to create a subdirectory for every controller that
can work in RC so drop this patch, more so given that it will
be required "later", we will create a directory when and if we
actually have to.

Thanks,
Lorenzo

> Signed-off-by: Hou Zhiqiang 
> Reviewed-by: Minghuan Lian 
> Reviewed-by: Subrahmanya Lingappa 
> ---
> V4:
>  - no change
> 
>  MAINTAINERS   |   2 +-
>  drivers/pci/controller/Kconfig|  11 +-
>  drivers/pci/controller/Makefile   |   2 +-
>  drivers/pci/controller/mobiveil/Kconfig   |  24 +
>  drivers/pci/controller/mobiveil/Makefile  |   4 +
>  .../pcie-mobiveil-host.c} | 528 +++---
>  .../controller/mobiveil/pcie-mobiveil-plat.c  |  54 ++
>  .../pci/controller/mobiveil/pcie-mobiveil.c   | 228 
>  .../pci/controller/mobiveil/pcie-mobiveil.h   | 187 +++
>  9 files changed, 587 insertions(+), 453 deletions(-)
>  create mode 100644 drivers/pci/controller/mobiveil/Kconfig
>  create mode 100644 drivers/pci/controller/mobiveil/Makefile
>  rename drivers/pci/controller/{pcie-mobiveil.c => 
> mobiveil/pcie-mobiveil-host.c} (55%)
>  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c
>  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.c
>  create mode 100644 drivers/pci/controller/mobiveil/pcie-mobiveil.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1e64279f338a..1013e74b14f2 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -11877,7 +11877,7 @@ M:Subrahmanya Lingappa 
> 
>  L:   linux-...@vger.kernel.org
>  S:   Supported
>  F:   Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
> -F:   drivers/pci/controller/pcie-mobiveil.c
> +F:   drivers/pci/controller/mobiveil/pcie-mobiveil*
>  
>  PCI DRIVER FOR MVEBU (Marvell Armada 370 and Armada XP SOC support)
>  M:   Thomas Petazzoni 
> diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
> index 6671946dbf66..0e981ed00a75 100644
> --- a/drivers/pci/controller/Kconfig
> +++ b/drivers/pci/controller/Kconfig
> @@ -241,16 +241,6 @@ config PCIE_MEDIATEK
> Say Y here if you want to enable PCIe controller support on
> MediaTek SoCs.
>  
> -config PCIE_MOBIVEIL
> - bool "Mobiveil AXI PCIe controller"
> - depends on ARCH_ZYNQMP || COMPILE_TEST
> - depends on OF
> - depends on PCI_MSI_IRQ_DOMAIN
> - help
> -   Say Y here if you want to enable support for the Mobiveil AXI PCIe
> -   Soft IP. It has up to 8 outbound and inbound windows
> -   for address translation and it is a PCIe Gen4 IP.
> -
>  config PCIE_TANGO_SMP8759
>   bool "Tango SMP8759 PCIe controller (DANGEROUS)"
>   depends on ARCH_TANGO && PCI_MSI && OF
> @@ -281,4 +271,5 @@ config VMD
> module will be called vmd.
>  
>  source "drivers/pci/controller/dwc/Kconfig"
> +source "drivers/pci/controller/mobiveil/Kconfig"
>  endmenu
> diff --git a/drivers/pci/controller/Makefile b/drivers/pci/controller/Makefile
> index d56a507495c5..b79a615041a0 100644
> --- a/drivers/pci/controller/Makefile
> +++ b/drivers/pci/controller/Makefile
> @@ -26,11 +26,11 @@ obj-$(CONFIG_PCIE_ROCKCHIP) += pcie-rockchip.o
>  obj-$(CONFIG_PCIE_ROCKCHIP_EP) += pcie-rockchip-ep.o
>  obj-$(CONFIG_PCIE_ROCKCHIP_HOST) += pcie-rockchip-host.o
>  obj-$(CONFIG_PCIE_MEDIATEK) += pcie-mediatek.o
> -obj-$(CONFIG_PCIE_MOBIVEIL) += pcie-mobiveil.o
>  obj-$(CONFIG_PCIE_TANGO_SMP8759) += pcie-tango.o
>  obj-$(CONFIG_VMD) += vmd.o
>  # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW
>  obj-y+= dwc/
> +obj-y+= mobiveil/
>  
>  
>  # The following drivers are for devices that use the generic ACPI
> diff --git a/drivers/pci/controller/mobiveil/Kconfig 
> b/drivers/pci/controller/mobiveil/Kconfig
> new file mode 100644
> index ..64343c07bfed
> --- /dev/null
> +++ b/drivers/pci/controller/mobiveil/Kconfig
> @@ -0,0 +1,24 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +menu "Mobiveil PCIe Core Support"
> + depends on PCI
> +
> +config PCIE_MOBIVEIL
> + bool
> +
> +config PCIE_MOBIVEIL_HOST
> +bool
> + depends on PCI_MSI_IRQ_DOMAIN
> +select PCIE_MOBIVEIL
> +
> +config PCIE_MOBIVEIL_PLAT
> + bool "Mobiveil AXI PCIe controller"
> + depends on ARCH_ZYNQMP || COMPILE_TEST
> + depends on OF
> + select PCIE_MOBIVEIL_HOST
> + help
> +   Say Y here if you want to enable support for the Mobiveil AXI PCIe
> +   Soft IP. It has up to 8 outbound and