linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
@ 2022-03-02 15:42 Frank Li
  2022-03-02 17:17 ` Lad, Prabhakar
  0 siblings, 1 reply; 10+ messages in thread
From: Frank Li @ 2022-03-02 15:42 UTC (permalink / raw)
  To: Lad, Prabhakar, Manivannan Sadhasivam
  Cc: Lad Prabhakar, Kishon Vijay Abraham I, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Arnd Bergmann,
	Greg Kroah-Hartman, Marek Vasut, Yoshihiro Shimoda, Rob Herring,
	linux-pci, Linux-Renesas, LKML, Biju Das



> -----Original Message-----
> From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> Sent: Thursday, February 10, 2022 3:24 AM
> To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>; Kishon Vijay
> Abraham I <kishon@ti.com>; Bjorn Helgaas <bhelgaas@google.com>; Lorenzo
> Pieralisi <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński <kw@linux.com>;
> Arnd Bergmann <arnd@arndb.de>; Greg Kroah-Hartman
> <gregkh@linuxfoundation.org>; Marek Vasut <marek.vasut+renesas@gmail.com>;
> Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>; Rob Herring
> <robh@kernel.org>; linux-pci <linux-pci@vger.kernel.org>; Linux-Renesas
> <linux-renesas-soc@vger.kernel.org>; LKML <linux-kernel@vger.kernel.org>;
> Biju Das <biju.das.jz@bp.renesas.com>
> Subject: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC
> handling and driver update for R-Car PCIe EP to support DMAC

I use standard DMA engine API to implement Designware PCIE EP embedded DMA support.
Please check https://lore.kernel.org/all/20220302032646.3793-3-Frank.Li@nxp.com/T/

Best regards
Frank Li

> 
> Caution: EXT Email
> 
> Hi,
> 
> On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> >
> > Hi,
> >
> > On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> > > Hi All,
> > >
> > > The current PCIe EPF framework supports DMA data transfers using
> external
> > > DMA only, this patch series aims to add support for platforms
> supporting
> > > internal DMAC on PCIe for data transfers.
> > >
> > > R-Car PCIe supports internal DMAC to transfer data between Internal Bus
> to
> > > PCI Express and vice versa. Last patch fills up the required flags and
> ops
> > > to support internal DMAC.
> > >
> > > Patches 1-3 are for PCIe EPF core to support internal DMAC handling,
> patch
> > > 4/5 is to fix test cases based on the conversation [1].
> > >
> >
> > This looks similar to the Synopsys eDMA IP [1] that goes with the
> Synopsys PCIe
> > endpoint IP. Why can't you represent it as a dmaengine driver and use the
> > existing DMA support?
> >
> Let me have a look. Could you please share a link to the Synopsys PCIe
> endpoint HW manual (the driver doesn't have a binding doc).
> 
> Cheers,
> Prabhakar
> 
> > [1]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kerne
> l.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git%2Ftree%2Fdr
> ivers%2Fdma%2Fdw-
> edma&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C95a5831aac544de2211508d9ec772f
> 9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637800819106821404%7CUnknow
> n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> 6Mn0%3D%7C3000&amp;sdata=yG39L2YBN9blGxTcXyVQwIXol8%2FCo%2FZ3GbGPIlqz6Mg%3D
> &amp;reserved=0
> >
> > > Patches are based on top of [1] next branch.
> > >
> > > [0]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spini
> cs.net%2Flists%2Flinux-
> pci%2Fmsg92385.html&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C95a5831aac544de
> 2211508d9ec772f9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637800819106
> 821404%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6
> Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ieX2gSSHFDumc1k2iWoOfMyHg236aJTE7UZ
> 5D74D9KM%3D&amp;reserved=0
> > > [1]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kerne
> l.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fhelgaas%2Fpci.git&amp;data=04%7C
> 01%7Cfrank.li%40nxp.com%7C95a5831aac544de2211508d9ec772f9a%7C686ea1d3bc2b4c
> 6fa92cd99c5c301635%7C0%7C0%7C637800819106821404%7CUnknown%7CTWFpbGZsb3d8eyJ
> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;
> sdata=Qc5cW6y5OrxprDjFQ1dNMZ4ZUc656I3FZqClaUMLx%2FM%3D&amp;reserved=0
> > >
> > > Cheers,
> > > Prabhakar
> > >
> > > Lad Prabhakar (5):
> > >   PCI: endpoint: Add ops and flag to support internal DMAC
> > >   PCI: endpoint: Add support to data transfer using internal dmac
> > >   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
> > >   misc: pci_endpoint_test: Add support to pass flags for buffer
> > >     allocation
> > >   PCI: rcar-ep: Add support for DMAC
> > >
> > >  drivers/misc/pci_endpoint_test.c              |  56 ++++-
> > >  drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
> > >  drivers/pci/controller/pcie-rcar.h            |  23 ++
> > >  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
> > >  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
> > >  include/linux/pci-epc.h                       |   8 +
> > >  include/linux/pci-epf.h                       |   7 +
> > >  7 files changed, 483 insertions(+), 54 deletions(-)
> > >
> > > --
> > > 2.25.1
> > >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-03-02 15:42 [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC Frank Li
@ 2022-03-02 17:17 ` Lad, Prabhakar
  2022-03-02 18:28   ` [EXT] " Frank Li
  0 siblings, 1 reply; 10+ messages in thread
From: Lad, Prabhakar @ 2022-03-02 17:17 UTC (permalink / raw)
  To: Frank Li
  Cc: Manivannan Sadhasivam, Lad Prabhakar, Kishon Vijay Abraham I,
	Bjorn Helgaas, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Arnd Bergmann, Greg Kroah-Hartman, Marek Vasut,
	Yoshihiro Shimoda, Rob Herring, linux-pci, Linux-Renesas, LKML,
	Biju Das

Hi Frank,

On Wed, Mar 2, 2022 at 3:42 PM Frank Li <frank.li@nxp.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> > Sent: Thursday, February 10, 2022 3:24 AM
> > To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>; Kishon Vijay
> > Abraham I <kishon@ti.com>; Bjorn Helgaas <bhelgaas@google.com>; Lorenzo
> > Pieralisi <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński <kw@linux.com>;
> > Arnd Bergmann <arnd@arndb.de>; Greg Kroah-Hartman
> > <gregkh@linuxfoundation.org>; Marek Vasut <marek.vasut+renesas@gmail.com>;
> > Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>; Rob Herring
> > <robh@kernel.org>; linux-pci <linux-pci@vger.kernel.org>; Linux-Renesas
> > <linux-renesas-soc@vger.kernel.org>; LKML <linux-kernel@vger.kernel.org>;
> > Biju Das <biju.das.jz@bp.renesas.com>
> > Subject: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC
> > handling and driver update for R-Car PCIe EP to support DMAC
>
> I use standard DMA engine API to implement Designware PCIE EP embedded DMA support.
> Please check https://lore.kernel.org/all/20220302032646.3793-3-Frank.Li@nxp.com/T/
>
Thank you for the link. The Designware PCIE EP is implemented as a DMA
engine driver so it's convenient to use the DMA engine API, whereas
the R-Car PCIe-EP is implemented as an actual PCIe EP [0].

[0] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml?h=next-20220302

Cheers,
Prabhakar


> Best regards
> Frank Li
>
> >
> > Caution: EXT Email
> >
> > Hi,
> >
> > On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
> > <manivannan.sadhasivam@linaro.org> wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> > > > Hi All,
> > > >
> > > > The current PCIe EPF framework supports DMA data transfers using
> > external
> > > > DMA only, this patch series aims to add support for platforms
> > supporting
> > > > internal DMAC on PCIe for data transfers.
> > > >
> > > > R-Car PCIe supports internal DMAC to transfer data between Internal Bus
> > to
> > > > PCI Express and vice versa. Last patch fills up the required flags and
> > ops
> > > > to support internal DMAC.
> > > >
> > > > Patches 1-3 are for PCIe EPF core to support internal DMAC handling,
> > patch
> > > > 4/5 is to fix test cases based on the conversation [1].
> > > >
> > >
> > > This looks similar to the Synopsys eDMA IP [1] that goes with the
> > Synopsys PCIe
> > > endpoint IP. Why can't you represent it as a dmaengine driver and use the
> > > existing DMA support?
> > >
> > Let me have a look. Could you please share a link to the Synopsys PCIe
> > endpoint HW manual (the driver doesn't have a binding doc).
> >
> > Cheers,
> > Prabhakar
> >
> > > [1]
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kerne
> > l.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git%2Ftree%2Fdr
> > ivers%2Fdma%2Fdw-
> > edma&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C95a5831aac544de2211508d9ec772f
> > 9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637800819106821404%7CUnknow
> > n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> > 6Mn0%3D%7C3000&amp;sdata=yG39L2YBN9blGxTcXyVQwIXol8%2FCo%2FZ3GbGPIlqz6Mg%3D
> > &amp;reserved=0
> > >
> > > > Patches are based on top of [1] next branch.
> > > >
> > > > [0]
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spini
> > cs.net%2Flists%2Flinux-
> > pci%2Fmsg92385.html&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C95a5831aac544de
> > 2211508d9ec772f9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637800819106
> > 821404%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6
> > Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ieX2gSSHFDumc1k2iWoOfMyHg236aJTE7UZ
> > 5D74D9KM%3D&amp;reserved=0
> > > > [1]
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kerne
> > l.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fhelgaas%2Fpci.git&amp;data=04%7C
> > 01%7Cfrank.li%40nxp.com%7C95a5831aac544de2211508d9ec772f9a%7C686ea1d3bc2b4c
> > 6fa92cd99c5c301635%7C0%7C0%7C637800819106821404%7CUnknown%7CTWFpbGZsb3d8eyJ
> > WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;
> > sdata=Qc5cW6y5OrxprDjFQ1dNMZ4ZUc656I3FZqClaUMLx%2FM%3D&amp;reserved=0
> > > >
> > > > Cheers,
> > > > Prabhakar
> > > >
> > > > Lad Prabhakar (5):
> > > >   PCI: endpoint: Add ops and flag to support internal DMAC
> > > >   PCI: endpoint: Add support to data transfer using internal dmac
> > > >   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
> > > >   misc: pci_endpoint_test: Add support to pass flags for buffer
> > > >     allocation
> > > >   PCI: rcar-ep: Add support for DMAC
> > > >
> > > >  drivers/misc/pci_endpoint_test.c              |  56 ++++-
> > > >  drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
> > > >  drivers/pci/controller/pcie-rcar.h            |  23 ++
> > > >  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
> > > >  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
> > > >  include/linux/pci-epc.h                       |   8 +
> > > >  include/linux/pci-epf.h                       |   7 +
> > > >  7 files changed, 483 insertions(+), 54 deletions(-)
> > > >
> > > > --
> > > > 2.25.1
> > > >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-03-02 17:17 ` Lad, Prabhakar
@ 2022-03-02 18:28   ` Frank Li
  2022-03-25 17:13     ` Lad, Prabhakar
  0 siblings, 1 reply; 10+ messages in thread
