From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757980AbcHCQRG (ORCPT ); Wed, 3 Aug 2016 12:17:06 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57658 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752026AbcHCQRD (ORCPT ); Wed, 3 Aug 2016 12:17:03 -0400 From: Arnd Bergmann To: Christoph Hellwig Cc: Kishon Vijay Abraham I , "bhelgaas@google.com" , "linux-pci@vger.kernel.org" , Jingoo Han , Pratyush Anand , Ley Foon Tan , Rob Herring , Tanmay Inamdar , Roy Zang , Mingkai Hu , Minghuan Lian , Richard Zhu , Lucas Stach , Murali Karicheri , Thomas Petazzoni , Jason Cooper , Thierry Reding , Simon Horman , Joao Pinto , Zhou Wang , Gabriele Paoloni , Stanimir Varbanov , David Daney , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-omap@vger.kernel.org" , jdmason@kudzu.us Subject: Re: Support for configurable PCIe endpoint Date: Wed, 03 Aug 2016 18:03:54 +0200 Message-ID: <2460140.yVuTYYqBTX@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-31-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160803094747.GA10170@infradead.org> References: <57A18927.9070003@ti.com> <20160803094747.GA10170@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:HC4lkcXeiIHjujCzvhmGFjG5hQUGyWl6jV3mmtO09WCnBYm8t/9 6KOA7nhnHCHGBsQIKgU8pGM523Ue8npLTtdwbvLThA13I3mpaeC9VjXPEXi8PQ7v1NC5HDZ DwXS0Y3NZ5bfWExfAh4efNra1EbKBACt6ehP23HuLRTJsdBoop6Bc3MfE287uARrbvLcG4v 2wtbgt1Hqq/VPb9sA7jAA== X-UI-Out-Filterresults: notjunk:1;V01:K0:JOBCE/vM2jU=:bY0Zr6rlJetN7q4u39PHP1 7Xh+O7AQzB8NNew0XrSMRHVQ9pQ+pMCkhdTQF9HKkjxljV54XnneKRUHoZqyiYyD62l6HgyCB QsagtoIPDlq12e+23kV3mYVpoo57OM19GeR32loaWZLkDiac59UhNC+FjS2oHUZIWvIcbdRDf sNbUtrn9aAXjq3h6KHUokFyEmir+Jj/myLsrk4FdRaCAYjvUN/lyliA5pbCRxpOSK3jiIofhx dyjwTs+ArrExvcC9ySe0jlsIco5EYqFDNY/LXhn4FoOytoGmKXJ4bvKAUhaxk3ogjyuT9EM+t SkxHEgdBVs5R4fkbtswJWzcNYaeAOUA8Efnb8U0UHwWAEImBRtCPzPVHvPKUnfbtlbNahHrJx bbzgaVDZCwnYk5/Uo+gT71b3AAKHR5dcZr0gDlk3jakyotSoUNuLmJozESPL0YopXPEdZ5mBt ziIctxeDEMcS/qJB0XDV+SZ6t+zj41Ng/1gVY5brOmwlFoZCItRPOvWmybadHbBp1ggpAiRID mermyPIEQcVXSv+7dRVtI6YWouFZG4eOO4Xso5Ck8107KlQ0rZeUaPHFMPz6yyKfqp05jE2rP jL76Jewt7awjiLqLGB7134mS+191UJ7PvoZKmosaWJII72M15hIukZ4fip7wWKdx15yV5PU2j 3DE+3Ip5OXO5JVMfP4daJAaWEWtx1X2CXtBc+I/GnGDhdntQRhBRVyMAWRQaV7r20yHO9p3tn GypwFNyxhkNuY6Xa Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, August 3, 2016 2:47:47 AM CEST Christoph Hellwig wrote: > On Wed, Aug 03, 2016 at 11:33:19AM +0530, 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. > > I disagree. It's highly useful for rapid prototyping of hardware > interfaces, and I've been looking into PCIe EP drivers for exactly > that reason recently. Going a little offtopic: any good DRA7 eval > boards you'd recommend to try for this purpose? > > We already have a EP driver in the tree: > > drivers/misc/spear13xx_pcie_gadget.c > > but as far as I can tell it doesn't really work at the moment. > This is indeed for the designware pcie hardware, but it never worked in a mainline kernel, and I marked it 'depends on BROKEN' after it had not correctly compiled for a long time. It's also lacking because it neither abstracts the hardware nor the protocol, and I think we want both. drivers/ntb seems like a reasonable start, while an alternative approach that we have discussed in the past would be based on top of virtio, so we could use the existing front-end drivers (net, block, v9fs, console, ...). Arnd