Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2889738pxb; Thu, 10 Feb 2022 07:45:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHOkeGWkmHF6kn0Tvnd7RBpxuWOu7+W41dGnrNU8LE5dZyLUDaDdsii2U+JBYBqnm0lLej X-Received: by 2002:a17:906:eb52:: with SMTP id mc18mr6693438ejb.120.1644507926386; Thu, 10 Feb 2022 07:45:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644507926; cv=none; d=google.com; s=arc-20160816; b=elzWSlrDxehYr30sVJ7+Cmk5EjQpOdi2ocjtorK4iXnoKsXpDr3FNXw0jOW0Iaxzpg iw//eq3deSR4TCt46sqmtqsj0/Qem04dYI5T0u4+UY/oTfjAbp/Qv0a/7DphsHZPt2uM jG/G2ObBuc18CA0mVfozb3YC0JJalOsQN0EnOWL33YkQb+Y+MQHS6ENRJWd22S0i5tIk PTmJbTkMEie73pULP+8ewnQ352Deh4Ei+m72V105bYDSwIHYr6sgWAdrRvv1y12ssEA/ cQ8MvYW6PrrnHuq7gqUcFXjLRlMgb5ris9E6ROGMY207cjKAh/dbAXSVSi0MRQkG054d ecmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=lmOwrWMBvG/QSqfuMjJnJ7kGjRK9jagfZ0MoGw4iJ8k=; b=TUadMjhYHXD5MrZbfFCSgoGwQFB2LnGV9yVqRAhdwwkDVDgWYE4gakAzmFqa6nVoqB GU3t6JmDUIgLCotIz+IGKORlyn87rA7+xL/8wcUb02hDIIU7AmpmbxzUbXP+Jf/v1jzQ ybmHMfwgVoTb7GI5j764txycvvJG8twh+gO10ERS5DoDn4M4chtYdgH9Z93fb9JsSevo CDbsshhJf5AC9XW7DKUT2SYm0xl13+cTbSU7TW/ppjo6LJIEgo7uk2r7vZy9+8c6cbTJ PMnQJcdP9nvnVS1iKER4WYEecXLukcNUGgmh35m2dVT3ekYI6kbMwshshTf8Y4nqaank vDUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UjppnTNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i13si3918023eda.192.2022.02.10.07.45.01; Thu, 10 Feb 2022 07:45:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UjppnTNb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242123AbiBJNWY (ORCPT + 99 others); Thu, 10 Feb 2022 08:22:24 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242110AbiBJNWX (ORCPT ); Thu, 10 Feb 2022 08:22:23 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE46EB9D for ; Thu, 10 Feb 2022 05:22:23 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id x3so1810761pll.3 for ; Thu, 10 Feb 2022 05:22:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=lmOwrWMBvG/QSqfuMjJnJ7kGjRK9jagfZ0MoGw4iJ8k=; b=UjppnTNb82HEctUbBZO6K12OIzgXOTnqDKLtSDd2sA6wa9ybDXORdycoNkVY60QX3z lCJS1XOx/McRZcFLUwl4MKVrzJP7HeZqQoa2sXYuPLSyGX9K5Jh7nb/sEcc0DLSnDxia qOK5qPKs1GEAtcrhQN0FTTkg7fk4GHSXHQnKAucijTqi18kl9pCxaLlCMAlWFzvdDrzj w+r/I9YanmnzSzb6/O0TG7udN2mPltC2EgKUW30CnXC2ATtTxOExyduUtpg08PKigg9x vDr9uCrih8Cm5jSRniyOP6VmnH6PC9lO4xX/NmJVrKAngm5NrgibhJ4jzXXPtzE4eTfO wjuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=lmOwrWMBvG/QSqfuMjJnJ7kGjRK9jagfZ0MoGw4iJ8k=; b=4JIoW/TtqQUBTp4DPh+v2H8QjbUoVFTZo2Pm0iO83893hgvj9UhBloWSBRwTgldczs 2ZY8Qq4TtWfGgX8jYRl95v+yPDWjeQGXhN3bXiM5c7S87BT/eXT+ist2fjViHD29Coai j8AYuG6OYpFGCYCYjbOX9MwSfeAy4S4W0f8mRSGUZA+Aj9flswUh/QrMBLWZpN4i4au5 YaZ2dQI2Kq4Kj66MZ771zd8MxDqiuMQ6rnciewDc9QusdOBuZ3Isdo0MnvytTQNppcst xfNP6Bu5Sf4pr5SOXwY/9DjvxxAQM17NQJhprCI3ZvA33FLa9aiszZFfwJR665MI8+QD PPMQ== X-Gm-Message-State: AOAM530+u95CBkAMrtEz+HRH4luYrfa+PXxH6cFerd2AInmGKZqigUEa 0QcqB3bT2NVN9gG1gLaFQKN/ X-Received: by 2002:a17:902:e781:: with SMTP id cp1mr7342690plb.45.1644499343306; Thu, 10 Feb 2022 05:22:23 -0800 (PST) Received: from thinkpad ([27.111.75.88]) by smtp.gmail.com with ESMTPSA id u19sm13443711pfi.126.2022.02.10.05.22.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Feb 2022 05:22:22 -0800 (PST) Date: Thu, 10 Feb 2022 18:52:16 +0530 From: Manivannan Sadhasivam To: "Lad, Prabhakar" Cc: Lad Prabhakar , Kishon Vijay Abraham I , Bjorn Helgaas , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Arnd Bergmann , Greg Kroah-Hartman , Marek Vasut , Yoshihiro Shimoda , Rob Herring , linux-pci , Linux-Renesas , LKML , Biju Das Subject: Re: [RFC PATCH 0/5] PCIe EPF support for internal DMAC handling and driver update for R-Car PCIe EP to support DMAC Message-ID: <20220210132216.GE69529@thinkpad> References: <20220126195043.28376-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220210084052.GA69529@thinkpad> <20220210105023.GB69529@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 10, 2022 at 11:05:45AM +0000, Lad, Prabhakar wrote: > On Thu, Feb 10, 2022 at 10:50 AM Manivannan Sadhasivam > 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 > > > 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 > > > > >