From: Frank Li @ 2022-03-02 18:28 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Manivannan Sadhasivam, Lad Prabhakar, Kishon Vijay Abraham I,
	Bjorn Helgaas, Lorenzo Pieralisi, Krzysztof Wilczyński,
	Arnd Bergmann, Greg Kroah-Hartman, Marek Vasut,
	Yoshihiro Shimoda, Rob Herring, linux-pci, Linux-Renesas, LKML,
	Biju Das



> -----Original Message-----
> From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> Sent: Wednesday, March 2, 2022 11:18 AM
> To: Frank Li <frank.li@nxp.com>
> Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>; Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com>; Kishon Vijay Abraham I
> <kishon@ti.com>; Bjorn Helgaas <bhelgaas@google.com>; Lorenzo Pieralisi
> <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński <kw@linux.com>; Arnd
> Bergmann <arnd@arndb.de>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>;
> Marek Vasut <marek.vasut+renesas@gmail.com>; Yoshihiro Shimoda
> <yoshihiro.shimoda.uh@renesas.com>; Rob Herring <robh@kernel.org>; linux-
> pci <linux-pci@vger.kernel.org>; Linux-Renesas <linux-renesas-
> soc@vger.kernel.org>; LKML <linux-kernel@vger.kernel.org>; Biju Das
> <biju.das.jz@bp.renesas.com>
> Subject: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC
> handling and driver update for R-Car PCIe EP to support DMAC
> 
> Caution: EXT Email
> 
> Hi Frank,
> 
> On Wed, Mar 2, 2022 at 3:42 PM Frank Li <frank.li@nxp.com> wrote:
> >
> >
> >
> > > -----Original Message-----
> > > From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> > > Sent: Thursday, February 10, 2022 3:24 AM
> > > To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>; Kishon
> Vijay
> > > Abraham I <kishon@ti.com>; Bjorn Helgaas <bhelgaas@google.com>; Lorenzo
> > > Pieralisi <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński
> <kw@linux.com>;
> > > Arnd Bergmann <arnd@arndb.de>; Greg Kroah-Hartman
> > > <gregkh@linuxfoundation.org>; Marek Vasut
> <marek.vasut+renesas@gmail.com>;
> > > Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>; Rob Herring
> > > <robh@kernel.org>; linux-pci <linux-pci@vger.kernel.org>; Linux-Renesas
> > > <linux-renesas-soc@vger.kernel.org>; LKML <linux-
> kernel@vger.kernel.org>;
> > > Biju Das <biju.das.jz@bp.renesas.com>
> > > Subject: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC
> > > handling and driver update for R-Car PCIe EP to support DMAC
> >
> > I use standard DMA engine API to implement Designware PCIE EP embedded
> DMA support.
> > Please check
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kern
> el.org%2Fall%2F20220302032646.3793-3-
> Frank.Li%40nxp.com%2FT%2F&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C0e2e5fe8f
> d224076afb208d9fc70aa16%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637818
> 383096028914%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLC
> JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=DCDX%2BYEVFsPOE6ZWzwrMxk1Fjlk
> ZA%2FEPGmhQSHuPB2c%3D&amp;reserved=0
> >
> Thank you for the link. The Designware PCIE EP is implemented as a DMA
> engine driver so it's convenient to use the DMA engine API, whereas
> the R-Car PCIe-EP is implemented as an actual PCIe EP [0].

