Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC

From: Frank Li
Date: Wed Mar 02 2022 - 10:42:21 EST




> -----Original Message-----
> From: Lad, Prabhakar <prabhakar.csengg@xxxxxxxxx>
> Sent: Thursday, February 10, 2022 3:24 AM
> To: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
> Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>; Kishon Vijay
> Abraham I <kishon@xxxxxx>; Bjorn Helgaas <bhelgaas@xxxxxxxxxx>; Lorenzo
> Pieralisi <lorenzo.pieralisi@xxxxxxx>; Krzysztof Wilczyński <kw@xxxxxxxxx>;
> Arnd Bergmann <arnd@xxxxxxxx>; Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx>; Marek Vasut <marek.vasut+renesas@xxxxxxxxx>;
> Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>; Rob Herring
> <robh@xxxxxxxxxx>; linux-pci <linux-pci@xxxxxxxxxxxxxxx>; Linux-Renesas
> <linux-renesas-soc@xxxxxxxxxxxxxxx>; LKML <linux-kernel@xxxxxxxxxxxxxxx>;
> Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> 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@xxxxxxx/T/

Best regards
Frank Li

>
> Caution: EXT Email
>
> Hi,
>
> On Thu, Feb 10, 2022 at 8:40 AM Manivannan Sadhasivam
> <manivannan.sadhasivam@xxxxxxxxxx> 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
> > >