From: Kishon Vijay Abraham I <kishon@ti.com>
To: Mingkai Hu <mingkai.hu@nxp.com>,
Joao Pinto <Joao.Pinto@synopsys.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>,
Jingoo Han <jingoohan1@gmail.com>,
Pratyush Anand <pratyush.anand@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Jason Cooper <jason@lakedaemon.net>,
Simon Horman <horms@verge.net.au>,
David Daney <david.daney@cavium.com>,
Gabriele Paoloni <gabriele.paoloni@huawei.com>,
Richard Zhu <Richard.Zhu@freescale.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Carlos Palminha <CARLOS.PALMINHA@synopsys.com>,
Stanimir Varbanov <svarbanov@mm-sol.com>,
Minghuan Lian <minghuan.Lian@freescale.com>,
Zhou Wang <wangzhou1@hisilicon.com>,
Murali Karicheri <m-karicheri2@ti.com>,
Thierry Reding <thierry.reding@gmail.com>,
Tanmay Inamdar <tinamdar@apm.com>,
Ley Foon Tan <lftan@altera.com>,
Mingkai Hu <mingkai.hu@freescale.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
Roy Zang <tie-fei.zang@freescale.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Lucas Stach <l.stach@pengutronix.de>
Subject: Re: Support for configurable PCIe endpoint
Date: Thu, 18 Aug 2016 17:54:57 +0530 [thread overview]
Message-ID: <57B5A919.6000809@ti.com> (raw)
In-Reply-To: <VI1PR04MB14544C83482106ABF1067D5F8E140@VI1PR04MB1454.eurprd04.prod.outlook.com>
Hi,
On Wednesday 17 August 2016 03:19 PM, Mingkai Hu wrote:
>
>
>> -----Original Message-----
>> From: Kishon Vijay Abraham I [mailto:kishon@ti.com]
>> Sent: Thursday, August 04, 2016 6:02 PM
>> To: Joao Pinto <Joao.Pinto@synopsys.com>; bhelgaas@google.com; linux-
>> pci@vger.kernel.org; arnd@arndb.de; Jingoo Han <jingoohan1@gmail.com>;
>> Pratyush Anand <pratyush.anand@gmail.com>
>> Cc: Ley Foon Tan <lftan@altera.com>; Rob Herring <robh@kernel.org>;
>> Tanmay Inamdar <tinamdar@apm.com>; Roy Zang <tie-
>> fei.zang@freescale.com>; Mingkai Hu <mingkai.hu@freescale.com>;
>> Minghuan Lian <minghuan.Lian@freescale.com>; Richard Zhu
>> <Richard.Zhu@freescale.com>; Lucas Stach <l.stach@pengutronix.de>;
>> Murali Karicheri <m-karicheri2@ti.com>; Thomas Petazzoni
>> <thomas.petazzoni@free-electrons.com>; Jason Cooper
>> <jason@lakedaemon.net>; Thierry Reding <thierry.reding@gmail.com>;
>> Simon Horman <horms@verge.net.au>; Zhou Wang
>> <wangzhou1@hisilicon.com>; Gabriele Paoloni
>> <gabriele.paoloni@huawei.com>; Stanimir Varbanov <svarbanov@mm-
>> sol.com>; David Daney <david.daney@cavium.com>; linux-
>> kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
>> omap@vger.kernel.org; Carlos Palminha
>> <CARLOS.PALMINHA@synopsys.com>
>> Subject: Re: Support for configurable PCIe endpoint
>>
>> Hi,
>>
>> On Wednesday 03 August 2016 07:09 PM, Joao Pinto wrote:
>>> Hi Kishon,
>>>
>>> On 8/3/2016 7:03 AM, Kishon Vijay Abraham I wrote:
>>>> Hi,
>>>>
>>>> The PCIe controller present in TI's DRA7 SoC is capable of operating
>>>> either in Root Complex mode or Endpoint mode. (It uses Synopsys
>>>> Designware Core). I'd assume most of the PCIe controllers on other
>>>> platforms that use Designware core should also be capable to operate
>>>> in endpoint mode. But linux kernel right now supports only RC mode.
>>>>
>>>> PCIe endpoint support discussion came up briefly before [1] but it
>>>> was felt the practical use case will find firmware more suitable and
>>>> endpoint support in kernel can be used only for validation or demo.
>>>>
>>>> *) Modify platform driver to support EP mode (in my case pci-dra7xx.c).
>>>>
>>>> *) dt binding specific to EP mode should be created.
>>>>
>>>> Once I complete the implementation and start posting RFC patches, a
>>>> lot of these will become clear. But I want to check if this sounds
>>>> okay to you guys before starting the implementation.
>>>>
>>>> Let me know if you have some other ideas too.
>>>>
>>>> Cheers
>>>> Kishon
>>>>
>>>> [1] -> http://www.spinics.net/lists/linux-pci/msg26026.html
>>>>
>>>
>>> You are rising a topic that we are also addressing in Synopsys.
>>>
>>> For the PCIe RC hardware validation we are currently using the
>>> standard pcie-designware and pcie-designware-plat drivers.
>>>
>>> For the Endpoint we have to use an internal software package. Its main
>>> purpose is to initialize the IP registers, eDMA channels and make data
>>> transfer to prove that the everything is working properly. This is
>>> done in 2 levels, a custom driver built and loaded and an application
>>> that makes some ioctl to the driver executing some interesting
>>> functions to check the Endpoint status and make some data exchange.
>>
>> hmm.. the platform I have doesn't have a DMA in PCIe IP
>> (http://www.ti.com/lit/ug/spruhz6g/spruhz6g.pdf). So in your testing does
>> the EP access RC memory? i.e the driver in the RC allocates memory from it's
>> DDR and gives it's DDR address to the EP. The EP then transfers data to this
>> address. (This is a typical use case with ethernet PCIe cards). IIUC that's not
>> simple with configurable EPs. I'd like to know more about your testing though.
>>
>
> Hi Kishon,
>
> This is a typical user case for EP to use DMA transfer data to/from RC memory.
> In our case, we implement ring (like BD ring) or register in EP to communicate
> The address allocated in RC memory, then EP can transfer data to/from RC memory.
Initially I had some confusion w.r.t this because the address allocated in RC
memory can also be an address in EP system. For example let's assume we connect
two similar systems one configured as RC and the other configured as EP. The
PCI driver in the RC allocates memory in it's DDR (say 0x80000000) and programs
this address in the EP. Since it's a similar system, 0x80000000 will also be an
address in the EPs DDR. This will result in EP transferring data to it's own
DDR (at 0x80000000) instead of the same address in RC.
But later realized instead of directly using the DDR address given by RC, this
address should only be used to program the outbound window. That way the target
of the outbound window can be an address given by the RC and source should be
an address from the address space in the EP's system.
Do you also use the RC memory address to program the outbound window?
Thanks
Kishon
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2016-08-18 12:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 6:03 Support for configurable PCIe endpoint Kishon Vijay Abraham I
2016-08-03 7:42 ` Arnd Bergmann
2016-08-04 8:19 ` Kishon Vijay Abraham I
2016-08-03 9:47 ` Christoph Hellwig
2016-08-03 16:03 ` Arnd Bergmann
2016-08-03 17:27 ` Christoph Hellwig
2016-08-03 19:38 ` Arnd Bergmann
2016-08-04 8:49 ` Kishon Vijay Abraham I
2016-08-03 13:39 ` Joao Pinto
2016-08-04 10:02 ` Kishon Vijay Abraham I
2016-08-04 11:13 ` Arnd Bergmann
2016-08-18 13:14 ` Kishon Vijay Abraham I
2016-08-25 12:59 ` Arnd Bergmann
2016-08-29 11:47 ` Kishon Vijay Abraham I
2016-08-17 9:49 ` Mingkai Hu
2016-08-18 12:24 ` Kishon Vijay Abraham I [this message]
2016-08-29 15:25 ` Roy Zang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57B5A919.6000809@ti.com \
--to=kishon@ti.com \
--cc=CARLOS.PALMINHA@synopsys.com \
--cc=Joao.Pinto@synopsys.com \
--cc=Richard.Zhu@freescale.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=david.daney@cavium.com \
--cc=gabriele.paoloni@huawei.com \
--cc=horms@verge.net.au \
--cc=jason@lakedaemon.net \
--cc=jingoohan1@gmail.com \
--cc=l.stach@pengutronix.de \
--cc=lftan@altera.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=minghuan.Lian@freescale.com \
--cc=mingkai.hu@freescale.com \
--cc=mingkai.hu@nxp.com \
--cc=pratyush.anand@gmail.com \
--cc=svarbanov@mm-sol.com \
--cc=thierry.reding@gmail.com \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tie-fei.zang@freescale.com \
--cc=tinamdar@apm.com \
--cc=wangzhou1@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).