My means, needn't add new interface pci_epf_internal_dmac_xfr at epc/epf.
Your R-Car PCI-EP DMA part can implement as a dma engine driver like designware.

So EP functional driver use the same method to operate DMA regardless
EP controller type. 

Best regards
Frank Li 

> 
> [0]
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kerne
> l.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fnext%2Flinux-
> next.git%2Ftree%2FDocumentation%2Fdevicetree%2Fbindings%2Fpci%2Frcar-pci-
> ep.yaml%3Fh%3Dnext-
> 20220302&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C0e2e5fe8fd224076afb208d9fc
> 70aa16%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637818383096028914%7CUn
> known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
> XVCI6Mn0%3D%7C3000&amp;sdata=v96I5m%2BsjozpFVLHgY4VE5H59r9cyG%2F%2FVDUXPHKT
> 2Sw%3D&amp;reserved=0
> 
> Cheers,
> Prabhakar
> 
> 
> > Best regards
> > Frank Li
> >
> > >
> > > Caution: EXT Email
> > >
> > > Hi,
> > >
> > > On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
> > > <manivannan.sadhasivam@linaro.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> > > > > Hi All,
> > > > >
> > > > > The current PCIe EPF framework supports DMA data transfers using
> > > external
> > > > > DMA only, this patch series aims to add support for platforms
> > > supporting
> > > > > internal DMAC on PCIe for data transfers.
> > > > >
> > > > > R-Car PCIe supports internal DMAC to transfer data between Internal
> Bus
> > > to
> > > > > PCI Express and vice versa. Last patch fills up the required flags
> and
> > > ops
> > > > > to support internal DMAC.
> > > > >
> > > > > Patches 1-3 are for PCIe EPF core to support internal DMAC handling,
> > > patch
> > > > > 4/5 is to fix test cases based on the conversation [1].
> > > > >
> > > >
> > > > This looks similar to the Synopsys eDMA IP [1] that goes with the
> > > Synopsys PCIe
> > > > endpoint IP. Why can't you represent it as a dmaengine driver and use
> the
> > > > existing DMA support?
> > > >
> > > Let me have a look. Could you please share a link to the Synopsys PCIe
> > > endpoint HW manual (the driver doesn't have a binding doc).
> > >
> > > Cheers,
> > > Prabhakar
> > >
> > > > [1]
> > >
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kerne
> %2F&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C0e2e5fe8fd224076afb208d9fc70aa1
> 6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637818383096028914%7CUnknown
> %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6
> Mn0%3D%7C3000&amp;sdata=7OMZZxDki3KkquGWF7B7PFDDciohJOEUFuDXSd50avc%3D&amp;
> reserved=0
> > >
> l.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ftorvalds%2Flinux.git%2Ftree%2Fdr
> > > ivers%2Fdma%2Fdw-
> > >
> edma&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C95a5831aac544de2211508d9ec772f
> > >
> 9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637800819106821404%7CUnknow
> > >
> n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI
> > >
> 6Mn0%3D%7C3000&amp;sdata=yG39L2YBN9blGxTcXyVQwIXol8%2FCo%2FZ3GbGPIlqz6Mg%3D
> > > &amp;reserved=0
> > > >
> > > > > Patches are based on top of [1] next branch.
> > > > >
> > > > > [0]
> > >
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.spini
> %2F&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C0e2e5fe8fd224076afb208d9fc70aa1
> 6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637818383096028914%7CUnknown
> %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6
> Mn0%3D%7C3000&amp;sdata=jlSMhNop8XtntmY%2FwySkwQDUd02i3ihhMtOmEesnwyg%3D&am
> p;reserved=0
> > > cs.net%2Flists%2Flinux-
> > >
> pci%2Fmsg92385.html&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C95a5831aac544de
> > >
> 2211508d9ec772f9a%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637800819106
> > >
> 821404%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6
> > >
> Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=ieX2gSSHFDumc1k2iWoOfMyHg236aJTE7UZ
> > > 5D74D9KM%3D&amp;reserved=0
> > > > > [1]
> > >
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kerne
> %2F&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C0e2e5fe8fd224076afb208d9fc70aa1
> 6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637818383096028914%7CUnknown
> %7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6
> Mn0%3D%7C3000&amp;sdata=7OMZZxDki3KkquGWF7B7PFDDciohJOEUFuDXSd50avc%3D&amp;
> reserved=0
> > >
> l.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fhelgaas%2Fpci.git&amp;data=04%7C
> > >
> 01%7Cfrank.li%40nxp.com%7C95a5831aac544de2211508d9ec772f9a%7C686ea1d3bc2b4c
> > >
> 6fa92cd99c5c301635%7C0%7C0%7C637800819106821404%7CUnknown%7CTWFpbGZsb3d8eyJ
> > >
> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;
> > > sdata=Qc5cW6y5OrxprDjFQ1dNMZ4ZUc656I3FZqClaUMLx%2FM%3D&amp;reserved=0
> > > > >
> > > > > Cheers,
> > > > > Prabhakar
> > > > >
> > > > > Lad Prabhakar (5):
> > > > >   PCI: endpoint: Add ops and flag to support internal DMAC
> > > > >   PCI: endpoint: Add support to data transfer using internal dmac
> > > > >   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
> > > > >   misc: pci_endpoint_test: Add support to pass flags for buffer
> > > > >     allocation
> > > > >   PCI: rcar-ep: Add support for DMAC
> > > > >
> > > > >  drivers/misc/pci_endpoint_test.c              |  56 ++++-
> > > > >  drivers/pci/controller/pcie-rcar-ep.c         | 227
> ++++++++++++++++++
> > > > >  drivers/pci/controller/pcie-rcar.h            |  23 ++
> > > > >  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
> > > > >  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
> > > > >  include/linux/pci-epc.h                       |   8 +
> > > > >  include/linux/pci-epf.h                       |   7 +
> > > > >  7 files changed, 483 insertions(+), 54 deletions(-)
> > > > >
> > > > > --
> > > > > 2.25.1
> > > > >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-03-02 18:28   ` [EXT] " Frank Li
@ 2022-03-25 17:13     ` Lad, Prabhakar
  0 siblings, 0 replies; 10+ messages in thread
From: Lad, Prabhakar @ 2022-03-25 17:13 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Frank Li, Bjorn Helgaas, Lorenzo Pieralisi,
	Manivannan Sadhasivam, Lad Prabhakar, Krzysztof Wilczyński,
	Arnd Bergmann, Greg Kroah-Hartman, Marek Vasut,
	Yoshihiro Shimoda, Rob Herring, linux-pci, Linux-Renesas, LKML,
	Biju Das

Hi Kishon,

On Wed, Mar 2, 2022 at 6:28 PM Frank Li <frank.li@nxp.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> > Sent: Wednesday, March 2, 2022 11:18 AM
> > To: Frank Li <frank.li@nxp.com>
> > Cc: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>; Lad Prabhakar
> > <prabhakar.mahadev-lad.rj@bp.renesas.com>; Kishon Vijay Abraham I
> > <kishon@ti.com>; Bjorn Helgaas <bhelgaas@google.com>; Lorenzo Pieralisi
> > <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński <kw@linux.com>; Arnd
> > Bergmann <arnd@arndb.de>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>;
> > Marek Vasut <marek.vasut+renesas@gmail.com>; Yoshihiro Shimoda
> > <yoshihiro.shimoda.uh@renesas.com>; Rob Herring <robh@kernel.org>; linux-
> > pci <linux-pci@vger.kernel.org>; Linux-Renesas <linux-renesas-
> > soc@vger.kernel.org>; LKML <linux-kernel@vger.kernel.org>; Biju Das
> > <biju.das.jz@bp.renesas.com>
> > Subject: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC
> > handling and driver update for R-Car PCIe EP to support DMAC
> >
> > Caution: EXT Email
> >
> > Hi Frank,
> >
> > On Wed, Mar 2, 2022 at 3:42 PM Frank Li <frank.li@nxp.com> wrote:
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> > > > Sent: Thursday, February 10, 2022 3:24 AM
> > > > To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > > Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>; Kishon
> > Vijay
> > > > Abraham I <kishon@ti.com>; Bjorn Helgaas <bhelgaas@google.com>; Lorenzo
> > > > Pieralisi <lorenzo.pieralisi@arm.com>; Krzysztof Wilczyński
> > <kw@linux.com>;
> > > > Arnd Bergmann <arnd@arndb.de>; Greg Kroah-Hartman
> > > > <gregkh@linuxfoundation.org>; Marek Vasut
> > <marek.vasut+renesas@gmail.com>;
> > > > Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>; Rob Herring
> > > > <robh@kernel.org>; linux-pci <linux-pci@vger.kernel.org>; Linux-Renesas
> > > > <linux-renesas-soc@vger.kernel.org>; LKML <linux-
> > kernel@vger.kernel.org>;
> > > > Biju Das <biju.das.jz@bp.renesas.com>
> > > > Subject: [EXT] Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC
> > > > handling and driver update for R-Car PCIe EP to support DMAC
> > >
> > > I use standard DMA engine API to implement Designware PCIE EP embedded
> > DMA support.
> > > Please check
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kern
> > el.org%2Fall%2F20220302032646.3793-3-
> > Frank.Li%40nxp.com%2FT%2F&amp;data=04%7C01%7Cfrank.li%40nxp.com%7C0e2e5fe8f
> > d224076afb208d9fc70aa16%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637818
> > 383096028914%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLC
> > JBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=DCDX%2BYEVFsPOE6ZWzwrMxk1Fjlk
> > ZA%2FEPGmhQSHuPB2c%3D&amp;reserved=0
> > >
> > Thank you for the link. The Designware PCIE EP is implemented as a DMA
> > engine driver so it's convenient to use the DMA engine API, whereas
> > the R-Car PCIe-EP is implemented as an actual PCIe EP [0].
>
> My means, needn't add new interface pci_epf_internal_dmac_xfr at epc/epf.
> Your R-Car PCI-EP DMA part can implement as a dma engine driver like designware.
>
> So EP functional driver use the same method to operate DMA regardless
> EP controller type.
>
With this approach all the PCIe controllers supporting internal dmac
will have to be added as a DMA driver.

Could you please provide some feedback on the above?

Sorry this mail is not in chain to my orignal patch series. My orignal
series can be found at [0]

[0] https://patchwork.kernel.org/project/linux-renesas-soc/cover/20220126195043.28376-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

Cheers,
Prabhakar

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-02-10 11:05       ` Lad, Prabhakar
@ 2022-02-10 13:22         ` Manivannan Sadhasivam
  0 siblings, 0 replies; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-02-10 13:22 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Lad Prabhakar, Kishon Vijay Abraham I, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Arnd Bergmann,
	Greg Kroah-Hartman, Marek Vasut, Yoshihiro Shimoda, Rob Herring,
	linux-pci, Linux-Renesas, LKML, Biju Das

On Thu, Feb 10, 2022 at 11:05:45AM +0000, Lad, Prabhakar wrote:
> On Thu, Feb 10, 2022 at 10:50 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> >
> > On Thu, Feb 10, 2022 at 09:24:19AM +0000, Lad, Prabhakar wrote:
> > > Hi,
> > >
> > > On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
> > > <manivannan.sadhasivam@linaro.org> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> > > > > Hi All,
> > > > >
> > > > > The current PCIe EPF framework supports DMA data transfers using external
> > > > > DMA only, this patch series aims to add support for platforms supporting
> > > > > internal DMAC on PCIe for data transfers.
> > > > >
> > > > > R-Car PCIe supports internal DMAC to transfer data between Internal Bus to
> > > > > PCI Express and vice versa. Last patch fills up the required flags and ops
> > > > > to support internal DMAC.
> > > > >
> > > > > Patches 1-3 are for PCIe EPF core to support internal DMAC handling, patch
> > > > > 4/5 is to fix test cases based on the conversation [1].
> > > > >
> > > >
> > > > This looks similar to the Synopsys eDMA IP [1] that goes with the Synopsys PCIe
> > > > endpoint IP. Why can't you represent it as a dmaengine driver and use the
> > > > existing DMA support?
> > > >
> > > Let me have a look. Could you please share a link to the Synopsys PCIe
> > > endpoint HW manual (the driver doesn't have a binding doc).
> > >
> >
> > I don't think the PCIe reference manual is available publicly. And you are right
> > that the driver is not tied to devicetree. The reason is, it gets probed using
> > the PCI ID of the EP and all the resources are defined statically in the driver
> > itself.
> >
> In R-Car PCIe the internal dmac is part of the PCIe block itself [0]
> and not a separate block. I don't see any drivers implementing the
> internal dmac drivers as a DMA engine driver. For example the Renesas
> SDHI driver has internal dmac too, this is handled in the SDHI driver
> itself [1] and not implemented as DMA engine driver. Let me know if my
> understanding is wrong here.
> 

Okay, thanks for the clarification. I thought that if the IP is same, we could
implement it as a standalone DMA engine driver, but looks like it is customized.
So I guess it is reasonable to have an internal implementation.

Thanks,
Mani

> [0] https://elixir.bootlin.com/linux/v5.17-rc3/source/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml#L76
> [1] https://elixir.bootlin.com/linux/v5.17-rc3/source/drivers/mmc/host/renesas_sdhi_internal_dmac.c
> 
> Cheers,
> Prabhakar
> 
> > Thanks,
> > Mani
> >
> > > Cheers,
> > > Prabhakar
> > >
> > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/dw-edma
> > > >
> > > > > Patches are based on top of [1] next branch.
> > > > >
> > > > > [0] https://www.spinics.net/lists/linux-pci/msg92385.html
> > > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
> > > > >
> > > > > Cheers,
> > > > > Prabhakar
> > > > >
> > > > > Lad Prabhakar (5):
> > > > >   PCI: endpoint: Add ops and flag to support internal DMAC
> > > > >   PCI: endpoint: Add support to data transfer using internal dmac
> > > > >   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
> > > > >   misc: pci_endpoint_test: Add support to pass flags for buffer
> > > > >     allocation
> > > > >   PCI: rcar-ep: Add support for DMAC
> > > > >
> > > > >  drivers/misc/pci_endpoint_test.c              |  56 ++++-
> > > > >  drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
> > > > >  drivers/pci/controller/pcie-rcar.h            |  23 ++
> > > > >  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
> > > > >  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
> > > > >  include/linux/pci-epc.h                       |   8 +
> > > > >  include/linux/pci-epf.h                       |   7 +
> > > > >  7 files changed, 483 insertions(+), 54 deletions(-)
> > > > >
> > > > > --
> > > > > 2.25.1
> > > > >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-02-10 10:50     ` Manivannan Sadhasivam
@ 2022-02-10 11:05       ` Lad, Prabhakar
  2022-02-10 13:22         ` Manivannan Sadhasivam
  0 siblings, 1 reply; 10+ messages in thread
From: Lad, Prabhakar @ 2022-02-10 11:05 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Lad Prabhakar, Kishon Vijay Abraham I, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Arnd Bergmann,
	Greg Kroah-Hartman, Marek Vasut, Yoshihiro Shimoda, Rob Herring,
	linux-pci, Linux-Renesas, LKML, Biju Das

On Thu, Feb 10, 2022 at 10:50 AM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
>
> On Thu, Feb 10, 2022 at 09:24:19AM +0000, Lad, Prabhakar wrote:
> > Hi,
> >
> > On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
> > <manivannan.sadhasivam@linaro.org> wrote:
> > >
> > > Hi,
> > >
> > > On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> > > > Hi All,
> > > >
> > > > The current PCIe EPF framework supports DMA data transfers using external
> > > > DMA only, this patch series aims to add support for platforms supporting
> > > > internal DMAC on PCIe for data transfers.
> > > >
> > > > R-Car PCIe supports internal DMAC to transfer data between Internal Bus to
> > > > PCI Express and vice versa. Last patch fills up the required flags and ops
> > > > to support internal DMAC.
> > > >
> > > > Patches 1-3 are for PCIe EPF core to support internal DMAC handling, patch
> > > > 4/5 is to fix test cases based on the conversation [1].
> > > >
> > >
> > > This looks similar to the Synopsys eDMA IP [1] that goes with the Synopsys PCIe
> > > endpoint IP. Why can't you represent it as a dmaengine driver and use the
> > > existing DMA support?
> > >
> > Let me have a look. Could you please share a link to the Synopsys PCIe
> > endpoint HW manual (the driver doesn't have a binding doc).
> >
>
> I don't think the PCIe reference manual is available publicly. And you are right
> that the driver is not tied to devicetree. The reason is, it gets probed using
> the PCI ID of the EP and all the resources are defined statically in the driver
> itself.
>
In R-Car PCIe the internal dmac is part of the PCIe block itself [0]
and not a separate block. I don't see any drivers implementing the
internal dmac drivers as a DMA engine driver. For example the Renesas
SDHI driver has internal dmac too, this is handled in the SDHI driver
itself [1] and not implemented as DMA engine driver. Let me know if my
understanding is wrong here.

[0] https://elixir.bootlin.com/linux/v5.17-rc3/source/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml#L76
[1] https://elixir.bootlin.com/linux/v5.17-rc3/source/drivers/mmc/host/renesas_sdhi_internal_dmac.c

Cheers,
Prabhakar

> Thanks,
> Mani
>
> > Cheers,
> > Prabhakar
> >
> > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/dw-edma
> > >
> > > > Patches are based on top of [1] next branch.
> > > >
> > > > [0] https://www.spinics.net/lists/linux-pci/msg92385.html
> > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
> > > >
> > > > Cheers,
> > > > Prabhakar
> > > >
> > > > Lad Prabhakar (5):
> > > >   PCI: endpoint: Add ops and flag to support internal DMAC
> > > >   PCI: endpoint: Add support to data transfer using internal dmac
> > > >   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
> > > >   misc: pci_endpoint_test: Add support to pass flags for buffer
> > > >     allocation
> > > >   PCI: rcar-ep: Add support for DMAC
> > > >
> > > >  drivers/misc/pci_endpoint_test.c              |  56 ++++-
> > > >  drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
> > > >  drivers/pci/controller/pcie-rcar.h            |  23 ++
> > > >  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
> > > >  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
> > > >  include/linux/pci-epc.h                       |   8 +
> > > >  include/linux/pci-epf.h                       |   7 +
> > > >  7 files changed, 483 insertions(+), 54 deletions(-)
> > > >
> > > > --
> > > > 2.25.1
> > > >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-02-10  9:24   ` Lad, Prabhakar
@ 2022-02-10 10:50     ` Manivannan Sadhasivam
  2022-02-10 11:05       ` Lad, Prabhakar
  0 siblings, 1 reply; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-02-10 10:50 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Lad Prabhakar, Kishon Vijay Abraham I, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Arnd Bergmann,
	Greg Kroah-Hartman, Marek Vasut, Yoshihiro Shimoda, Rob Herring,
	linux-pci, Linux-Renesas, LKML, Biju Das

On Thu, Feb 10, 2022 at 09:24:19AM +0000, Lad, Prabhakar wrote:
> Hi,
> 
> On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@linaro.org> wrote:
> >
> > Hi,
> >
> > On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> > > Hi All,
> > >
> > > The current PCIe EPF framework supports DMA data transfers using external
> > > DMA only, this patch series aims to add support for platforms supporting
> > > internal DMAC on PCIe for data transfers.
> > >
> > > R-Car PCIe supports internal DMAC to transfer data between Internal Bus to
> > > PCI Express and vice versa. Last patch fills up the required flags and ops
> > > to support internal DMAC.
> > >
> > > Patches 1-3 are for PCIe EPF core to support internal DMAC handling, patch
> > > 4/5 is to fix test cases based on the conversation [1].
> > >
> >
> > This looks similar to the Synopsys eDMA IP [1] that goes with the Synopsys PCIe
> > endpoint IP. Why can't you represent it as a dmaengine driver and use the
> > existing DMA support?
> >
> Let me have a look. Could you please share a link to the Synopsys PCIe
> endpoint HW manual (the driver doesn't have a binding doc).
> 

I don't think the PCIe reference manual is available publicly. And you are right
that the driver is not tied to devicetree. The reason is, it gets probed using
the PCI ID of the EP and all the resources are defined statically in the driver
itself.

Thanks,
Mani

> Cheers,
> Prabhakar
> 
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/dw-edma
> >
> > > Patches are based on top of [1] next branch.
> > >
> > > [0] https://www.spinics.net/lists/linux-pci/msg92385.html
> > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
> > >
> > > Cheers,
> > > Prabhakar
> > >
> > > Lad Prabhakar (5):
> > >   PCI: endpoint: Add ops and flag to support internal DMAC
> > >   PCI: endpoint: Add support to data transfer using internal dmac
> > >   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
> > >   misc: pci_endpoint_test: Add support to pass flags for buffer
> > >     allocation
> > >   PCI: rcar-ep: Add support for DMAC
> > >
> > >  drivers/misc/pci_endpoint_test.c              |  56 ++++-
> > >  drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
> > >  drivers/pci/controller/pcie-rcar.h            |  23 ++
> > >  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
> > >  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
> > >  include/linux/pci-epc.h                       |   8 +
> > >  include/linux/pci-epf.h                       |   7 +
> > >  7 files changed, 483 insertions(+), 54 deletions(-)
> > >
> > > --
> > > 2.25.1
> > >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-02-10  8:40 ` Manivannan Sadhasivam
@ 2022-02-10  9:24   ` Lad, Prabhakar
  2022-02-10 10:50     ` Manivannan Sadhasivam
  0 siblings, 1 reply; 10+ messages in thread
From: Lad, Prabhakar @ 2022-02-10  9:24 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Lad Prabhakar, Kishon Vijay Abraham I, Bjorn Helgaas,
	Lorenzo Pieralisi, Krzysztof Wilczyński, Arnd Bergmann,
	Greg Kroah-Hartman, Marek Vasut, Yoshihiro Shimoda, Rob Herring,
	linux-pci, Linux-Renesas, LKML, Biju Das

Hi,

On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
>
> Hi,
>
> On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> > Hi All,
> >
> > The current PCIe EPF framework supports DMA data transfers using external
> > DMA only, this patch series aims to add support for platforms supporting
> > internal DMAC on PCIe for data transfers.
> >
> > R-Car PCIe supports internal DMAC to transfer data between Internal Bus to
> > PCI Express and vice versa. Last patch fills up the required flags and ops
> > to support internal DMAC.
> >
> > Patches 1-3 are for PCIe EPF core to support internal DMAC handling, patch
> > 4/5 is to fix test cases based on the conversation [1].
> >
>
> This looks similar to the Synopsys eDMA IP [1] that goes with the Synopsys PCIe
> endpoint IP. Why can't you represent it as a dmaengine driver and use the
> existing DMA support?
>
Let me have a look. Could you please share a link to the Synopsys PCIe
endpoint HW manual (the driver doesn't have a binding doc).

Cheers,
Prabhakar

> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/dw-edma
>
> > Patches are based on top of [1] next branch.
> >
> > [0] https://www.spinics.net/lists/linux-pci/msg92385.html
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
> >
> > Cheers,
> > Prabhakar
> >
> > Lad Prabhakar (5):
> >   PCI: endpoint: Add ops and flag to support internal DMAC
> >   PCI: endpoint: Add support to data transfer using internal dmac
> >   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
> >   misc: pci_endpoint_test: Add support to pass flags for buffer
> >     allocation
> >   PCI: rcar-ep: Add support for DMAC
> >
> >  drivers/misc/pci_endpoint_test.c              |  56 ++++-
> >  drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
> >  drivers/pci/controller/pcie-rcar.h            |  23 ++
> >  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
> >  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
> >  include/linux/pci-epc.h                       |   8 +
> >  include/linux/pci-epf.h                       |   7 +
> >  7 files changed, 483 insertions(+), 54 deletions(-)
> >
> > --
> > 2.25.1
> >

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
  2022-01-26 19:50 Lad Prabhakar
@ 2022-02-10  8:40 ` Manivannan Sadhasivam
  2022-02-10  9:24   ` Lad, Prabhakar
  0 siblings, 1 reply; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-02-10  8:40 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Kishon Vijay Abraham I, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Arnd Bergmann, Greg Kroah-Hartman,
	Marek Vasut, Yoshihiro Shimoda, Rob Herring, linux-pci,
	linux-renesas-soc, linux-kernel, Prabhakar, Biju Das

Hi,

On Wed, Jan 26, 2022 at 07:50:38PM +0000, Lad Prabhakar wrote:
> Hi All,
> 
> The current PCIe EPF framework supports DMA data transfers using external
> DMA only, this patch series aims to add support for platforms supporting
> internal DMAC on PCIe for data transfers.
> 
> R-Car PCIe supports internal DMAC to transfer data between Internal Bus to
> PCI Express and vice versa. Last patch fills up the required flags and ops
> to support internal DMAC.
> 
> Patches 1-3 are for PCIe EPF core to support internal DMAC handling, patch
> 4/5 is to fix test cases based on the conversation [1].
> 

This looks similar to the Synopsys eDMA IP [1] that goes with the Synopsys PCIe
endpoint IP. Why can't you represent it as a dmaengine driver and use the
existing DMA support?

Thanks,
Mani

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/dma/dw-edma 

> Patches are based on top of [1] next branch.
> 
> [0] https://www.spinics.net/lists/linux-pci/msg92385.html
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git
> 
> Cheers,
> Prabhakar
> 
> Lad Prabhakar (5):
>   PCI: endpoint: Add ops and flag to support internal DMAC
>   PCI: endpoint: Add support to data transfer using internal dmac
>   misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
>   misc: pci_endpoint_test: Add support to pass flags for buffer
>     allocation
>   PCI: rcar-ep: Add support for DMAC
> 
>  drivers/misc/pci_endpoint_test.c              |  56 ++++-
>  drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
>  drivers/pci/controller/pcie-rcar.h            |  23 ++
>  drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
>  drivers/pci/endpoint/pci-epf-core.c           |  32 +++
>  include/linux/pci-epc.h                       |   8 +
>  include/linux/pci-epf.h                       |   7 +
>  7 files changed, 483 insertions(+), 54 deletions(-)
> 
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC
@ 2022-01-26 19:50 Lad Prabhakar
  2022-02-10  8:40 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 10+ messages in thread
From: Lad Prabhakar @ 2022-01-26 19:50 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Bjorn Helgaas, Lorenzo Pieralisi,
	Krzysztof Wilczyński, Arnd Bergmann, Greg Kroah-Hartman,
	Marek Vasut, Yoshihiro Shimoda, Rob Herring, linux-pci,
	linux-renesas-soc
  Cc: linux-kernel, Prabhakar, Biju Das, Lad Prabhakar

Hi All,

The current PCIe EPF framework supports DMA data transfers using external
DMA only, this patch series aims to add support for platforms supporting
internal DMAC on PCIe for data transfers.

R-Car PCIe supports internal DMAC to transfer data between Internal Bus to
PCI Express and vice versa. Last patch fills up the required flags and ops
to support internal DMAC.

Patches 1-3 are for PCIe EPF core to support internal DMAC handling, patch
4/5 is to fix test cases based on the conversation [1].

Patches are based on top of [1] next branch.

[0] https://www.spinics.net/lists/linux-pci/msg92385.html
[1] https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git

Cheers,
Prabhakar

Lad Prabhakar (5):
  PCI: endpoint: Add ops and flag to support internal DMAC
  PCI: endpoint: Add support to data transfer using internal dmac
  misc: pci_endpoint_test: Add driver data for Renesas RZ/G2{EHMN}
  misc: pci_endpoint_test: Add support to pass flags for buffer
    allocation
  PCI: rcar-ep: Add support for DMAC

 drivers/misc/pci_endpoint_test.c              |  56 ++++-
 drivers/pci/controller/pcie-rcar-ep.c         | 227 ++++++++++++++++++
 drivers/pci/controller/pcie-rcar.h            |  23 ++
 drivers/pci/endpoint/functions/pci-epf-test.c | 184 ++++++++++----
 drivers/pci/endpoint/pci-epf-core.c           |  32 +++
 include/linux/pci-epc.h                       |   8 +
 include/linux/pci-epf.h                       |   7 +
 7 files changed, 483 insertions(+), 54 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-25 17:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 15:42 [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC Frank Li
2022-03-02 17:17 ` Lad, Prabhakar
2022-03-02 18:28   ` [EXT] " Frank Li
2022-03-25 17:13     ` Lad, Prabhakar
  -- strict thread matches above, loose matches on Subject: below --
2022-01-26 19:50 Lad Prabhakar
2022-02-10  8:40 ` Manivannan Sadhasivam
2022-02-10  9:24   ` Lad, Prabhakar
2022-02-10 10:50     ` Manivannan Sadhasivam
2022-02-10 11:05       ` Lad, Prabhakar
2022-02-10 13:22         ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).